Changeset 341014c in git for modules/IdentificationMap.cc
- Timestamp:
- Feb 12, 2019, 9:29:17 PM (6 years ago)
- Branches:
- ImprovedOutputFile, Timing, llp, master
- Children:
- 6455202
- Parents:
- 45e58be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/IdentificationMap.cc
r45e58be r341014c 17 17 */ 18 18 19 20 19 /** \class IdentificationMap 21 20 * … … 33 32 #include "classes/DelphesFormula.h" 34 33 34 #include "ExRootAnalysis/ExRootClassifier.h" 35 #include "ExRootAnalysis/ExRootFilter.h" 35 36 #include "ExRootAnalysis/ExRootResult.h" 36 #include "ExRootAnalysis/ExRootFilter.h"37 #include "ExRootAnalysis/ExRootClassifier.h"38 37 38 #include "TDatabasePDG.h" 39 #include "TFormula.h" 40 #include "TLorentzVector.h" 39 41 #include "TMath.h" 42 #include "TObjArray.h" 43 #include "TRandom3.h" 40 44 #include "TString.h" 41 #include "TFormula.h"42 #include "TRandom3.h"43 #include "TObjArray.h"44 #include "TDatabasePDG.h"45 #include "TLorentzVector.h"46 45 47 46 #include <algorithm> 48 #include <stdexcept>49 47 #include <iostream> 50 48 #include <sstream> 49 #include <stdexcept> 51 50 52 51 using namespace std; … … 79 78 80 79 fEfficiencyMap.clear(); 81 for(i = 0; i < size /3; ++i)80 for(i = 0; i < size / 3; ++i) 82 81 { 83 82 formula = new DelphesFormula; 84 formula->Compile(param[i *3 + 2].GetString());85 pdg = param[i *3].GetInt();86 fEfficiencyMap.insert(make_pair(pdg, make_pair(param[i *3 + 1].GetInt(), formula)));83 formula->Compile(param[i * 3 + 2].GetString()); 84 pdg = param[i * 3].GetInt(); 85 fEfficiencyMap.insert(make_pair(pdg, make_pair(param[i * 3 + 1].GetInt(), formula))); 87 86 } 88 87 … … 129 128 Double_t pt, eta, phi, e; 130 129 TMisIDMap::iterator itEfficiencyMap; 131 pair 130 pair<TMisIDMap::iterator, TMisIDMap::iterator> range; 132 131 DelphesFormula *formula; 133 132 Int_t pdgCodeIn, pdgCodeOut, charge; … … 136 135 137 136 fItInputArray->Reset(); 138 while((candidate = static_cast<Candidate *>(fItInputArray->Next())))137 while((candidate = static_cast<Candidate *>(fItInputArray->Next()))) 139 138 { 140 139 const TLorentzVector &candidatePosition = candidate->Position; … … 144 143 pt = candidateMomentum.Pt(); 145 144 e = candidateMomentum.E(); 146 145 147 146 pdgCodeIn = candidate->PID; 148 147 charge = candidate->Charge; … … 171 170 { 172 171 // change PID of particle 173 if(pdgCodeOut != 0) candidate->PID = charge *pdgCodeOut;172 if(pdgCodeOut != 0) candidate->PID = charge * pdgCodeOut; 174 173 fOutputArray->Add(candidate); 175 174 break;
Note:
See TracChangeset
for help on using the changeset viewer.