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