diff --git a/interface/HHAnalyzer.h b/interface/HHAnalyzer.h index 7f7823c..40cda75 100644 --- a/interface/HHAnalyzer.h +++ b/interface/HHAnalyzer.h @@ -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; diff --git a/plugins/Categories.cc b/plugins/Categories.cc index 16d5491..7d6eed0 100644 --- a/plugins/Categories.cc +++ b/plugins/Categories.cc @@ -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("hh_analyzer"); - return hh_analyzer.nBJets; + return hh_analyzer.nBJetsM; } // ***** ***** ***** @@ -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*"); }; diff --git a/plugins/HHAnalyzer.cc b/plugins/HHAnalyzer.cc index 009fe8c..f669f77 100644 --- a/plugins/HHAnalyzer.cc +++ b/plugins/HHAnalyzer.cc @@ -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++; + } + }