Changes in modules/JetFakeParticle.cc [341014c:410f3a2] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/JetFakeParticle.cc
r341014c r410f3a2 17 17 */ 18 18 19 19 20 /** \class JetFakeParticle 20 21 * … … 32 33 #include "classes/DelphesFormula.h" 33 34 35 #include "ExRootAnalysis/ExRootResult.h" 36 #include "ExRootAnalysis/ExRootFilter.h" 34 37 #include "ExRootAnalysis/ExRootClassifier.h" 35 #include "ExRootAnalysis/ExRootFilter.h" 36 #include "ExRootAnalysis/ExRootResult.h" 37 38 39 #include "TMath.h" 40 #include "TString.h" 41 #include "TFormula.h" 42 #include "TRandom3.h" 43 #include "TObjArray.h" 38 44 #include "TDatabasePDG.h" 39 #include "TFormula.h"40 45 #include "TLorentzVector.h" 41 #include "TMath.h"42 #include "TObjArray.h"43 #include "TRandom3.h"44 #include "TString.h"45 46 46 47 #include <algorithm> 48 #include <stdexcept> 47 49 #include <iostream> 48 50 #include <sstream> 49 #include <stdexcept> 51 50 52 51 53 using namespace std; … … 79 81 fEfficiencyMap.clear(); 80 82 81 for(i = 0; i < size /2; ++i)83 for(i = 0; i < size/2; ++i) 82 84 { 83 85 formula = new DelphesFormula; 84 formula->Compile(param[i *2 + 1].GetString());85 pdgCode = param[i *2].GetInt();86 formula->Compile(param[i*2 + 1].GetString()); 87 pdgCode = param[i*2].GetInt(); 86 88 87 89 if(TMath::Abs(pdgCode) != 11 && TMath::Abs(pdgCode) != 13 && TMath::Abs(pdgCode) != 22) … … 90 92 } 91 93 92 fEfficiencyMap[param[i *2].GetInt()] = formula;94 fEfficiencyMap[param[i*2].GetInt()] = formula; 93 95 } 94 96 … … 114 116 fPhotonOutputArray = ExportArray(GetString("PhotonOutputArray", "fakePhotons")); 115 117 fJetOutputArray = ExportArray(GetString("JetOutputArray", "jets")); 118 116 119 } 117 120 … … 144 147 145 148 fItInputArray->Reset(); 146 while((candidate = static_cast<Candidate 149 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 147 150 { 148 151 const TLorentzVector &candidatePosition = candidate->Position; … … 167 170 if(total <= r && r < total + p) 168 171 { 169 fake = static_cast<Candidate 172 fake = static_cast<Candidate*>(candidate->Clone()); 170 173 171 174 // convert jet … … 175 178 if(candidate->Charge != 0) 176 179 { 177 fake->Charge = candidate->Charge /TMath::Abs(candidate->Charge);180 fake->Charge = candidate->Charge/TMath::Abs(candidate->Charge); 178 181 } 179 182 else … … 181 184 rs = gRandom->Uniform(); 182 185 fake->Charge = (rs < 0.5) ? -1 : 1; 186 183 187 } 184 188 }
Note:
See TracChangeset
for help on using the changeset viewer.