Skip to content

Commit

Permalink
Inverting the storage of idxs and ilep1 ilep2
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierBondu committed Oct 21, 2015
1 parent 40af7ae commit 787c3a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions interface/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ namespace HH {
};
struct Dilepton {
LorentzVector p4;
std::pair<unsigned int, unsigned int> idxs; // indices in the collection of HH::Lepton
unsigned int ilep1; // index in the corresponding framework collection
unsigned int ilep2; // index in the corresponding framework collection
std::pair<unsigned int, unsigned int> idxs; // indices in the corresponding framework collection
unsigned int ilep1; // index in the HH::Lepton collection
unsigned int ilep2; // index in the HH::Lepton collection
std::pair<int8_t, int8_t> hlt_idxs = std::make_pair(-1,-1); // Stores indices of matched online objects. (-1,-1) if no match
bool isOS; // Opposite Sign
bool isMuMu;
Expand Down Expand Up @@ -73,8 +73,8 @@ namespace HH {
};
struct Dijet {
LorentzVector p4;
std::pair<unsigned int, unsigned int> idxs; // indices in the collection of HH::Jet
unsigned int ijet1; // indices in the framework collection
std::pair<unsigned int, unsigned int> idxs; // indices in the framework collection
unsigned int ijet1; // indices in the HH::Jet collection
unsigned int ijet2;
bool btag_LL;
bool btag_LM;
Expand Down
12 changes: 6 additions & 6 deletions plugins/HHAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
{
HH::Dilepton dilep;
dilep.p4 = leptons[ilep1].p4 + leptons[ilep2].p4;
dilep.idxs = std::make_pair(ilep1, ilep2);
dilep.ilep1 = leptons[ilep1].idx;
dilep.ilep2 = leptons[ilep2].idx;
dilep.idxs = std::make_pair(leptons[ilep1].idx, leptons[ilep2].idx);
dilep.ilep1 = ilep1;
dilep.ilep2 = ilep2;
dilep.isOS = leptons[ilep1].charge * leptons[ilep2].charge < 0;
dilep.isMuMu = leptons[ilep1].isMu && leptons[ilep2].isMu;
dilep.isElEl = leptons[ilep1].isEl && leptons[ilep2].isEl;
Expand Down Expand Up @@ -404,9 +404,9 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
{
HH::Dijet myjj;
myjj.p4 = jets[ijet1].p4 + jets[ijet2].p4;
myjj.idxs = std::make_pair(ijet1, ijet2);
myjj.ijet1 = jets[ijet1].idx;
myjj.ijet2 = jets[ijet2].idx;
myjj.idxs = std::make_pair(jets[ijet1].idx, jets[ijet2].idx);
myjj.ijet1 = ijet1;
myjj.ijet2 = ijet2;
myjj.btag_LL = jets[ijet1].btagL && jets[ijet2].btagL;
myjj.btag_LM = jets[ijet1].btagL && jets[ijet2].btagM;
myjj.btag_LT = jets[ijet1].btagL && jets[ijet2].btagT;
Expand Down

0 comments on commit 787c3a1

Please sign in to comment.