- Timestamp:
- Nov 4, 2013, 1:14:33 PM (11 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 4ad7b96
- Parents:
- e9065e7
- Location:
- modules
- Files:
-
- 3 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(); -
modules/Isolation.h
re9065e7 re9023b9 53 53 TIterator *fItCandidateInputArray; //! 54 54 55 TIterator *fItRhoInputArray; //! 56 55 57 const TObjArray *fIsolationInputArray; //! 56 58 -
modules/JetPileUpSubtractor.cc
re9065e7 re9023b9 83 83 void JetPileUpSubtractor::Process() 84 84 { 85 Candidate *candidate ;85 Candidate *candidate, *object; 86 86 TLorentzVector momentum, area; 87 87 Double_t eta = 0.0; 88 88 Double_t rho = 0.0; 89 90 if(!fRhoInputArray) return;91 89 92 90 // loop over all input candidates … … 100 98 // find rho 101 99 rho = 0.0; 102 while((candidate = static_cast<Candidate*>(fItRhoInputArray->Next())))100 if(fRhoInputArray) 103 101 { 104 if(eta >= candidate->Edges[0] && eta < candidate->Edges[1]) 102 fItRhoInputArray->Reset(); 103 while((object = static_cast<Candidate*>(fItRhoInputArray->Next()))) 105 104 { 106 rho = candidate->Momentum.Pt(); 105 if(eta >= object->Edges[0] && eta < object->Edges[1]) 106 { 107 rho = object->Momentum.Pt(); 108 } 107 109 } 108 } 110 } 109 111 110 112 // apply pile-up correction … … 112 114 113 115 momentum -= rho * area; 114 116 115 117 if(momentum.Pt() <= fJetPTMin) continue; 116 118
Note:
See TracChangeset
for help on using the changeset viewer.