Skip to content

Commit

Permalink
Merge pull request #128 from blinkseb/fill_branches_fix
Browse files Browse the repository at this point in the history
Ensure all branches are created during the first event
  • Loading branch information
swertz authored Feb 13, 2017
2 parents be29108 + 1bd6c59 commit b2467c9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
16 changes: 15 additions & 1 deletion interface/HHAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class HHAnalyzer: public Framework::Analyzer {
//// October 2016: adding some asymmetric btag candidates, for study
//BRANCH(llmetjj_HWWleptons_btagLM_cmva, std::vector<HH::DileptonMetDijet>);
//BRANCH(llmetjj_HWWleptons_btagMT_cmva, std::vector<HH::DileptonMetDijet>);

BRANCH(llmetjj, std::vector<HH::DileptonMetDijet>);

virtual void analyze(const edm::Event&, const edm::EventSetup&, const ProducersManager&, const AnalyzersManager&, const CategoryManager&) override;
Expand Down Expand Up @@ -208,6 +208,20 @@ class HHAnalyzer: public Framework::Analyzer {
ONLY_NOMINAL_BRANCH(gen_Nu1, LorentzVector);
ONLY_NOMINAL_BRANCH(gen_Nu2, LorentzVector);

ONLY_NOMINAL_BRANCH(gen_deltaR_jet_B, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_jet_Bbar, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_jet_B_afterFSR, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_jet_Bbar_afterFSR, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_electron_L1, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_electron_L2, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_electron_L1_afterFSR, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_electron_L2_afterFSR, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_muon_L1, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_muon_L2, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_muon_L1_afterFSR, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_muon_L2_afterFSR, std::vector<float>);


private:
// Producers name
std::string m_electrons_producer;
Expand Down
13 changes: 0 additions & 13 deletions plugins/HHAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,19 +265,6 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
// ***** ***** *****
// Matching
// ***** ***** *****
ONLY_NOMINAL_BRANCH(gen_deltaR_jet_B, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_jet_Bbar, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_jet_B_afterFSR, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_jet_Bbar_afterFSR, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_electron_L1, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_electron_L2, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_electron_L1_afterFSR, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_electron_L2_afterFSR, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_muon_L1, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_muon_L2, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_muon_L1_afterFSR, std::vector<float>);
ONLY_NOMINAL_BRANCH(gen_deltaR_muon_L2_afterFSR, std::vector<float>);

for (auto p4: alljets.gen_p4) {
gen_deltaR_jet_B.push_back(deltaR(p4, gen_B));
gen_deltaR_jet_Bbar.push_back(deltaR(p4, gen_Bbar));
Expand Down

0 comments on commit b2467c9

Please sign in to comment.