- Timestamp:
- Jan 23, 2017, 12:21:21 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 4b4207e
- Parents:
- 273735d
- Location:
- modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TrackPileUpSubtractor.cc
r273735d rb1fd38d 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->IsPU && TMath::Abs(z-zvtx) > f ZVertexResolution)163 if(candidate->IsPU && TMath::Abs(z-zvtx) > fFormula->Eval(pt, eta, phi, e)* 1.0e3) 152 164 { 153 165 candidate->IsRecoPU = 1; -
modules/TrackPileUpSubtractor.h
r273735d rb1fd38d 34 34 class TIterator; 35 35 class TObjArray; 36 class DelphesFormula; 36 37 37 38 class TrackPileUpSubtractor: public DelphesModule … … 48 49 private: 49 50 50 D ouble_t fZVertexResolution;51 DelphesFormula *fFormula; //! 51 52 52 53 Double_t fPTMin;
Note:
See TracChangeset
for help on using the changeset viewer.