Skip to content

Commit

Permalink
Merge pull request #55 from swertz/fixDileptons
Browse files Browse the repository at this point in the history
Removed dileptons_ prefix everywhere
  • Loading branch information
blinkseb committed Sep 16, 2015
2 parents 8736bee + a6605e0 commit db126a9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
16 changes: 8 additions & 8 deletions src/DileptonAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ void DileptonAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&,
if(passID(muons, jmuon) && muons.charge[imuon] * muons.charge[jmuon] < 0 )
{
LorentzVector dimuon = muons.p4[imuon] + muons.p4[jmuon];
dileptons_mumu.push_back(dimuon);
dileptons_mumu_indices.push_back(std::make_pair(imuon, jmuon));
mumu.push_back(dimuon);
mumu_indices.push_back(std::make_pair(imuon, jmuon));
}
}
}
Expand All @@ -76,8 +76,8 @@ void DileptonAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&,
if(passID(electrons, jelectron) && electrons.charge[ielectron] * electrons.charge[jelectron] < 0 )
{
LorentzVector dielectron = electrons.p4[ielectron] + electrons.p4[jelectron];
dileptons_elel.push_back(dielectron);
dileptons_elel_indices.push_back(std::make_pair(ielectron, jelectron));
elel.push_back(dielectron);
elel_indices.push_back(std::make_pair(ielectron, jelectron));
}
}
}
Expand All @@ -95,8 +95,8 @@ void DileptonAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&,
electrons.charge[ielectron] * muons.charge[jmuon] < 0 )
{
LorentzVector dilepton = electrons.p4[ielectron] + muons.p4[jmuon];
dileptons_elmu.push_back(dilepton);
dileptons_elmu_indices.push_back(std::make_pair(ielectron, jmuon));
elmu.push_back(dilepton);
elmu_indices.push_back(std::make_pair(ielectron, jmuon));
}
}
}
Expand All @@ -114,8 +114,8 @@ void DileptonAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&,
muons.charge[imuon] * electrons.charge[jelectron] < 0 )
{
LorentzVector dilepton = muons.p4[imuon] + electrons.p4[jelectron];
dileptons_muel.push_back(dilepton);
dileptons_muel_indices.push_back(std::make_pair(imuon, jelectron));
muel.push_back(dilepton);
muel_indices.push_back(std::make_pair(imuon, jelectron));
}
}
}
Expand Down
24 changes: 12 additions & 12 deletions src/DileptonCategories.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bool MuMuCategory::event_in_category_pre_analyzers(const ProducersManager& produ

bool MuMuCategory::event_in_category_post_analyzers(const ProducersManager& producers, const AnalyzersManager& analyzers) const {
const DileptonAnalyzer& dilepton_analyzer = analyzers.get<DileptonAnalyzer>("dilepton");
return dilepton_analyzer.dileptons_mumu.size() > 0;
return dilepton_analyzer.mumu.size() > 0;
};

void MuMuCategory::register_cuts(CutManager& manager) {
Expand All @@ -24,8 +24,8 @@ void MuMuCategory::register_cuts(CutManager& manager) {

void MuMuCategory::evaluate_cuts_post_analyzers(CutManager& manager, const ProducersManager& producers, const AnalyzersManager& analyzers) const {
const DileptonAnalyzer& dilepton_analyzer = analyzers.get<DileptonAnalyzer>("dilepton");
for(unsigned int idilepton = 0; idilepton < dilepton_analyzer.dileptons_mumu.size(); idilepton++)
if( dilepton_analyzer.dileptons_mumu[idilepton].M() > m_mll_cut)
for(unsigned int idilepton = 0; idilepton < dilepton_analyzer.mumu.size(); idilepton++)
if( dilepton_analyzer.mumu[idilepton].M() > m_mll_cut)
{
manager.pass_cut("ll_mass");
break;
Expand All @@ -43,7 +43,7 @@ bool MuElCategory::event_in_category_pre_analyzers(const ProducersManager& produ

bool MuElCategory::event_in_category_post_analyzers(const ProducersManager& producers, const AnalyzersManager& analyzers) const {
const DileptonAnalyzer& dilepton_analyzer = analyzers.get<DileptonAnalyzer>("dilepton");
return dilepton_analyzer.dileptons_muel.size() > 0;
return dilepton_analyzer.muel.size() > 0;
};

void MuElCategory::register_cuts(CutManager& manager) {
Expand All @@ -52,8 +52,8 @@ void MuElCategory::register_cuts(CutManager& manager) {

void MuElCategory::evaluate_cuts_post_analyzers(CutManager& manager, const ProducersManager& producers, const AnalyzersManager& analyzers) const {
const DileptonAnalyzer& dilepton_analyzer = analyzers.get<DileptonAnalyzer>("dilepton");
for(unsigned int idilepton = 0; idilepton < dilepton_analyzer.dileptons_muel.size(); idilepton++)
if( dilepton_analyzer.dileptons_muel[idilepton].M() > m_mll_cut)
for(unsigned int idilepton = 0; idilepton < dilepton_analyzer.muel.size(); idilepton++)
if( dilepton_analyzer.muel[idilepton].M() > m_mll_cut)
{
manager.pass_cut("ll_mass");
break;
Expand All @@ -71,7 +71,7 @@ bool ElMuCategory::event_in_category_pre_analyzers(const ProducersManager& produ

bool ElMuCategory::event_in_category_post_analyzers(const ProducersManager& producers, const AnalyzersManager& analyzers) const {
const DileptonAnalyzer& dilepton_analyzer = analyzers.get<DileptonAnalyzer>("dilepton");
return dilepton_analyzer.dileptons_elmu.size() > 0;
return dilepton_analyzer.elmu.size() > 0;
};

void ElMuCategory::register_cuts(CutManager& manager) {
Expand All @@ -80,8 +80,8 @@ void ElMuCategory::register_cuts(CutManager& manager) {

void ElMuCategory::evaluate_cuts_post_analyzers(CutManager& manager, const ProducersManager& producers, const AnalyzersManager& analyzers) const {
const DileptonAnalyzer& dilepton_analyzer = analyzers.get<DileptonAnalyzer>("dilepton");
for(unsigned int idilepton = 0; idilepton < dilepton_analyzer.dileptons_elmu.size(); idilepton++)
if( dilepton_analyzer.dileptons_elmu[idilepton].M() > m_mll_cut)
for(unsigned int idilepton = 0; idilepton < dilepton_analyzer.elmu.size(); idilepton++)
if( dilepton_analyzer.elmu[idilepton].M() > m_mll_cut)
{
manager.pass_cut("ll_mass");
break;
Expand All @@ -98,7 +98,7 @@ bool ElElCategory::event_in_category_pre_analyzers(const ProducersManager& produ

bool ElElCategory::event_in_category_post_analyzers(const ProducersManager& producers, const AnalyzersManager& analyzers) const {
const DileptonAnalyzer& dilepton_analyzer = analyzers.get<DileptonAnalyzer>("dilepton");
return dilepton_analyzer.dileptons_elel.size() > 0;
return dilepton_analyzer.elel.size() > 0;
};

void ElElCategory::register_cuts(CutManager& manager) {
Expand All @@ -107,8 +107,8 @@ void ElElCategory::register_cuts(CutManager& manager) {

void ElElCategory::evaluate_cuts_post_analyzers(CutManager& manager, const ProducersManager& producers, const AnalyzersManager& analyzers) const {
const DileptonAnalyzer& dilepton_analyzer = analyzers.get<DileptonAnalyzer>("dilepton");
for(unsigned int idilepton = 0; idilepton < dilepton_analyzer.dileptons_elel.size(); idilepton++)
if( dilepton_analyzer.dileptons_elel[idilepton].M() > m_mll_cut)
for(unsigned int idilepton = 0; idilepton < dilepton_analyzer.elel.size(); idilepton++)
if( dilepton_analyzer.elel[idilepton].M() > m_mll_cut)
{
manager.pass_cut("ll_mass");
break;
Expand Down

0 comments on commit db126a9

Please sign in to comment.