Changes in modules/Isolation.cc [3db5282:df35033] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Isolation.cc
r3db5282 rdf35033 25 25 * the transverse momenta fraction within (PTRatioMin, PTRatioMax]. 26 26 * 27 * \author P. Demin , M. Selvaggi, R. Gerosa- UCL, Louvain-la-Neuve27 * \author P. Demin - UCL, Louvain-la-Neuve 28 28 * 29 29 */ … … 109 109 fUsePTSum = GetBool("UsePTSum", false); 110 110 111 fVetoLeptons = GetBool("VetoLeptons", true);112 113 111 fClassifier->fPTMin = GetDouble("PTMin", 0.5); 114 115 112 116 113 // import input array(s) … … 156 153 Candidate *candidate, *isolation, *object; 157 154 TObjArray *isolationArray; 158 Double_t sum Charged, sumNeutral, sumAllParticles, sumChargedPU, sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr;155 Double_t sum, ratio; 159 156 Int_t counter; 160 157 Double_t eta = 0.0; … … 183 180 184 181 // loop over all input tracks 185 186 sumNeutral = 0.0; 187 sumCharged = 0.0; 188 sumChargedPU = 0.0; 189 sumAllParticles = 0.0; 190 182 sum = 0.0; 191 183 counter = 0; 192 184 itIsolationArray.Reset(); 193 194 185 while((isolation = static_cast<Candidate*>(itIsolationArray.Next()))) 195 186 { … … 197 188 198 189 if(candidateMomentum.DeltaR(isolationMomentum) <= fDeltaRMax && 199 candidate->GetUniqueID() != isolation->GetUniqueID() && 200 ( !fVetoLeptons || (TMath::Abs(candidate->PID) != 11 && (TMath::Abs(candidate->PID) != 13)) ) ) 190 candidate->GetUniqueID() != isolation->GetUniqueID()) 201 191 { 202 203 sumAllParticles += isolationMomentum.Pt(); 204 if(isolation->Charge !=0) 205 { 206 sumCharged += isolationMomentum.Pt(); 207 if(isolation->IsRecoPU != 0) sumChargedPU += isolationMomentum.Pt(); 208 } 209 210 else sumNeutral += isolationMomentum.Pt(); 211 192 sum += isolationMomentum.Pt(); 212 193 ++counter; 213 194 } … … 228 209 } 229 210 230 231 // correct sum for pile-up contamination 232 sumDBeta = sumCharged + TMath::Max(sumNeutral-0.5*sumChargedPU,0.0); 233 sumRhoCorr = sumCharged + TMath::Max(sumNeutral-TMath::Max(rho,0.0)*fDeltaRMax*fDeltaRMax*TMath::Pi(),0.0); 234 ratioDBeta = sumDBeta/candidateMomentum.Pt(); 235 ratioRhoCorr = sumRhoCorr/candidateMomentum.Pt(); 236 237 candidate->IsolationVar = ratioDBeta; 238 candidate->IsolationVarRhoCorr = ratioRhoCorr; 239 candidate->SumPtCharged = sumCharged; 240 candidate->SumPtNeutral = sumNeutral; 241 candidate->SumPtChargedPU = sumChargedPU; 242 candidate->SumPt = sumAllParticles; 243 244 if((fUsePTSum && sumDBeta > fPTSumMax) || ratioDBeta > fPTRatioMax) continue; 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 245 217 fOutputArray->Add(candidate); 246 218 }
Note:
See TracChangeset
for help on using the changeset viewer.