Changeset 22dc7fd in git for modules/TrackPileUpSubtractor.cc
- Timestamp:
- Dec 21, 2013, 3:00:11 PM (11 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 24d005f
- Parents:
- af88093
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TrackPileUpSubtractor.cc
raf88093 r22dc7fd 53 53 void TrackPileUpSubtractor::Init() 54 54 { 55 // import input array 56 57 fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices")); 58 fItVertexInputArray = fVertexInputArray->MakeIterator(); 59 55 60 fZVertexResolution = GetDouble("ZVertexResolution", 0.005)*1.0E3; 56 61 … … 85 90 if(iterator) delete iterator; 86 91 } 92 93 if(fItVertexInputArray) delete fItVertexInputArray; 87 94 } 88 95 … … 95 102 TIterator *iterator; 96 103 TObjArray *array; 97 Double_t z; 104 Double_t z, zvtx; 105 106 107 // find z position of primary vertex 108 109 fItVertexInputArray->Reset(); 110 while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next()))) 111 { 112 if(candidate->IsPU == 0) 113 { 114 zvtx = candidate->Position.Z(); 115 break; 116 } 117 } 118 98 119 99 120 // loop over all input arrays … … 112 133 // apply pile-up subtraction 113 134 // assume perfect pile-up subtraction for tracks outside fZVertexResolution 114 if(candidate->IsPU && TMath::Abs(z ) > fZVertexResolution) continue;135 if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) continue; 115 136 116 137 array->Add(candidate);
Note:
See TracChangeset
for help on using the changeset viewer.