Changeset 7f9ae0a in git
- Timestamp:
- Jan 26, 2015, 2:34:50 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- b62c2da
- Parents:
- e2d3977
- Location:
- modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Isolation.cc
re2d3977 r7f9ae0a 25 25 * the transverse momenta fraction within (PTRatioMin, PTRatioMax]. 26 26 * 27 * \author P. Demin - UCL, Louvain-la-Neuve27 * \author P. Demin, M. Selvaggi, R. Gerosa - UCL, Louvain-la-Neuve 28 28 * 29 29 */ … … 109 109 fUsePTSum = GetBool("UsePTSum", false); 110 110 111 fVetoLeptons = GetBool("VetoLeptons", true); 112 111 113 fClassifier->fPTMin = GetDouble("PTMin", 0.5); 114 112 115 113 116 // import input array(s) … … 153 156 Candidate *candidate, *isolation, *object; 154 157 TObjArray *isolationArray; 155 Double_t sum , ratio;158 Double_t sumCharged, sumNeutral, sumAllParticles, sumChargedPU, sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr; 156 159 Int_t counter; 157 160 Double_t eta = 0.0; … … 180 183 181 184 // loop over all input tracks 182 sum = 0.0; 185 186 sumCharged = 0.0; 187 sumChargedPU = 0.0; 188 sumAllParticles = 0.0; 189 183 190 counter = 0; 184 191 itIsolationArray.Reset(); 192 185 193 while((isolation = static_cast<Candidate*>(itIsolationArray.Next()))) 186 194 { … … 188 196 189 197 if(candidateMomentum.DeltaR(isolationMomentum) <= fDeltaRMax && 190 candidate->GetUniqueID() != isolation->GetUniqueID()) 198 candidate->GetUniqueID() != isolation->GetUniqueID() && 199 ( !fVetoLeptons || (TMath::Abs(candidate->PID) != 11 && (TMath::Abs(candidate->PID) != 13)) ) ) 191 200 { 192 sum += isolationMomentum.Pt(); 201 202 sumAllParticles += isolationMomentum.Pt(); 203 if(isolation->Charge !=0) 204 { 205 sumCharged += isolationMomentum.Pt(); 206 if(isolation->IsRecoPU != 0) sumChargedPU += isolationMomentum.Pt(); 207 } 208 209 else sumNeutral += isolationMomentum.Pt(); 210 193 211 ++counter; 194 212 } … … 209 227 } 210 228 211 // correct sum for pile-up contamination 212 sum = sum - rho*fDeltaRMax*fDeltaRMax*TMath::Pi(); 213 214 ratio = sum/candidateMomentum.Pt(); 215 if((fUsePTSum && sum > fPTSumMax) || ratio > fPTRatioMax) continue; 216 229 230 // correct sum for pile-up contamination 231 sumDBeta = sumCharged + TMath::Max(sumNeutral-0.5*sumChargedPU,0.0); 232 sumRhoCorr = sumCharged + TMath::Max(sumNeutral-TMath::Max(rho,0.0)*fDeltaRMax*fDeltaRMax*TMath::Pi(),0.0); 233 ratioDBeta = sumDBeta/candidateMomentum.Pt(); 234 ratioRhoCorr = sumRhoCorr/candidateMomentum.Pt(); 235 236 candidate->IsolationVarDBeta = ratioDBeta; 237 candidate->IsolationVarRhoCorr = ratioRhoCorr; 238 candidate->chargedEnergy = sumChargedHadron; 239 candidate->neutralEnergy = sumNeutral; 240 candidate->chargedPUEnergy = sumChargedPU; 241 candidate->allParticleEnergy = sumAllParticles; 242 243 if((fUsePTSum && sumDBeta > fPTSumMax) || ratioDBeta > fPTRatioMax) continue; 217 244 fOutputArray->Add(candidate); 218 245 } -
modules/Isolation.h
re2d3977 r7f9ae0a 59 59 Bool_t fUsePTSum; 60 60 61 Bool_t fVetoLeptons; 62 61 63 IsolationClassifier *fClassifier; //! 62 64
Note:
See TracChangeset
for help on using the changeset viewer.