- Timestamp:
- Nov 20, 2015, 11:33:36 AM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- b9e210d
- Parents:
- 8e2bc10 (diff), 004aa60 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Isolation.cc
r8e2bc10 r723b77d 153 153 Candidate *candidate, *isolation, *object; 154 154 TObjArray *isolationArray; 155 Double_t sumCharged, sumNeutral, sumAllParticles, sumChargedPU, sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr; 155 Double_t sumCharged, sumNeutral, sumAllParticles, sumChargedPU; 156 Double_t sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr, sum, ratio; 156 157 Int_t counter; 157 158 Double_t eta = 0.0; … … 188 189 189 190 // loop over all input tracks 190 191 191 192 sumNeutral = 0.0; 192 193 sumCharged = 0.0; 193 194 sumChargedPU = 0.0; 194 195 sumAllParticles = 0.0; 195 196 196 197 counter = 0; 197 198 itIsolationArray.Reset(); 198 199 199 200 while((isolation = static_cast<Candidate*>(itIsolationArray.Next()))) 200 201 { … … 205 206 { 206 207 sumAllParticles += isolationMomentum.Pt(); 207 if(isolation->Charge !=0) 208 { 209 208 if(isolation->Charge !=0) 209 { 210 sumCharged += isolationMomentum.Pt(); 210 211 if(isolation->IsRecoPU != 0) sumChargedPU += isolationMomentum.Pt(); 211 } 212 } 212 213 else 213 214 214 { 215 sumNeutral += isolationMomentum.Pt(); 215 216 } 216 217 ++counter; … … 232 233 } 233 234 234 235 sumDBeta = sumCharged + TMath::Max(sumNeutral-0.5*sumChargedPU, 0.0);236 sumRhoCorr = sumCharged + TMath::Max(sumNeutral-TMath::Max(rho, 0.0)*fDeltaRMax*fDeltaRMax*TMath::Pi(),0.0);235 // correct sum for pile-up contamination 236 sumDBeta = sumCharged + TMath::Max(sumNeutral-0.5*sumChargedPU, 0.0); 237 sumRhoCorr = sumCharged + TMath::Max(sumNeutral-TMath::Max(rho, 0.0)*fDeltaRMax*fDeltaRMax*TMath::Pi(), 0.0); 237 238 ratioDBeta = sumDBeta/candidateMomentum.Pt(); 238 239 ratioRhoCorr = sumRhoCorr/candidateMomentum.Pt(); 239 240 240 241 candidate->IsolationVar = ratioDBeta; 241 242 candidate->IsolationVarRhoCorr = ratioRhoCorr; … … 245 246 candidate->SumPt = sumAllParticles; 246 247 247 if((fUsePTSum && sumRhoCorr > fPTSumMax) || (!fUsePTSum && ratioRhoCorr > fPTRatioMax)) continue; 248 sum = fRhoInputArray ? sumRhoCorr : sumDBeta; 249 if(fUsePTSum && sum > fPTSumMax) continue; 250 251 ratio = fRhoInputArray ? ratioRhoCorr : ratioDBeta; 252 if(!fUsePTSum && ratio > fPTRatioMax) continue; 253 248 254 fOutputArray->Add(candidate); 249 255 }
Note:
See TracChangeset
for help on using the changeset viewer.