- Timestamp:
- Nov 20, 2015, 2:36:11 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- fdfe022
- Parents:
- 554a3b3 (diff), 7312b4d (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. - Location:
- modules
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Isolation.cc
r554a3b3 r9f38d6a 108 108 109 109 fUsePTSum = GetBool("UsePTSum", false); 110 111 fUseRhoCorrection = GetBool("UseRhoCorrection", true); 110 112 111 113 fClassifier->fPTMin = GetDouble("PTMin", 0.5); … … 153 155 Candidate *candidate, *isolation, *object; 154 156 TObjArray *isolationArray; 155 Double_t sumCharged, sumNeutral, sumAllParticles, sumChargedPU, sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr; 157 Double_t sumChargedNoPU, sumChargedPU, sumNeutral, sumAllParticles; 158 Double_t sumDBeta, ratioDBeta, sumRhoCorr, ratioRhoCorr, sum, ratio; 156 159 Int_t counter; 157 160 Double_t eta = 0.0; … … 188 191 189 192 // loop over all input tracks 190 193 191 194 sumNeutral = 0.0; 192 sumCharged = 0.0;195 sumChargedNoPU = 0.0; 193 196 sumChargedPU = 0.0; 194 197 sumAllParticles = 0.0; 195 198 196 199 counter = 0; 197 200 itIsolationArray.Reset(); 198 201 199 202 while((isolation = static_cast<Candidate*>(itIsolationArray.Next()))) 200 203 { … … 205 208 { 206 209 sumAllParticles += isolationMomentum.Pt(); 207 if(isolation->Charge !=0) 208 { 209 sumCharged += isolationMomentum.Pt(); 210 if(isolation->IsRecoPU != 0) sumChargedPU += isolationMomentum.Pt(); 211 } 210 if(isolation->Charge != 0) 211 { 212 if(isolation->IsRecoPU) 213 { 214 sumChargedPU += isolationMomentum.Pt(); 215 } 216 else 217 { 218 sumChargedNoPU += isolationMomentum.Pt(); 219 } 220 } 212 221 else 213 214 222 { 223 sumNeutral += isolationMomentum.Pt(); 215 224 } 216 225 ++counter; … … 232 241 } 233 242 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);243 // correct sum for pile-up contamination 244 sumDBeta = sumChargedNoPU + TMath::Max(sumNeutral - 0.5*sumChargedPU, 0.0); 245 sumRhoCorr = sumChargedNoPU + TMath::Max(sumNeutral - TMath::Max(rho, 0.0)*fDeltaRMax*fDeltaRMax*TMath::Pi(), 0.0); 237 246 ratioDBeta = sumDBeta/candidateMomentum.Pt(); 238 247 ratioRhoCorr = sumRhoCorr/candidateMomentum.Pt(); 239 248 240 249 candidate->IsolationVar = ratioDBeta; 241 250 candidate->IsolationVarRhoCorr = ratioRhoCorr; 242 candidate->SumPtCharged = sumCharged ;251 candidate->SumPtCharged = sumChargedNoPU; 243 252 candidate->SumPtNeutral = sumNeutral; 244 253 candidate->SumPtChargedPU = sumChargedPU; 245 254 candidate->SumPt = sumAllParticles; 246 255 247 if((fUsePTSum && sumRhoCorr > fPTSumMax) || (!fUsePTSum && ratioRhoCorr > fPTRatioMax)) continue; 256 sum = fUseRhoCorrection ? sumRhoCorr : sumDBeta; 257 if(fUsePTSum && sum > fPTSumMax) continue; 258 259 ratio = fUseRhoCorrection ? ratioRhoCorr : ratioDBeta; 260 if(!fUsePTSum && ratio > fPTRatioMax) continue; 261 248 262 fOutputArray->Add(candidate); 249 263 } -
modules/Isolation.h
r554a3b3 r9f38d6a 59 59 Bool_t fUsePTSum; 60 60 61 Bool_t fUseRhoCorrection; 62 61 63 IsolationClassifier *fClassifier; //! 62 64 -
modules/TrackPileUpSubtractor.cc
r554a3b3 r9f38d6a 67 67 void TrackPileUpSubtractor::Init() 68 68 { 69 // import input array69 // import input array 70 70 71 71 fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices")); 72 72 fItVertexInputArray = fVertexInputArray->MakeIterator(); 73 73 74 74 fZVertexResolution = GetDouble("ZVertexResolution", 0.005)*1.0E3; 75 75 76 76 fPTMin = GetDouble("PTMin", 0.); 77 77 78 // import arrays with output from other modules 78 79 79 80 ExRootConfParam param = GetParam("InputArray"); 80 81 Long_t i, size; … … 119 120 Double_t z, zvtx=0; 120 121 121 122 122 123 // find z position of primary vertex 123 124 124 125 fItVertexInputArray->Reset(); 125 126 while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next()))) … … 127 128 if(!candidate->IsPU) 128 129 { 129 zvtx = candidate->Position.Z();130 // break;130 zvtx = candidate->Position.Z(); 131 // break; 131 132 } 132 133 } … … 144 145 particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0)); 145 146 z = particle->Position.Z(); 146 147 147 148 // apply pile-up subtraction 148 149 // assume perfect pile-up subtraction for tracks outside fZVertexResolution 149 150 if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) candidate->IsRecoPU = 1; 151 else 150 151 if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) 152 152 { 153 candidate->IsRecoPU = 0; 154 if( candidate->Momentum.Pt() > fPTMin) array->Add(candidate); 153 candidate->IsRecoPU = 1; 154 } 155 else 156 { 157 candidate->IsRecoPU = 0; 158 if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate); 155 159 } 156 160 } -
modules/TrackPileUpSubtractor.h
r554a3b3 r9f38d6a 50 50 Double_t fZVertexResolution; 51 51 52 Double_t fPTMin; 52 Double_t fPTMin; 53 53 54 54 std::map< TIterator *, TObjArray * > fInputMap; //!
Note:
See TracChangeset
for help on using the changeset viewer.