Skip to content

Commit

Permalink
Merge pull request #57 from OlivierBondu/bjet_multiplicity
Browse files Browse the repository at this point in the history
Bjet multiplicity
  • Loading branch information
BrieucF committed Nov 19, 2015
2 parents 693e415 + 805977b commit 5181174
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 5 deletions.
11 changes: 10 additions & 1 deletion interface/HHAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,19 @@ class HHAnalyzer: public Framework::Analyzer {

// global event stuff (selected objects multiplicity)
BRANCH(nJets, unsigned int);
BRANCH(nBJets, unsigned int);
BRANCH(nJetsL, unsigned int);
BRANCH(nBJetsL, unsigned int);
BRANCH(nBJetsM, unsigned int);
BRANCH(nBJetsT, unsigned int);
BRANCH(nMuons, unsigned int);
BRANCH(nMuonsL, unsigned int);
BRANCH(nMuonsT, unsigned int);
BRANCH(nElectrons, unsigned int);
BRANCH(nElectronsL, unsigned int);
BRANCH(nElectronsT, unsigned int);
BRANCH(nLeptons, unsigned int);
BRANCH(nLeptonsL, unsigned int);
BRANCH(nLeptonsT, unsigned int);

float m_electronIsoCut_EB_Loose, m_electronIsoCut_EE_Loose, m_electronIsoCut_EB_Tight, m_electronIsoCut_EE_Tight, m_electronEtaCut, m_leadingElectronPtCut, m_subleadingElectronPtCut;
float m_muonLooseIsoCut, m_muonTightIsoCut, m_muonEtaCut, m_leadingMuonPtCut, m_subleadingMuonPtCut;
Expand Down
4 changes: 2 additions & 2 deletions plugins/Categories.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const unsigned int DileptonCategory::getNJets(const AnalyzersManager& analyzers)

const unsigned int DileptonCategory::getNBJets(const AnalyzersManager& analyzers) const {
const HHAnalyzer& hh_analyzer = analyzers.get<HHAnalyzer>("hh_analyzer");
return hh_analyzer.nBJets;
return hh_analyzer.nBJetsM;
}

// ***** ***** *****
Expand All @@ -55,7 +55,7 @@ bool MuMuCategory::event_in_category_post_analyzers(const ProducersManager& prod
void MuMuCategory::register_cuts(CutManager& manager) {
manager.new_cut("ll_mass", "mll > 20");
manager.new_cut("ll_mass_lowerZcut", "mll > 85");
manager.new_cut("has_two_bJets", "nBJet >= 2");
manager.new_cut("has_two_bJets", "nBJetM >= 2");
manager.new_cut("fire_trigger_Mu17_Mu8", "HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_v*");
manager.new_cut("fire_trigger_Mu17_TkMu8", "HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_DZ_v*");
};
Expand Down
42 changes: 40 additions & 2 deletions plugins/HHAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -882,13 +882,51 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
// Event variables
// ***** ***** *****
nJets = jets.size();
nBJets = 0;
nJetsL = 0;
for (unsigned int ijet = 0; ijet < jets.size(); ijet++)
if (jets[ijet].id_L)
nJetsL++;
nBJetsL = 0;
nBJetsM = 0;
nBJetsT = 0;
for (unsigned int ijet = 0; ijet < jets.size(); ijet++)
{
if (!jets[ijet].id_L) continue;
if (jets[ijet].btag_L)
nBJetsL++;
if (jets[ijet].btag_M)
nBJets++;
nBJetsM++;
if (jets[ijet].btag_T)
nBJetsT++;
}
nMuons = muons.size();
nMuonsL = 0;
nMuonsT = 0;
nElectrons = electrons.size();
nElectronsL = 0;
nElectronsT = 0;
nLeptons = leptons.size();
nLeptonsL = 0;
nLeptonsT = 0;
for (unsigned int ilepton = 0; ilepton < leptons.size(); ilepton++)
{
if (leptons[ilepton].id_L && leptons[ilepton].iso_L)
{
nLeptonsL++;
if (leptons[ilepton].isMu)
nMuonsL++;
if (leptons[ilepton].isEl)
nElectronsL++;
}
if (leptons[ilepton].id_T && leptons[ilepton].iso_T)
{
nLeptonsT++;
if (leptons[ilepton].isMu)
nMuonsT++;
if (leptons[ilepton].isEl)
nElectronsT++;
}
}



Expand Down

0 comments on commit 5181174

Please sign in to comment.