- Timestamp:
- Jan 17, 2014, 2:29:22 PM (11 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 1150871
- Parents:
- 24d005f
- Location:
- modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/PileUpJetID.cc
r24d005f r54b6dfc 36 36 37 37 PileUpJetID::PileUpJetID() : 38 fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0) 38 fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0),fItVertexInputArray(0) 39 39 { 40 40 … … 68 68 fNeutralInputArray = ImportArray(GetString("NeutralInputArray", "Calorimeter/eflowTowers")); 69 69 fItNeutralInputArray = fNeutralInputArray->MakeIterator(); 70 71 // create output array(s) 70 71 fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices")); 72 fItVertexInputArray = fVertexInputArray->MakeIterator(); 73 74 fZVertexResolution = GetDouble("ZVertexResolution", 0.005)*1.0E3; 75 // create output array(s) 72 76 73 77 fOutputArray = ExportArray(GetString("OutputArray", "jets")); … … 83 87 if(fItTrackInputArray) delete fItTrackInputArray; 84 88 if(fItNeutralInputArray) delete fItNeutralInputArray; 89 if(fItVertexInputArray) delete fItVertexInputArray; 85 90 86 91 } … … 92 97 Candidate *candidate, *constituent; 93 98 TLorentzVector momentum, area; 99 Double_t zvtx=0; 94 100 95 101 Candidate *trk; 102 103 // find z position of primary vertex 104 105 fItVertexInputArray->Reset(); 106 while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next()))) 107 { 108 if(!candidate->IsPU) 109 { 110 zvtx = candidate->Position.Z(); 111 break; 112 } 113 } 96 114 97 115 // loop over all input candidates … … 129 147 } else { 130 148 // charged 131 if (constituent->IsPU ) {149 if (constituent->IsPU && TMath::Abs(constituent->Position.Z()-zvtx) > fZVertexResolution) { 132 150 sumptchpu += pt; 133 151 } else { … … 146 164 // Not using constituents, using dr 147 165 fItTrackInputArray->Reset(); 148 while ((trk = static_cast<Candidate*>(fItTrackInputArray->Next()))) {166 while ((trk = static_cast<Candidate*>(fItTrackInputArray->Next()))) { 149 167 if (trk->Momentum.DeltaR(candidate->Momentum) < fParameterR) { 150 168 float pt = trk->Momentum.Pt(); 151 169 sumpt += pt; 152 170 sumptch += pt; 153 if (trk->IsPU ) {171 if (trk->IsPU && TMath::Abs(trk->Position.Z()-zvtx) > fZVertexResolution) { 154 172 sumptchpu += pt; 155 173 } else { -
modules/PileUpJetID.h
r24d005f r54b6dfc 53 53 54 54 TObjArray *fOutputArray; //! 55 56 TIterator *fItVertexInputArray; //! 57 const TObjArray *fVertexInputArray; //! 55 58 59 Double_t fZVertexResolution; 56 60 57 61 ClassDef(PileUpJetID, 1) -
modules/TrackPileUpSubtractor.cc
r24d005f r54b6dfc 110 110 while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next()))) 111 111 { 112 if( candidate->IsPU == 0)112 if(!candidate->IsPU) 113 113 { 114 114 zvtx = candidate->Position.Z(); 115 break;115 // break; 116 116 } 117 117 } 118 119 118 120 119 // loop over all input arrays … … 130 129 particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0)); 131 130 z = particle->Position.Z(); 132 131 133 132 // apply pile-up subtraction 134 133 // assume perfect pile-up subtraction for tracks outside fZVertexResolution 134 135 135 if(candidate->IsPU && TMath::Abs(z-zvtx) > fZVertexResolution) continue; 136 136
Note:
See TracChangeset
for help on using the changeset viewer.