Changeset 4de073b in git
- Timestamp:
- Jan 25, 2017, 2:49:28 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- d759c46
- Parents:
- d6ce231
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TrackPileUpSubtractor.cc
rd6ce231 r4de073b 53 53 //------------------------------------------------------------------------------ 54 54 55 TrackPileUpSubtractor::TrackPileUpSubtractor() 55 TrackPileUpSubtractor::TrackPileUpSubtractor() : 56 fFormula(0) 56 57 { 58 fFormula = new DelphesFormula; 57 59 } 58 60 … … 61 63 TrackPileUpSubtractor::~TrackPileUpSubtractor() 62 64 { 65 if(fFormula) delete fFormula; 63 66 } 64 67 … … 72 75 fItVertexInputArray = fVertexInputArray->MakeIterator(); 73 76 74 fZVertexResolution = GetDouble("ZVertexResolution", 0.005)*1.0E3; 77 // read resolution formula in m 78 fFormula->Compile(GetString("ZVertexResolution", "0.001")); 75 79 76 80 fPTMin = GetDouble("PTMin", 0.); … … 119 123 TObjArray *array; 120 124 Double_t z, zvtx=0; 125 Double_t pt, eta, phi, e; 121 126 122 127 … … 144 149 { 145 150 particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0)); 151 const TLorentzVector &candidateMomentum = particle->Momentum; 152 153 eta = candidateMomentum.Eta(); 154 pt = candidateMomentum.Pt(); 155 phi = candidateMomentum.Phi(); 156 e = candidateMomentum.E(); 157 146 158 z = particle->Position.Z(); 147 159 … … 149 161 // assume perfect pile-up subtraction for tracks outside fZVertexResolution 150 162 151 if(candidate->Charge !=0 && TMath::Abs(z-zvtx) > f ZVertexResolution)163 if(candidate->Charge !=0 && TMath::Abs(z-zvtx) > fFormula->Eval(pt, eta, phi, e)* 1.0e3) 152 164 { 153 165 candidate->IsRecoPU = 1; … … 161 173 } 162 174 } 163 164 //------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.