Changeset c7e90d8 in git
- Timestamp:
- Jan 26, 2020, 3:26:13 PM (5 years ago)
- Branches:
- Timing
- Children:
- 9e3f2fb
- Parents:
- 62764fb
- Location:
- modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/ModulesLinkDef.h
r62764fb rc7e90d8 56 56 #include "modules/PileUpMerger.h" 57 57 #include "modules/JetPileUpSubtractor.h" 58 #include "modules/Track TimingPileUpSubtractor.h"58 #include "modules/TrackPileUpSubtractor.h" 59 59 #include "modules/TaggingParticlesSkimmer.h" 60 60 #include "modules/PileUpJetID.h" 61 #include "modules/PileUpSubtractor4D.h" 61 62 #include "modules/PhotonID.h" 62 63 #include "modules/ConstituentFilter.h" … … 113 114 #pragma link C++ class PileUpMerger+; 114 115 #pragma link C++ class JetPileUpSubtractor+; 115 #pragma link C++ class Track TimingPileUpSubtractor+;116 #pragma link C++ class TrackPileUpSubtractor+; 116 117 #pragma link C++ class TaggingParticlesSkimmer+; 117 118 #pragma link C++ class PileUpJetID+; 119 #pragma link C++ class PileUpSubtractor4D+; 118 120 #pragma link C++ class PhotonID+; 119 121 #pragma link C++ class ConstituentFilter+; -
modules/PileUpSubtractor4D.cc
r62764fb rc7e90d8 17 17 */ 18 18 19 /** \class TrackPileUpSubtractor19 /** \class PileUpSubtractor4D 20 20 * 21 * Subtract pile-up contribution from tracks. 21 * Subtract pile-up contribution from tracks using both spatial and timing 22 * information 22 23 * 23 * \author P. Demin - UCL, Louvain-la-Neuve24 * \author M. Selvaggi - CERN 24 25 * 25 26 */ … … 52 53 //------------------------------------------------------------------------------ 53 54 54 PileUpSubtractor4D::PileUpSubtractor4D() : 55 fFormula(0) 55 PileUpSubtractor4D::PileUpSubtractor4D() 56 56 { 57 fFormula = new DelphesFormula;58 57 } 59 58 … … 62 61 PileUpSubtractor4D::~PileUpSubtractor4D() 63 62 { 64 if(fFormula) delete fFormula;65 63 } 66 64 … … 107 105 { 108 106 iterator = itInputMap->first; 109 110 107 if(iterator) delete iterator; 111 108 } … … 118 115 void PileUpSubtractor4D::Process() 119 116 { 120 Candidate *candidate , *particle;117 Candidate *candidate; 121 118 map<TIterator *, TObjArray *>::iterator itInputMap; 122 119 TIterator *iterator; 123 120 TObjArray *array; 124 121 Double_t z, zvtx = 0; 125 Double_t z _err, zvtx_err = 0;122 Double_t zvtx_err = 0; 126 123 Double_t t, tvtx = 0; 127 Double_t t _err, tvtx_err = 0;124 Double_t tvtx_err = 0; 128 125 Double_t sumPTSquare = 0; 129 126 Double_t tempPTSquare = 0; 130 Double_t pt, eta, phi, e;131 127 Double_t distanceCharged, distanceNeutral = 0; 132 128 … … 144 140 tvtx = candidate->Position.T(); 145 141 tvtx_err = candidate->PositionError.T(); 146 } 142 } 147 143 } 148 144 … … 157 153 while((candidate = static_cast<Candidate *>(iterator->Next()))) 158 154 { 159 particle = static_cast<Candidate *>(candidate->GetCandidates()->At(0));160 const TLorentzVector &candidateMomentum = particle->Momentum;161 155 162 eta = candidateMomentum.Eta(); 163 pt = candidateMomentum.Pt(); 164 phi = candidateMomentum.Phi(); 165 e = candidateMomentum.E(); 166 167 z = particle->Position.Z(); 168 z_err = particle->PositionError.Z(); 169 t = particle->InitialPosition.T(); 170 t_err = particle->PositionError.T(); 156 z = candidate->Position.Z(); 157 t = candidate->InitialPosition.T(); 171 158 172 159 distanceCharged = TMath::Sqrt(pow((zvtx - z),2)/pow((zvtx_err),2) + pow((tvtx - t),2)/pow((tvtx_err),2)); … … 176 163 { 177 164 candidate->IsRecoPU = 0; 165 if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate); 178 166 } 179 167 else if(candidate->Charge == 0 && distanceNeutral < fNeutralMinSignificance) 180 168 { 181 169 candidate->IsRecoPU = 0; 182 } 170 if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate); 171 } 183 172 else 184 173 { 185 174 candidate->IsRecoPU = 1; 186 if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate);187 175 } 188 176 } -
modules/PileUpSubtractor4D.h
r62764fb rc7e90d8 34 34 class TIterator; 35 35 class TObjArray; 36 class DelphesFormula;37 36 38 37 class PileUpSubtractor4D: public DelphesModule … … 47 46 48 47 private: 49 DelphesFormula *fFormula; //!50 48 51 49 Double_t fChargedMinSignificance; 52 50 Double_t fNeutralMinSignificance; 53 54 51 Double_t fPTMin; 55 52 56 53 std::map<TIterator *, TObjArray *> fInputMap; //! 57 54 55 TIterator *fItVertexInputArray; //! 56 57 const TObjArray *fVertexInputArray; //! 58 58 59 ClassDef(PileUpSubtractor4D, 1) 59 60 60 TIterator *fItVertexInputArray; //!61 62 const TObjArray *fVertexInputArray; //!63 61 }; 64 62
Note:
See TracChangeset
for help on using the changeset viewer.