Changeset 8336b6e in git for modules/JetPileUpSubtractor.cc
- Timestamp:
- Nov 4, 2013, 11:59:27 AM (11 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- e9065e7
- Parents:
- 498cda4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/JetPileUpSubtractor.cc
r498cda4 r8336b6e 39 39 40 40 JetPileUpSubtractor::JetPileUpSubtractor() : 41 fItJetInputArray(0) 41 fItJetInputArray(0), fItRhoInputArray(0) 42 42 { 43 43 … … 63 63 64 64 fRhoInputArray = ImportArray(GetString("RhoInputArray", "Rho/rho")); 65 fItRhoInputArray = fRhoInputArray->MakeIterator(); 65 66 66 67 // create output array(s) … … 74 75 void JetPileUpSubtractor::Finish() 75 76 { 77 if(fItRhoInputArray) delete fItRhoInputArray; 76 78 if(fItJetInputArray) delete fItJetInputArray; 77 79 } … … 83 85 Candidate *candidate; 84 86 TLorentzVector momentum, area; 87 Double_t eta = 0.0; 85 88 Double_t rho = 0.0; 86 89 87 if(fRhoInputArray && fRhoInputArray->GetEntriesFast() > 0) 88 { 89 candidate = static_cast<Candidate*>(fRhoInputArray->At(0)); 90 rho = candidate->Momentum.Pt(); 91 } 90 if(!fRhoInputArray) return; 92 91 93 92 // loop over all input candidates … … 97 96 momentum = candidate->Momentum; 98 97 area = candidate->Area; 98 eta = TMath::Abs(momentum.Eta()); 99 100 // find rho 101 rho = 0.0; 102 while((candidate = static_cast<Candidate*>(fItRhoInputArray->Next()))) 103 { 104 if(eta >= candidate->Edges[0] && eta < candidate->Edges[1]) 105 { 106 rho = candidate->Momentum.Pt(); 107 } 108 } 99 109 100 110 // apply pile-up correction
Note:
See TracChangeset
for help on using the changeset viewer.