- Timestamp:
- Jan 12, 2018, 5:43:01 PM (7 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 3037765
- Parents:
- ae061c1 (diff), 1f7223c (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:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/DenseTrackFilter.cc
rae061c1 r5a69ba1d 54 54 55 55 DenseTrackFilter::DenseTrackFilter() : 56 fItTrackInputArray(0) 56 fItTrackInputArray(0), fItDenseChargedInputArray(0) 57 57 { 58 58 } … … 111 111 112 112 // Eta x Phi smearing to be applied 113 fEtaPhiRes = GetDouble("EtaPhiRes", 0.00 5);114 115 fTrackInputArray = ImportArray(GetString("TrackInputArray", " ParticlePropagator/tracks"));113 fEtaPhiRes = GetDouble("EtaPhiRes", 0.003); 114 115 fTrackInputArray = ImportArray(GetString("TrackInputArray", "TrackMergerProp/tracks")); 116 116 fItTrackInputArray = fTrackInputArray->MakeIterator(); 117 118 fDenseChargedInputArray = ImportArray(GetString("DenseChargedInputArray", "DenseMergeTracks/tracks")); 119 fItDenseChargedInputArray = fDenseChargedInputArray->MakeIterator(); 117 120 118 121 fTrackOutputArray = ExportArray(GetString("TrackOutputArray", "tracks")); … … 125 128 vector< vector< Double_t >* >::iterator itPhiBin; 126 129 if(fItTrackInputArray) delete fItTrackInputArray; 130 if(fItDenseChargedInputArray) delete fItDenseChargedInputArray; 127 131 for(itPhiBin = fPhiBins.begin(); itPhiBin != fPhiBins.end(); ++itPhiBin) 128 132 { … … 135 139 void DenseTrackFilter::Process() 136 140 { 137 Candidate * candidate, *track, *bestTrack, *mother;141 Candidate *track; 138 142 TLorentzVector position, momentum; 139 143 Short_t etaBin, phiBin, flags; 140 Int_t number , towerTrackHits;144 Int_t number; 141 145 Long64_t towerHit, towerEtaPhi, hitEtaPhi; 142 143 Double_t pt, ptmax, eta, phi; 146 Double_t ptmax; 144 147 145 148 vector< Double_t >::iterator itEtaBin; … … 152 155 153 156 // loop over all tracks 154 fIt TrackInputArray->Reset();157 fItDenseChargedInputArray->Reset(); 155 158 number = -1; 156 while((track = static_cast<Candidate*>(fIt TrackInputArray->Next())))159 while((track = static_cast<Candidate*>(fItDenseChargedInputArray->Next()))) 157 160 { 158 161 const TLorentzVector &trackPosition = track->Position; … … 186 189 // loop over all hits 187 190 towerEtaPhi = 0; 188 bestTrack = 0; 189 fTower = 0; 191 fBestTrack = 0; 190 192 ptmax = 0.0; 191 towerTrackHits = 0;193 fTowerTrackHits = 0; 192 194 193 195 for(itTowerHits = fTowerHits.begin(); itTowerHits != fTowerHits.end(); ++itTowerHits) … … 197 199 number = (towerHit) & 0x0000000000FFFFFFLL; 198 200 hitEtaPhi = towerHit >> 32; 201 199 202 if(towerEtaPhi != hitEtaPhi) 200 203 { 201 204 // switch to next tower 202 205 towerEtaPhi = hitEtaPhi; 203 206 204 207 // saving track with highest pT that hit the tower 205 if(towerTrackHits > 0) 206 { 207 mother = bestTrack; 208 candidate = static_cast<Candidate*>(bestTrack->Clone()); 209 pt = candidate->Momentum.Pt(); 210 eta = candidate->Momentum.Eta(); 211 phi = candidate->Momentum.Phi(); 212 eta = gRandom->Gaus(eta, fEtaPhiRes); 213 phi = gRandom->Gaus(phi, fEtaPhiRes); 214 candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta)); 215 candidate->AddCandidate(mother); 216 fTrackOutputArray->Add(candidate); 217 } 208 FillTrack(); 218 209 219 210 ptmax = 0.0; 220 towerTrackHits = 0;221 bestTrack = 0;211 fTowerTrackHits = 0; 212 fBestTrack = 0; 222 213 } 223 214 // check for track hits … … 225 216 if(flags & 1) 226 217 { 227 ++ towerTrackHits;228 track = static_cast<Candidate*>(f TrackInputArray->At(number));218 ++fTowerTrackHits; 219 track = static_cast<Candidate*>(fDenseChargedInputArray->At(number)); 229 220 momentum = track->Momentum; 230 221 231 222 if (momentum.Pt() > ptmax) 232 223 { 233 234 bestTrack = track;224 ptmax = momentum.Pt(); 225 fBestTrack = track; 235 226 } 236 227 continue; 237 228 } 238 } 239 } 229 230 } 231 232 // here fill last tower 233 FillTrack(); 234 235 } 236 237 238 239 //------------------------------------------------------------------------------ 240 241 void DenseTrackFilter::FillTrack() 242 { 243 244 Candidate *candidate, *track, *mother, *trackRef, *bestTrackRef; 245 Double_t pt, eta, phi; 246 Bool_t matched; 247 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 } -
modules/DenseTrackFilter.h
rae061c1 r5a69ba1d 53 53 typedef std::map< Double_t, std::set< Double_t > > TBinMap; //! 54 54 55 Candidate *fTower; 55 Candidate *fBestTrack; 56 57 Int_t fTowerTrackHits; 56 58 57 59 Double_t fEtaPhiRes; … … 70 72 TObjArray *fTrackOutputArray; //! 71 73 74 75 const TObjArray *fDenseChargedInputArray; 76 TIterator *fItDenseChargedInputArray; 77 78 void FillTrack(); 72 79 ClassDef(DenseTrackFilter, 1) 73 80 }; -
modules/FastJetFinder.cc
rae061c1 r5a69ba1d 539 539 candidate->NSubJetsSoftDropped = softdrop_jet.pieces().size(); 540 540 541 candidate->SoftDroppedJet = candidate->SoftDroppedP4[0]; 542 541 543 for (size_t i = 0; i < subjets.size() and i < 4; i++) 542 544 { 543 545 if(subjets.at(i).pt() < 0) continue ; 544 546 candidate->SoftDroppedP4[i+1].SetPtEtaPhiM(subjets.at(i).pt(), subjets.at(i).eta(), subjets.at(i).phi(), subjets.at(i).m()); 547 if(i==0) candidate->SoftDroppedSubJet1 = candidate->SoftDroppedP4[i+1]; 548 if(i==1) candidate->SoftDroppedSubJet2 = candidate->SoftDroppedP4[i+1]; 545 549 } 546 550 } -
modules/TimeSmearing.cc
rae061c1 r5a69ba1d 108 108 tf_smeared = gRandom->Gaus(tf, fTimeResolution); 109 109 ti = ti + tf_smeared - tf; 110 110 tf = tf_smeared; 111 111 112 mother = candidate; 112 113 candidate = static_cast<Candidate*>(candidate->Clone()); -
modules/TreeWriter.cc
rae061c1 r5a69ba1d 681 681 entry->NSubJetsSoftDropped = candidate->NSubJetsSoftDropped; 682 682 683 entry->SoftDroppedJet = candidate->SoftDroppedJet ; 684 entry->SoftDroppedSubJet1 = candidate->SoftDroppedSubJet1 ; 685 entry->SoftDroppedSubJet2 = candidate->SoftDroppedSubJet2; 686 687 683 688 for(i = 0; i < 5; i++) 684 689 {
Note:
See TracChangeset
for help on using the changeset viewer.