- Timestamp:
- Nov 20, 2015, 1:44:39 PM (9 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- b9e210d, f32ea92
- Parents:
- fdfac34
- Location:
- modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TrackPileUpSubtractor.cc
rfdfac34 r715ab7c 67 67 void TrackPileUpSubtractor::Init() 68 68 { 69 // import input array69 // import input array 70 70 71 71 fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices")); 72 72 fItVertexInputArray = fVertexInputArray->MakeIterator(); 73 73 74 74 fZVertexResolution = GetDouble("ZVertexResolution", 0.005)*1.0E3; 75 75 76 76 fPTMin = GetDouble("PTMin", 0.); 77 77 78 // import arrays with output from other modules 78 79 79 80 ExRootConfParam param = GetParam("InputArray"); 80 81 Long_t i, size; … … 119 120 Double_t z, zvtx=0; 120 121 121 122 122 123 // find z position of primary vertex 123 124 124 125 fItVertexInputArray->Reset(); 125 126 while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next()))) … … 127 128 if(!candidate->IsPU) 128 129 { 129 zvtx = candidate->Position.Z();130 // break;130 zvtx = candidate->Position.Z(); 131 // break; 131 132 } 132 133 } … … 144 145 particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0)); 145 146 z = particle->Position.Z(); 146 147 147 148 // apply pile-up subtraction 148 149 // assume perfect pile-up subtraction for tracks outside fZVertexResolution 149 150 if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) candidate->IsRecoPU = 1; 151 else 150 151 if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) 152 152 { 153 candidate->IsRecoPU = 0; 154 if( candidate->Momentum.Pt() > fPTMin) array->Add(candidate); 153 candidate->IsRecoPU = 1; 154 } 155 else 156 { 157 candidate->IsRecoPU = 0; 158 if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate); 155 159 } 156 160 } -
modules/TrackPileUpSubtractor.h
rfdfac34 r715ab7c 50 50 Double_t fZVertexResolution; 51 51 52 Double_t fPTMin; 52 Double_t fPTMin; 53 53 54 54 std::map< TIterator *, TObjArray * > fInputMap; //!
Note:
See TracChangeset
for help on using the changeset viewer.