ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/interface/Objects.hh
Revision: 1.15
Committed: Sat Sep 25 13:03:50 2010 UTC (14 years, 7 months ago) by amagnan
Content type: text/plain
Branch: MAIN
CVS Tags: v00-05-01
Changes since 1.14: +1 -1 lines
Log Message:
added gg,qg,qq separation

File Contents

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