ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/interface/Objects.hh
Revision: 1.21
Committed: Thu May 5 15:09:04 2011 UTC (14 years ago) by agilbert
Content type: text/plain
Branch: MAIN
Changes since 1.20: +1 -0 lines
Log Message:
Write track pt vector for each vertex

File Contents

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