Changes in modules/TrackPileUpSubtractor.cc [715ab7c:b62c2da] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TrackPileUpSubtractor.cc
r715ab7c rb62c2da 67 67 void TrackPileUpSubtractor::Init() 68 68 { 69 69 // 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 78 77 // import arrays with output from other modules 79 78 80 79 ExRootConfParam param = GetParam("InputArray"); 81 80 Long_t i, size; … … 120 119 Double_t z, zvtx=0; 121 120 122 121 123 122 // find z position of primary vertex 124 123 125 124 fItVertexInputArray->Reset(); 126 125 while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next()))) … … 128 127 if(!candidate->IsPU) 129 128 { 130 131 129 zvtx = candidate->Position.Z(); 130 // break; 132 131 } 133 132 } … … 145 144 particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0)); 146 145 z = particle->Position.Z(); 147 146 148 147 // apply pile-up subtraction 149 148 // assume perfect pile-up subtraction for tracks outside fZVertexResolution 150 151 if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) 149 150 if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) candidate->IsRecoPU = 1; 151 else 152 152 { 153 candidate->IsRecoPU = 1; 154 } 155 else 156 { 157 candidate->IsRecoPU = 0; 158 if(candidate->Momentum.Pt() > fPTMin) array->Add(candidate); 153 candidate->IsRecoPU = 0; 154 if( candidate->Momentum.Pt() > fPTMin) array->Add(candidate); 159 155 } 160 156 }
Note:
See TracChangeset
for help on using the changeset viewer.