Changeset e9023b9 in git for modules/Isolation.cc
- Timestamp:
- Nov 4, 2013, 1:14:33 PM (11 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 4ad7b96
- Parents:
- e9065e7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Isolation.cc
re9065e7 re9023b9 69 69 Isolation::Isolation() : 70 70 fClassifier(0), fFilter(0), 71 fItIsolationInputArray(0), fItCandidateInputArray(0) 71 fItIsolationInputArray(0), fItCandidateInputArray(0), 72 fItRhoInputArray(0) 72 73 { 73 74 fClassifier = new IsolationClassifier; … … 110 111 { 111 112 fRhoInputArray = ImportArray(rhoInputArrayName); 113 fItRhoInputArray = fRhoInputArray->MakeIterator(); 112 114 } 113 115 else … … 125 127 void Isolation::Finish() 126 128 { 129 if(fItRhoInputArray) delete fItRhoInputArray; 127 130 if(fFilter) delete fFilter; 128 131 if(fItCandidateInputArray) delete fItCandidateInputArray; … … 134 137 void Isolation::Process() 135 138 { 136 Candidate *candidate, *isolation ;139 Candidate *candidate, *isolation, *object; 137 140 TObjArray *isolationArray; 138 141 Double_t sum, ratio; 139 142 Int_t counter; 143 Double_t eta = 0.0; 140 144 Double_t rho = 0.0; 141 145 … … 159 163 { 160 164 const TLorentzVector &candidateMomentum = candidate->Momentum; 165 eta = TMath::Abs(candidateMomentum.Eta()); 161 166 162 167 // loop over all input tracks … … 176 181 } 177 182 183 // find rho 184 rho = 0.0; 185 if(fRhoInputArray) 186 { 187 fItRhoInputArray->Reset(); 188 while((object = static_cast<Candidate*>(fItRhoInputArray->Next()))) 189 { 190 if(eta >= object->Edges[0] && eta < object->Edges[1]) 191 { 192 rho = object->Momentum.Pt(); 193 } 194 } 195 } 196 178 197 // correct sum for pile-up contamination 179 sum = sum - rho*fDeltaRMax*fDeltaRMax*TMath::Pi(); 198 sum = sum - rho*fDeltaRMax*fDeltaRMax*TMath::Pi(); 180 199 181 200 ratio = sum/candidateMomentum.Pt();
Note:
See TracChangeset
for help on using the changeset viewer.