- Timestamp:
- Dec 12, 2019, 3:16:58 PM (5 years ago)
- Branches:
- Timing
- Children:
- 03b9c0f, 83ee320, b4a3c55
- Parents:
- 2b5ff2c (diff), 584e2e9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Michele Selvaggi <michele.selvaggi@…> (12/12/19 15:16:58)
- git-committer:
- GitHub <noreply@…> (12/12/19 15:16:58)
- Location:
- modules
- Files:
-
- 5 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/ModulesLinkDef.h
r2b5ff2c rd4e5b6a 56 56 #include "modules/JetPileUpSubtractor.h" 57 57 #include "modules/TrackPileUpSubtractor.h" 58 #include "modules/TrackTimingPileUpSubtractor.h" 58 59 #include "modules/TaggingParticlesSkimmer.h" 59 60 #include "modules/PileUpJetID.h" … … 72 73 #include "modules/VertexFinder.h" 73 74 #include "modules/VertexFinderDA4D.h" 75 #include "modules/HighMassVertexRecover.h" 74 76 #include "modules/DecayFilter.h" 75 77 #include "modules/ExampleModule.h" … … 111 113 #pragma link C++ class JetPileUpSubtractor+; 112 114 #pragma link C++ class TrackPileUpSubtractor+; 115 #pragma link C++ class TrackTimingPileUpSubtractor+; 113 116 #pragma link C++ class TaggingParticlesSkimmer+; 114 117 #pragma link C++ class PileUpJetID+; … … 127 130 #pragma link C++ class VertexFinder+; 128 131 #pragma link C++ class VertexFinderDA4D+; 132 #pragma link C++ class HighMassVertexRecover+; 129 133 #pragma link C++ class DecayFilter+; 130 134 #pragma link C++ class ExampleModule+; -
modules/TrackPileUpSubtractor.cc
r2b5ff2c rd4e5b6a 117 117 void TrackPileUpSubtractor::Process() 118 118 { 119 Candidate *candidate, *particle ;119 Candidate *candidate, *particle, *particleTest; 120 120 map<TIterator *, TObjArray *>::iterator itInputMap; 121 121 TIterator *iterator; … … 123 123 Double_t z, zvtx = 0; 124 124 Double_t pt, eta, phi, e; 125 125 Double_t sumPT2 = 0; 126 Double_t sumSquare = 0; 127 int counter = 0; 128 Double_t tempPTSquare = 0; 129 Double_t tempZVertex = 0; 126 130 // find z position of primary vertex 127 131 132 cout << " ---------- NEW EVENT --------- " << endl; 133 128 134 fItVertexInputArray->Reset(); 135 cout << " NUMBER OF VERTICES : " << fVertexInputArray->GetEntriesFast() << endl; 129 136 while((candidate = static_cast<Candidate *>(fItVertexInputArray->Next()))) 130 137 { 131 if(!candidate->IsPU) 132 { 133 zvtx = candidate->Position.Z(); 134 // break; 135 } 138 cout << " ---------- NEW VERTEX --------- " << candidate->IsPU << endl; 139 tempZVertex = candidate->Position.Z(); 140 tempPTSquare = candidate->SumPT2; 141 if(tempPTSquare > sumSquare) 142 { 143 sumSquare = tempPTSquare; 144 zvtx = tempZVertex; 145 cout << " Sum Square : " << sumSquare << " Z of Vertex : " << zvtx << " Is PileUp : " << candidate->IsPU << endl; 146 } 147 148 /* 149 for(int i = 0; i < candidate->GetCandidates()->GetEntriesFast(); i++) 150 { 151 particleTest = static_cast<Candidate *>(candidate->GetCandidates()->At(i)); 152 TLorentzVector &candidateMomentumNew = particleTest->Momentum; 153 if(candidateMomentumNew.Pt() > 1.0) 154 sumSquare += (candidateMomentumNew.Pt()*candidateMomentumNew.Pt()); 155 cout << candidateMomentumNew.Pt() << " " << candidate->SumPT2 << " counter : " << candidate->GetCandidates()->GetEntriesFast() << endl; 156 } 157 */ 136 158 } 137 159 … … 147 169 { 148 170 particle = static_cast<Candidate *>(candidate->GetCandidates()->At(0)); 149 const TLorentzVector &candidateMomentum = particle->Momentum;171 const TLorentzVector &candidateMomentum = candidate->Momentum; 150 172 151 173 eta = candidateMomentum.Eta(); … … 154 176 e = candidateMomentum.E(); 155 177 156 z = particle->Position.Z(); 178 z = candidate->Position.Z(); 179 counter ++; 180 //sum = pt*pt; 181 if(pt > 1.0) 182 sumPT2 += pt*pt; 157 183 158 184 // apply pile-up subtraction 159 185 // assume perfect pile-up subtraction for tracks outside fZVertexResolution 160 161 if(candidate->Charge != 0 && candidate->IsPU && TMath::Abs(z - zvtx) > fFormula->Eval(pt, eta, phi, e) * 1.0e3) 186 // cout << particle->IsRecoPU << " ParticleSumSquare : " << sumPT2 << " VertexResult : " << sumSquare << " Added SumSquare : " << zvtx << endl; 187 //cout << pt << " " << candidate->IsPU << " " << TMath::Abs(z - zvtx) << " " << sumPT2 << " " << sumPT2 << endl; 188 189 190 if(particle->Charge != 0 && TMath::Abs(z - zvtx) > fFormula->Eval(pt, eta, phi, e) * 1.0e3) 162 191 { 163 192 candidate->IsRecoPU = 1; 193 //cout << TMath::Abs(z - zvtx) << " " << fFormula->Eval(pt, eta, phi, e) * 1.0e3 << endl; 164 194 } 165 195 else
Note:
See TracChangeset
for help on using the changeset viewer.