6 |
|
#include "Math/PtEtaPhiE4D.h" |
7 |
|
#include "TObject.h" |
8 |
|
|
9 |
+ |
#ifndef PI |
10 |
+ |
#define PI 3.14159265358979323846264338328 |
11 |
+ |
#endif |
12 |
+ |
|
13 |
|
typedef ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiE4D< Double32_t > > LorentzVector; |
14 |
|
|
15 |
|
class Particle{ |
34 |
|
return v4; |
35 |
|
}; |
36 |
|
|
37 |
+ |
double deltaPhi(Particle p2){ |
38 |
+ |
double deltaphi = fabs(this->phi - p2.phi); |
39 |
+ |
if(deltaphi > PI) deltaphi = 2* PI - deltaphi; |
40 |
+ |
return deltaphi; |
41 |
+ |
} |
42 |
+ |
double deltaR(Particle p2){ |
43 |
+ |
double deltaeta = this->eta - p2.eta; |
44 |
+ |
return sqrt(deltaeta*deltaeta+deltaPhi(p2)*deltaPhi(p2)); |
45 |
+ |
} |
46 |
+ |
|
47 |
|
float charge; |
48 |
|
float pt; |
49 |
|
float eta; |
78 |
|
btag_combinedSecondaryVertexMVA=0; |
79 |
|
btag_jetBProbability=0; |
80 |
|
btag_jetProbability=0; |
81 |
+ |
JEC_uncertainty=0; |
82 |
+ |
JEC_factor_raw=0; |
83 |
+ |
genjet_pt=0; |
84 |
+ |
genjet_eta=0; |
85 |
+ |
genjet_phi=0; |
86 |
+ |
genjet_energy=0; |
87 |
+ |
genparticles_indices.clear(); |
88 |
|
}; |
89 |
|
|
90 |
|
~Jet(){ |
111 |
|
float btag_combinedSecondaryVertexMVA; |
112 |
|
float btag_jetBProbability; |
113 |
|
float btag_jetProbability; |
114 |
+ |
float JEC_uncertainty; |
115 |
+ |
float JEC_factor_raw; |
116 |
+ |
float genjet_pt; |
117 |
+ |
float genjet_eta; |
118 |
+ |
float genjet_phi; |
119 |
+ |
float genjet_energy; |
120 |
+ |
LorentzVector genjet_v4(){ |
121 |
+ |
LorentzVector v4; |
122 |
+ |
v4.SetPt(genjet_pt); |
123 |
+ |
v4.SetEta(genjet_eta); |
124 |
+ |
v4.SetPhi(genjet_phi); |
125 |
+ |
v4.SetE(genjet_energy); |
126 |
+ |
return v4; |
127 |
+ |
}; |
128 |
+ |
std::vector<unsigned int> genparticles_indices; |
129 |
+ |
|
130 |
|
}; |
131 |
|
|
132 |
|
|
143 |
|
// particleIso=0; |
144 |
|
neutralHadronIso=0; |
145 |
|
chargedHadronIso=0; |
146 |
+ |
photonIso=0; |
147 |
|
trackIso=0; |
148 |
|
puChargedHadronIso=0; |
149 |
+ |
gsfTrack_trackerExpectedHitsInner_numberOfLostHits=0; |
150 |
+ |
gsfTrack_px=0; |
151 |
+ |
gsfTrack_py=0; |
152 |
+ |
gsfTrack_pz=0; |
153 |
+ |
gsfTrack_vx=0; |
154 |
+ |
gsfTrack_vy=0; |
155 |
+ |
gsfTrack_vz=0; |
156 |
+ |
passconversionveto=false; |
157 |
+ |
dEtaIn=0; |
158 |
+ |
dPhiIn=0; |
159 |
+ |
sigmaIEtaIEta=0; |
160 |
+ |
HoverE=0; |
161 |
+ |
fbrem=0; |
162 |
+ |
EoverPIn=0; |
163 |
+ |
EcalEnergy=0; |
164 |
+ |
mvaTrigV0=0; |
165 |
+ |
mvaNonTrigV0=0; |
166 |
|
}; |
167 |
|
|
168 |
|
~Electron(){ |
177 |
|
//float particleIso; |
178 |
|
float neutralHadronIso; |
179 |
|
float chargedHadronIso; |
180 |
+ |
float photonIso; |
181 |
|
float trackIso; |
182 |
|
float puChargedHadronIso; |
183 |
+ |
int gsfTrack_trackerExpectedHitsInner_numberOfLostHits; |
184 |
+ |
float gsfTrack_px; |
185 |
+ |
float gsfTrack_py; |
186 |
+ |
float gsfTrack_pz; |
187 |
+ |
float gsfTrack_vx; |
188 |
+ |
float gsfTrack_vy; |
189 |
+ |
float gsfTrack_vz; |
190 |
+ |
float gsfTrack_dxy_vertex(const float point_x, const float point_y){ |
191 |
+ |
return ( - (gsfTrack_vx-point_x) * gsfTrack_py + (gsfTrack_vy-point_y) * gsfTrack_px ) / sqrt(gsfTrack_px*gsfTrack_px+gsfTrack_py*gsfTrack_py); |
192 |
+ |
}; |
193 |
+ |
float gsfTrack_dz_vertex(const float point_x, const float point_y, const float point_z){ |
194 |
+ |
return (gsfTrack_vz-point_z) - ((gsfTrack_vx-point_x)*gsfTrack_px+(gsfTrack_vy-point_y)*gsfTrack_py)/(gsfTrack_px*gsfTrack_px+gsfTrack_py*gsfTrack_py) * gsfTrack_pz; |
195 |
+ |
} |
196 |
+ |
bool passconversionveto; |
197 |
+ |
float dEtaIn; |
198 |
+ |
float dPhiIn; |
199 |
+ |
float sigmaIEtaIEta; |
200 |
+ |
float HoverE; |
201 |
+ |
float fbrem; |
202 |
+ |
float EoverPIn; |
203 |
+ |
float EcalEnergy; |
204 |
+ |
float mvaTrigV0; |
205 |
+ |
float mvaNonTrigV0; |
206 |
+ |
|
207 |
+ |
float relIso(){ |
208 |
+ |
return ( chargedHadronIso + std::max( 0.0, neutralHadronIso + photonIso - 0.5*puChargedHadronIso ) ) / pt; |
209 |
+ |
} |
210 |
|
|
211 |
|
}; |
212 |
|
|
222 |
|
neutralHadronIso=0; |
223 |
|
chargedHadronIso=0; |
224 |
|
trackIso=0; |
225 |
+ |
photonIso=0; |
226 |
|
puChargedHadronIso=0; |
227 |
|
isGlobalMuon=false; |
228 |
|
isStandAloneMuon=false; |
240 |
|
innerTrack_d0Error=0; |
241 |
|
innerTrack_numberOfValidHits=0; |
242 |
|
innerTrack_numberOfLostHits=0; |
243 |
+ |
innerTrack_trackerLayersWithMeasurement=0; |
244 |
+ |
innerTrack_numberOfValidPixelHits=0; |
245 |
|
outerTrack_chi2=0; |
246 |
|
outerTrack_ndof=0; |
247 |
|
outerTrack_d0=0; |
261 |
|
float neutralHadronIso; |
262 |
|
float chargedHadronIso; |
263 |
|
float trackIso; |
264 |
+ |
float photonIso; |
265 |
|
float puChargedHadronIso; |
266 |
|
bool isGlobalMuon; |
267 |
|
bool isStandAloneMuon; |
279 |
|
float innerTrack_d0Error; |
280 |
|
unsigned short innerTrack_numberOfValidHits; |
281 |
|
unsigned short innerTrack_numberOfLostHits; |
282 |
+ |
unsigned short innerTrack_trackerLayersWithMeasurement; |
283 |
+ |
unsigned short innerTrack_numberOfValidPixelHits; |
284 |
|
float outerTrack_chi2; |
285 |
|
float outerTrack_ndof; |
286 |
|
float outerTrack_d0; |
287 |
|
float outerTrack_d0Error; |
288 |
|
unsigned short outerTrack_numberOfValidHits; |
289 |
|
unsigned short outerTrack_numberOfLostHits; |
290 |
+ |
|
291 |
+ |
float relIso(){ |
292 |
+ |
return ( chargedHadronIso + std::max( 0.0, neutralHadronIso + photonIso - 0.5*puChargedHadronIso ) ) / pt; |
293 |
+ |
} |
294 |
+ |
|
295 |
|
}; |
296 |
|
|
297 |
|
|
299 |
|
|
300 |
|
public: |
301 |
|
Tau(){ |
302 |
< |
|
302 |
> |
leadPFCand_px=0; |
303 |
> |
leadPFCand_py=0; |
304 |
> |
leadPFCand_pz=0; |
305 |
> |
decayModeFinding=false; |
306 |
> |
byVLooseCombinedIsolationDeltaBetaCorr =false; |
307 |
> |
byLooseCombinedIsolationDeltaBetaCorr=false; |
308 |
> |
byMediumCombinedIsolationDeltaBetaCorr=false; |
309 |
> |
byTightCombinedIsolationDeltaBetaCorr=false; |
310 |
> |
againstElectronLoose =false; |
311 |
> |
againstElectronMedium=false; |
312 |
> |
againstElectronTight=false ; |
313 |
> |
againstElectronMVA =false; |
314 |
> |
againstMuonLoose=false ; |
315 |
> |
againstMuonMedium=false; |
316 |
> |
againstMuonTight=false; |
317 |
|
}; |
318 |
|
|
319 |
|
~Tau(){ |
320 |
|
}; |
321 |
|
|
322 |
+ |
float leadPFCand_px; |
323 |
+ |
float leadPFCand_py; |
324 |
+ |
float leadPFCand_pz; |
325 |
+ |
|
326 |
+ |
bool decayModeFinding; |
327 |
+ |
bool byVLooseCombinedIsolationDeltaBetaCorr ; |
328 |
+ |
bool byLooseCombinedIsolationDeltaBetaCorr; |
329 |
+ |
bool byMediumCombinedIsolationDeltaBetaCorr; |
330 |
+ |
bool byTightCombinedIsolationDeltaBetaCorr; |
331 |
+ |
bool againstElectronLoose ; |
332 |
+ |
bool againstElectronMedium; |
333 |
+ |
bool againstElectronTight ; |
334 |
+ |
bool againstElectronMVA ; |
335 |
+ |
bool againstMuonLoose ; |
336 |
+ |
bool againstMuonMedium; |
337 |
+ |
bool againstMuonTight; |
338 |
+ |
|
339 |
|
}; |
340 |
|
|
341 |
|
class Photon : public Particle{ |
364 |
|
/* float neutralHadronIso; */ |
365 |
|
/* float chargedHadronIso; */ |
366 |
|
float trackIso; |
367 |
< |
|
367 |
> |
|
368 |
|
}; |
369 |
|
|
370 |
|
class MET{ |
410 |
|
//bool isValid; |
411 |
|
float chi2; |
412 |
|
float ndof; |
413 |
+ |
|
414 |
|
}; |
415 |
|
|
416 |
|
class GenInfo{ |
453 |
|
int pileup_NumInteractions_ootbefore; |
454 |
|
int pileup_NumInteractions_ootafter; |
455 |
|
float pileup_TrueNumInteractions; //poisson mean |
456 |
< |
|
456 |
> |
|
457 |
|
}; |
458 |
|
|
459 |
|
|
485 |
|
int pdgId; |
486 |
|
int status; |
487 |
|
int index; |
488 |
+ |
|
489 |
+ |
//return mother 1 or 2 (ind<=1 or ind>=2) |
490 |
+ |
GenParticle* mother(std::vector<GenParticle> *gplist, int ind=1){ |
491 |
+ |
for(unsigned int i=0; i< gplist->size(); ++i){ |
492 |
+ |
if(ind<=1){ |
493 |
+ |
if(this->mother1 == gplist->at(i).index){ |
494 |
+ |
return &(gplist->at(i)); |
495 |
+ |
} |
496 |
+ |
} |
497 |
+ |
else{ |
498 |
+ |
if(this->mother2 == gplist->at(i).index){ |
499 |
+ |
return &(gplist->at(i)); |
500 |
+ |
} |
501 |
+ |
} |
502 |
+ |
} |
503 |
+ |
//std::cout << "WARNING: Mother " << ind << " not found in list of GenParticles" << std::endl; |
504 |
+ |
return 0; |
505 |
+ |
} |
506 |
+ |
//return daughter 1 or 2 (ind<=1 or ind>=2) |
507 |
+ |
GenParticle* daughter(std::vector<GenParticle> *gplist, int ind=1){ |
508 |
+ |
for(unsigned int i=0; i< gplist->size(); ++i){ |
509 |
+ |
if(ind<=1){ |
510 |
+ |
if(this->daughter1 == gplist->at(i).index){ |
511 |
+ |
return &(gplist->at(i)); |
512 |
+ |
} |
513 |
+ |
} |
514 |
+ |
else{ |
515 |
+ |
if(this->daughter2 == gplist->at(i).index){ |
516 |
+ |
return &(gplist->at(i)); |
517 |
+ |
} |
518 |
+ |
} |
519 |
+ |
} |
520 |
+ |
//std::cout << "WARNING: Daughter " << ind << " not found in list of GenParticles" << std::endl; |
521 |
+ |
return 0; |
522 |
+ |
} |
523 |
+ |
|
524 |
|
int mother1; |
525 |
|
int mother2; |
526 |
|
int daughter1; |
527 |
|
int daughter2; |
528 |
+ |
|
529 |
+ |
|
530 |
|
}; |
531 |
|
|
532 |
|
#endif |