Changeset 60e1de6 in git for modules/DenseTrackFilter.cc
- Timestamp:
- Jun 6, 2018, 11:54:55 AM (6 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 5b51d33
- Parents:
- 748ce07
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/DenseTrackFilter.cc
r748ce07 r60e1de6 204 204 // switch to next tower 205 205 towerEtaPhi = hitEtaPhi; 206 206 207 207 // saving track with highest pT that hit the tower 208 208 FillTrack(); … … 213 213 } 214 214 // check for track hits 215 215 216 216 if(flags & 1) 217 217 { … … 220 220 momentum = track->Momentum; 221 221 222 if (momentum.Pt() > ptmax)222 if(momentum.Pt() > ptmax) 223 223 { 224 224 ptmax = momentum.Pt(); 225 225 fBestTrack = track; 226 226 } 227 227 continue; 228 228 } 229 230 } 231 229 230 } 231 232 232 // here fill last tower 233 233 FillTrack(); 234 235 } 236 237 234 235 } 238 236 239 237 //------------------------------------------------------------------------------ … … 241 239 void DenseTrackFilter::FillTrack() 242 240 { 243 244 Candidate *candidate, *track , *mother, *trackRef, *bestTrackRef;241 242 Candidate *candidate, *track; 245 243 Double_t pt, eta, phi; 246 Bool_t matched; 247 244 Int_t numberOfCandidates; 245 246 numberOfCandidates = fBestTrack->GetCandidates()->GetEntriesFast(); 247 248 248 // saving track with highest pT that hit the tower 249 if(fTowerTrackHits > 0) 250 { 251 bestTrackRef = static_cast<Candidate*>(fBestTrack->GetCandidates()->At(0)); 252 253 // find corresponding track in properly propagated tracks 254 fItTrackInputArray->Reset(); 255 matched = kFALSE; 256 int ntrack = 0; 257 while((track = static_cast<Candidate*>(fItTrackInputArray->Next()))) 258 { 259 ntrack++; 260 trackRef = static_cast<Candidate*>(track->GetCandidates()->At(0)); 261 262 if (trackRef->GetUniqueID() == bestTrackRef->GetUniqueID()) 263 { 264 mother = track; 265 candidate = static_cast<Candidate*>(track->Clone()); 266 pt = candidate->Momentum.Pt(); 267 eta = candidate->Momentum.Eta(); 268 phi = candidate->Momentum.Phi(); 269 eta = gRandom->Gaus(eta, fEtaPhiRes); 270 phi = gRandom->Gaus(phi, fEtaPhiRes); 271 candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta)); 272 candidate->AddCandidate(mother); 273 fTrackOutputArray->Add(candidate); 274 matched = kTRUE; 275 } 276 if (matched) break; 277 } 278 } 279 280 281 } 249 if(fTowerTrackHits > 0 && numberOfCandidates > 1) 250 { 251 track = static_cast<Candidate*>(fBestTrack->GetCandidates()->At(numberOfCandidates - 2)); 252 candidate = static_cast<Candidate*>(track->Clone()); 253 pt = candidate->Momentum.Pt(); 254 eta = candidate->Momentum.Eta(); 255 phi = candidate->Momentum.Phi(); 256 eta = gRandom->Gaus(eta, fEtaPhiRes); 257 phi = gRandom->Gaus(phi, fEtaPhiRes); 258 candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta)); 259 candidate->AddCandidate(track); 260 fTrackOutputArray->Add(candidate); 261 } 262 }
Note:
See TracChangeset
for help on using the changeset viewer.