Skip to content

Commit

Permalink
Merge pull request #33 from BrieucF/AddBTagAndMore
Browse files Browse the repository at this point in the history
Add b tag and more
  • Loading branch information
OlivierBondu committed Oct 20, 2015
2 parents 0411267 + acfe5fa commit 7bb92b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions interface/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace HH {
int8_t hlt_idx = -1; // Index to the matched HLT object. -1 if no match.
// Example : t->Draw("hh_leptons.p4.Pt() - hlt_object_p4[hh_leptons.hlt_idx].Pt()","hh_leptons.hlt_idx != -1","")
bool hlt_already_tried_matching = false; // do the matching only once, even when the lepton is in several Dilepton
float hlt_DR_matchedObject = std::numeric_limits<float>::max();
bool isMu;
bool isEl;
bool id_L; // Loose
Expand Down Expand Up @@ -62,9 +63,13 @@ namespace HH {
struct Jet {
LorentzVector p4;
unsigned idx;
bool id_L;
bool id_T;
bool btagL;
bool btagM;
bool btagT;
float CSV;
float JP;
};
struct Dijet {
LorentzVector p4;
Expand Down
5 changes: 5 additions & 0 deletions plugins/HHAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
}
lepton.hlt_idx = index;
lepton.hlt_already_tried_matching = true;
lepton.hlt_DR_matchedObject = min_dr;
return index;
};

Expand Down Expand Up @@ -366,6 +367,10 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
HH::Jet myjet;
myjet.p4 = alljets.p4[ijet];
myjet.idx = ijet;
myjet.id_L = alljets.passLooseID[ijet];
myjet.id_T = alljets.passTightID[ijet];
myjet.CSV = alljets.getBTagDiscriminant(ijet, "pfCombinedInclusiveSecondaryVertexV2BJetTags");
myjet.JP = alljets.getBTagDiscriminant(ijet, "pfJetProbabilityBJetTags");
float mybtag = alljets.getBTagDiscriminant(ijet, m_jet_bDiscrName);
myjet.btagL = mybtag > m_jet_bDiscrCut_loose;
myjet.btagM = mybtag > m_jet_bDiscrCut_medium;
Expand Down

0 comments on commit 7bb92b7

Please sign in to comment.