1 |
#ifndef HbbAnalysis_Objects_hh
|
2 |
#define HbbAnalysis_Objects_hh
|
3 |
|
4 |
#include <vector>
|
5 |
#include <string>
|
6 |
#include <iostream>
|
7 |
|
8 |
#include "TLorentzVector.h"
|
9 |
|
10 |
namespace HbbAnalysis {
|
11 |
|
12 |
struct PUVars {
|
13 |
int bunchCrossing;
|
14 |
unsigned int numInteractions;
|
15 |
PUVars(){
|
16 |
bunchCrossing = 0;
|
17 |
numInteractions = 0;
|
18 |
}
|
19 |
};
|
20 |
|
21 |
struct MCVars {
|
22 |
unsigned int index;
|
23 |
double E;
|
24 |
double pT;
|
25 |
double eta;
|
26 |
double y;
|
27 |
double phi;
|
28 |
int pdgId;
|
29 |
int status;
|
30 |
};
|
31 |
|
32 |
struct HLTVars {
|
33 |
float pT;
|
34 |
float eta;
|
35 |
float phi;
|
36 |
int id;
|
37 |
float mass;
|
38 |
unsigned int type;//1=EM, 2=muon, 3=jet, 0=unknown
|
39 |
};
|
40 |
|
41 |
struct L1Vars {
|
42 |
//type:
|
43 |
//0 = empty
|
44 |
//1 = central jet
|
45 |
//2 = tau jet
|
46 |
//3 = forward jet
|
47 |
unsigned int type;
|
48 |
int bx;
|
49 |
float pT;
|
50 |
float ET;
|
51 |
float eta;
|
52 |
float phi;
|
53 |
};
|
54 |
|
55 |
struct GenVars {
|
56 |
bool valid;
|
57 |
double E;
|
58 |
double pT;
|
59 |
double eta;
|
60 |
double y;
|
61 |
double phi;
|
62 |
int charge;
|
63 |
int pdgId;
|
64 |
int status;
|
65 |
double mass;
|
66 |
double vx;
|
67 |
double vy;
|
68 |
double vz;
|
69 |
};
|
70 |
|
71 |
struct BaseVars {
|
72 |
double E;
|
73 |
double pT;
|
74 |
double eta;
|
75 |
double y;
|
76 |
double phi;
|
77 |
float charge;
|
78 |
double vx;
|
79 |
double vy;
|
80 |
double vz;
|
81 |
bool hltMatch;
|
82 |
};
|
83 |
|
84 |
struct SCVars {
|
85 |
float sigmaEtaEta;
|
86 |
float sigmaIEtaIEta;
|
87 |
float e1x5;
|
88 |
float e2x5Max;
|
89 |
float e5x5;
|
90 |
float eOverP;
|
91 |
};
|
92 |
|
93 |
struct EleIsoVars {
|
94 |
float calo;
|
95 |
float track;
|
96 |
float ecal;
|
97 |
float hcal;
|
98 |
};
|
99 |
|
100 |
struct EleIDVars{
|
101 |
unsigned short idAndIso;
|
102 |
std::vector<std::pair<std::string,float> > electronIDs;
|
103 |
float hOverE;
|
104 |
float deltaPhiIn;
|
105 |
float deltaEtaIn;
|
106 |
bool ecalDrivenSeed;
|
107 |
bool trackerDrivenSeed;
|
108 |
float dB;
|
109 |
};
|
110 |
|
111 |
struct MuTrkVars {
|
112 |
float dxy;
|
113 |
float dz;
|
114 |
float normalizedChi2;
|
115 |
unsigned int muonHits;
|
116 |
int charge;
|
117 |
unsigned int trackerHits;
|
118 |
unsigned int pixelHits;
|
119 |
};
|
120 |
|
121 |
struct MuIsoVars {
|
122 |
float sumPt;
|
123 |
float emEt;
|
124 |
float hadEt;
|
125 |
float nTracks;
|
126 |
float nJets;
|
127 |
};
|
128 |
|
129 |
struct MuIDVars{
|
130 |
unsigned short type;
|
131 |
std::vector<unsigned short> ids;
|
132 |
float caloCompat;
|
133 |
float segCompat;
|
134 |
unsigned int nChambers;
|
135 |
unsigned int nMatchesLoose;
|
136 |
unsigned int nMatchesMedium;
|
137 |
unsigned int nMatchesTight;
|
138 |
float dB;
|
139 |
};
|
140 |
|
141 |
|
142 |
struct TrkVars{
|
143 |
double pT;
|
144 |
double eta;
|
145 |
double phi;
|
146 |
double matchDist;
|
147 |
double IPxy;
|
148 |
double IPz;
|
149 |
float signedSipt;
|
150 |
};
|
151 |
|
152 |
|
153 |
struct CaloTauIsoVars{
|
154 |
unsigned int nIsoTracks;
|
155 |
unsigned int nSigTracks;
|
156 |
float leadTrackHCAL3x3hitsEtSum;
|
157 |
float leadTrackHCAL3x3hottesthitDEta;
|
158 |
float signalTracksInvariantMass;
|
159 |
float tracksInvariantMass;
|
160 |
float isolationTracksPtSum;
|
161 |
float isolationECALhitsEtSum;
|
162 |
float maximumHCALhitEt;
|
163 |
};
|
164 |
|
165 |
struct CaloTauIDVars{
|
166 |
float byIsolation;
|
167 |
float byLeadingTrackFinding;
|
168 |
float byLeadingTrackPtCut;
|
169 |
};
|
170 |
|
171 |
struct PFTauIsoVars{
|
172 |
unsigned int nSigCands;
|
173 |
unsigned int nIsoCands;
|
174 |
double maximumHCALPFClusterEt;
|
175 |
//double emFraction;
|
176 |
double hcalTotOverPLead;
|
177 |
double hcalMaxOverPLead;
|
178 |
double hcal3x3OverPLead;
|
179 |
double ecalStripSumEOverPLead;
|
180 |
double bremsRecoveryEOverPLead;
|
181 |
};
|
182 |
|
183 |
//for hadr, neutr and gamma cands
|
184 |
struct PFTauCandVars{
|
185 |
unsigned int nSigCands;
|
186 |
unsigned int nIsoCands;
|
187 |
double isolationPtSum;
|
188 |
};
|
189 |
|
190 |
struct PFTauIDVars{
|
191 |
float byLeadingTrackFinding;
|
192 |
float byLeadingTrackPtCut;
|
193 |
float byTrackIsolation;
|
194 |
float byECALIsolation;
|
195 |
float byIsolation;
|
196 |
float againstElectron;
|
197 |
float againstMuon;
|
198 |
float byIsolationUsingLeadingPion;
|
199 |
float byTaNC;
|
200 |
float byTaNCfrHalfPercent;
|
201 |
float byTaNCfrOnePercent;
|
202 |
float byTaNCfrQuarterPercent;
|
203 |
float byTaNCfrTenthPercent;
|
204 |
float ecalIsolationUsingLeadingPion;
|
205 |
float leadingPionPtCut;
|
206 |
float trackIsolationUsingLeadingPion;
|
207 |
};
|
208 |
|
209 |
struct PFTauEleIDVars{
|
210 |
double pT;
|
211 |
double eta;
|
212 |
double phi;
|
213 |
float output;
|
214 |
float decision;
|
215 |
};
|
216 |
|
217 |
struct PFTauMuIDVars{
|
218 |
float caloCompat;
|
219 |
float segCompat;
|
220 |
float decision;
|
221 |
};
|
222 |
|
223 |
struct JetVars{
|
224 |
//1=had, 2=e, 3=mu for heavy quarks;
|
225 |
//2=uds, 3=g for light quarks
|
226 |
unsigned int flavour;
|
227 |
int partonFlavour;
|
228 |
unsigned int nAssociatedTracks;
|
229 |
double rawpT;
|
230 |
float etaMean;
|
231 |
float phiMean;
|
232 |
float etaEtaMoment;
|
233 |
float phiPhiMoment;
|
234 |
float etaPhiMoment;
|
235 |
//double rawEta;
|
236 |
//double rawPhi;
|
237 |
};
|
238 |
|
239 |
struct CaloJetVars{
|
240 |
double maxEInEmTowers;
|
241 |
double maxEInHadTowers;
|
242 |
double energyFractionHadronic;
|
243 |
double emEnergyFraction;
|
244 |
double hadEnergyInHB;
|
245 |
double hadEnergyInHO;
|
246 |
double hadEnergyInHE;
|
247 |
double hadEnergyInHF;
|
248 |
double emEnergyInEB;
|
249 |
double emEnergyInEE;
|
250 |
double emEnergyInHF;
|
251 |
double towersArea;
|
252 |
double n90;
|
253 |
double n60;
|
254 |
};
|
255 |
|
256 |
struct JPTJetVars{
|
257 |
float zspCorrection;
|
258 |
int elecMultiplicity;
|
259 |
float calopT;
|
260 |
float caloEta;
|
261 |
//std::vector<TrkVars> pionsInCone;
|
262 |
//std::vector<TrkVars> pionsCurledOut;
|
263 |
//std::vector<TrkVars> pionsCurledIn;
|
264 |
//std::vector<TrkVars> elecsInCone;
|
265 |
//std::vector<TrkVars> elecsCurledOut;
|
266 |
//std::vector<TrkVars> elecsCurledIn;
|
267 |
//std::vector<TrkVars> muonsInCone;
|
268 |
//std::vector<TrkVars> muonsCurledOut;
|
269 |
//std::vector<TrkVars> muonsCurledIn;
|
270 |
std::vector< std::pair<unsigned int,double> > particleStatusPt;
|
271 |
};
|
272 |
|
273 |
struct JPTPFJetVars{
|
274 |
double chargedHadronEnergy;
|
275 |
double chargedHadronEnergyFraction;
|
276 |
double neutralHadronEnergy;
|
277 |
double neutralHadronEnergyFraction;
|
278 |
double chargedEmEnergy;
|
279 |
double chargedEmEnergyFraction;
|
280 |
double neutralEmEnergy;
|
281 |
double neutralEmEnergyFraction;
|
282 |
double chargedMultiplicity;
|
283 |
double muonMultiplicity;
|
284 |
};
|
285 |
|
286 |
struct PFJetVars{
|
287 |
double chargedMuEnergy;
|
288 |
double chargedMuEnergyFraction;
|
289 |
double neutralMultiplicity;
|
290 |
unsigned numberOfDaughters;
|
291 |
double HFHadronEnergy;
|
292 |
};
|
293 |
|
294 |
struct JetBtagVars{
|
295 |
double cSV;
|
296 |
double cSVMVA;
|
297 |
double iPMVA;
|
298 |
double bProba;
|
299 |
double probability;
|
300 |
double sSVHE;
|
301 |
double sSVHP;
|
302 |
double softElectronByPt;
|
303 |
double softElectronByIP3d;
|
304 |
double softMuon;
|
305 |
double softMuonByPt;
|
306 |
double softMuonByIP3d;
|
307 |
double tCHE;
|
308 |
double tCHP;
|
309 |
};
|
310 |
|
311 |
|
312 |
struct JetIDVars{
|
313 |
double fHPD;
|
314 |
double fRBX;
|
315 |
int n90Hits;
|
316 |
//double fSubDetector1;
|
317 |
//double fSubDetector2;
|
318 |
//double fSubDetector3;
|
319 |
//double fSubDetector4;
|
320 |
double restrictedEMF;
|
321 |
int nHCALTowers;
|
322 |
int nECALTowers;
|
323 |
//double approximatefHPD;
|
324 |
//double approximatefRBX;
|
325 |
int hitsInN90;
|
326 |
// muon hits id
|
327 |
//int numberOfHits2RPC;
|
328 |
//int numberOfHits3RPC;
|
329 |
//int numberOfHitsRPC;
|
330 |
};
|
331 |
|
332 |
struct JetECorVars{
|
333 |
std::vector<std::pair<std::string,double> > Levels;
|
334 |
};
|
335 |
|
336 |
|
337 |
struct MetVars{
|
338 |
double mET;
|
339 |
double mEx;
|
340 |
double mEy;
|
341 |
double sumET;
|
342 |
double phi;
|
343 |
double mEtSig;
|
344 |
};
|
345 |
|
346 |
struct TriggerVars{
|
347 |
std::string name;
|
348 |
unsigned int index;
|
349 |
bool accept;
|
350 |
};
|
351 |
|
352 |
|
353 |
struct VertexVars{
|
354 |
std::vector<float> trackWeights;
|
355 |
std::vector<float> trackpT;
|
356 |
double chi2;
|
357 |
double ndof;
|
358 |
double x;
|
359 |
double y;
|
360 |
double z;
|
361 |
double rho;
|
362 |
double xError;
|
363 |
double yError;
|
364 |
double zError;
|
365 |
double cov01;
|
366 |
double cov02;
|
367 |
double cov12;
|
368 |
};
|
369 |
|
370 |
struct BeamSpotVars{
|
371 |
double x0;
|
372 |
double y0;
|
373 |
double z0;
|
374 |
double sigmaZ;
|
375 |
double BeamWidthX;
|
376 |
double BeamWidthY;
|
377 |
double x0Error;
|
378 |
double y0Error;
|
379 |
double z0Error;
|
380 |
double sigmaZ0Error;
|
381 |
double BeamWidthXError;
|
382 |
double BeamWidthYError;
|
383 |
//double dxdz;
|
384 |
//double dydz;
|
385 |
//double dxdzError;
|
386 |
//double dydzError;
|
387 |
//BeamType type();
|
388 |
//enum BeamType { Unknown=-1, Fake=0, LHC=1, Tracker=2 };
|
389 |
//double emittanceX() const { return emittanceX_; }
|
390 |
//double emittanceY() const { return emittanceY_; }
|
391 |
//double betaStar() const { return betaStar_; }
|
392 |
};
|
393 |
|
394 |
|
395 |
|
396 |
|
397 |
double DeltaPhi(const double phi1, const double phi2);
|
398 |
|
399 |
double DeltaR(const BaseVars & v1, const BaseVars & v2);
|
400 |
double DeltaR(const BaseVars & v1, const GenVars & v2);
|
401 |
|
402 |
double SameSign(const BaseVars & v1, const BaseVars & v2);
|
403 |
|
404 |
double OppSign(const BaseVars & v1, const BaseVars & v2);
|
405 |
|
406 |
TLorentzVector FourMomentum(const BaseVars & v, const double scale=1) ;
|
407 |
|
408 |
double TransverseMass(const BaseVars & leg1,
|
409 |
const BaseVars & leg2,
|
410 |
const double mEx,
|
411 |
const double mEy);
|
412 |
|
413 |
double TransverseMass(const BaseVars & leg1,
|
414 |
const double mEx,
|
415 |
const double mEy);
|
416 |
|
417 |
TLorentzVector FourMomentumCDFmethod(const BaseVars & leg1,
|
418 |
const BaseVars & leg2,
|
419 |
double mEx,
|
420 |
double mEy);
|
421 |
|
422 |
TLorentzVector FourMomentumCollinearApprox(const BaseVars & leg1,
|
423 |
const BaseVars & leg2,
|
424 |
double mEx,
|
425 |
double mEy);
|
426 |
|
427 |
double EtaDetector(const BaseVars & v1);
|
428 |
double EtaDetector(const GenVars & v1);
|
429 |
|
430 |
}//namespace
|
431 |
|
432 |
#endif
|