ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/interface/Objects.hh
Revision: 1.6
Committed: Fri Mar 26 15:26:10 2010 UTC (15 years, 1 month ago) by amagnan
Content type: text/plain
Branch: MAIN
Changes since 1.5: +2 -1 lines
Log Message:
bug fix and analysis updates

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    
12     struct MCVars {
13     unsigned int index;
14 amagnan 1.2 double E;
15 amagnan 1.1 double pT;
16     double eta;
17     double phi;
18     int pdgId;
19     int status;
20     };
21    
22     struct GenVars {
23     bool valid;
24 amagnan 1.2 double E;
25 amagnan 1.1 double pT;
26     double eta;
27     double phi;
28     int charge;
29     int pdgId;
30     int status;
31     double mass;
32     double vx;
33     double vy;
34     double vz;
35     };
36    
37     struct BaseVars {
38 amagnan 1.2 double E;
39 amagnan 1.1 double pT;
40     double eta;
41     double phi;
42     float charge;
43     double vx;
44     double vy;
45     double vz;
46     };
47    
48     struct SCVars {
49     float sigmaEtaEta;
50     float sigmaIEtaIEta;
51     float e1x5;
52     float e2x5Max;
53     float e5x5;
54     float eOverP;
55     };
56    
57     struct EleIsoVars {
58     float calo;
59     float track;
60     float ecal;
61     float hcal;
62     };
63    
64     struct EleIDVars{
65     std::vector<std::pair<std::string,float> > electronIDs;
66     float hOverE;
67     float deltaPhiIn;
68     float deltaEtaIn;
69     };
70    
71 amagnan 1.3 struct MuTrkVars {
72     float IPd0;
73     float IPdz;
74     unsigned int nHits;
75     };
76    
77 amagnan 1.1 struct MuIsoVars {
78     float sumPt;
79     float emEt;
80     float hadEt;
81     float nTracks;
82     float nJets;
83     };
84    
85     struct MuIDVars{
86     unsigned short type;
87     std::vector<unsigned short> ids;
88     float caloCompat;
89     float segCompat;
90     unsigned int nChambers;
91     unsigned int nMatchesLoose;
92     unsigned int nMatchesMedium;
93     unsigned int nMatchesTight;
94     };
95    
96     struct TauLeadTrkVars{
97     double pT;
98     double eta;
99     double phi;
100     double matchDist;
101     double IPxy;
102     double IPz;
103     float signedSipt;
104     };
105    
106     struct CaloTauIsoVars{
107     unsigned int nIsoTracks;
108     unsigned int nSigTracks;
109     float leadTrackHCAL3x3hitsEtSum;
110     float leadTrackHCAL3x3hottesthitDEta;
111     float signalTracksInvariantMass;
112     float tracksInvariantMass;
113     float isolationTracksPtSum;
114     float isolationECALhitsEtSum;
115     float maximumHCALhitEt;
116     };
117    
118     struct CaloTauIDVars{
119     float byIsolation;
120     float byLeadingTrackFinding;
121     float byLeadingTrackPtCut;
122     };
123    
124     struct PFTauIsoVars{
125     unsigned int nSigCands;
126     unsigned int nIsoCands;
127     double maximumHCALPFClusterEt;
128     //double emFraction;
129     double hcalTotOverPLead;
130     double hcalMaxOverPLead;
131     double hcal3x3OverPLead;
132     double ecalStripSumEOverPLead;
133     double bremsRecoveryEOverPLead;
134     };
135    
136     //for hadr, neutr and gamma cands
137     struct PFTauCandVars{
138     unsigned int nSigCands;
139     unsigned int nIsoCands;
140     double isolationPtSum;
141     };
142    
143     struct PFTauIDVars{
144     float byLeadingTrackFinding;
145     float byLeadingTrackPtCut;
146     float byTrackIsolation;
147     float byECALIsolation;
148     float byIsolation;
149     float againstElectron;
150     float againstMuon;
151 amagnan 1.4 float byIsolationUsingLeadingPion;
152     float byTaNC;
153     float byTaNCfrHalfPercent;
154     float byTaNCfrOnePercent;
155     float byTaNCfrQuarterPercent;
156     float byTaNCfrTenthPercent;
157     float ecalIsolationUsingLeadingPion;
158     float leadingPionPtCut;
159     float trackIsolationUsingLeadingPion;
160 amagnan 1.1 };
161    
162     struct PFTauEleIDVars{
163     double pT;
164     double eta;
165     double phi;
166     float output;
167     float decision;
168     };
169    
170     struct PFTauMuIDVars{
171     float caloCompat;
172     float segCompat;
173     float decision;
174     };
175    
176     struct JetVars{
177     //1=had, 2=e, 3=mu for heavy quarks;
178     //2=uds, 3=g for light quarks
179     unsigned int flavour;
180     int partonFlavour;
181     unsigned int nAssociatedTracks;
182     double rawpT;
183 amagnan 1.5 float etaMean;
184     float phiMean;
185     float etaEtaMoment;
186     float phiPhiMoment;
187     float etaPhiMoment;
188 amagnan 1.1 //double rawEta;
189     //double rawPhi;
190     };
191    
192     struct CaloJetVars{
193     double maxEInEmTowers;
194     double maxEInHadTowers;
195     double energyFractionHadronic;
196     double emEnergyFraction;
197     double hadEnergyInHB;
198     double hadEnergyInHO;
199     double hadEnergyInHE;
200     double hadEnergyInHF;
201     double emEnergyInEB;
202     double emEnergyInEE;
203     double emEnergyInHF;
204     double towersArea;
205     double n90;
206     double n60;
207     };
208    
209     struct PFJetVars{
210     double chargedHadronEnergy;
211     double chargedHadronEnergyFraction;
212     double neutralHadronEnergy;
213     double neutralHadronEnergyFraction;
214     double chargedEmEnergy;
215     double chargedEmEnergyFraction;
216     double chargedMuEnergy;
217     double chargedMuEnergyFraction;
218     double neutralEmEnergy;
219     double neutralEmEnergyFraction;
220     double chargedMultiplicity;
221     double neutralMultiplicity;
222     double muonMultiplicity;
223     };
224    
225     struct JetBtagVars{
226     double cSV;
227     double cSVMVA;
228     double iPMVA;
229     double bProba;
230     double probability;
231     double sSV;
232 amagnan 1.4 double softElectronByPt;
233     double softElectronByIP3d;
234 amagnan 1.1 double softMuon;
235 amagnan 1.4 double softMuonByPt;
236     double softMuonByIP3d;
237 amagnan 1.1 double tCHE;
238     double tCHP;
239     };
240    
241 amagnan 1.4
242     struct JetIDVars{
243     double fHPD;
244     double fRBX;
245 amagnan 1.6 double n90Hits;
246 amagnan 1.4 //double fSubDetector1;
247     //double fSubDetector2;
248     //double fSubDetector3;
249     //double fSubDetector4;
250     //double restrictedEMF;
251     //int nHCALTowers;
252     //int nECALTowers;
253     //double approximatefHPD;
254     //double approximatefRBX;
255     //int hitsInN90;
256     // muon hits id
257     //int numberOfHits2RPC;
258     //int numberOfHits3RPC;
259     //int numberOfHitsRPC;
260     };
261    
262    
263 amagnan 1.1 struct MetVars{
264     double mET;
265     double mEx;
266     double mEy;
267     double sumET;
268     double phi;
269     double mEtSig;
270     };
271    
272     struct TriggerVars{
273     std::string name;
274     unsigned int index;
275     bool accept;
276     };
277    
278 amagnan 1.4
279     struct VertexVars{
280     std::vector<float> trackWeights;
281     double chi2;
282     double ndof;
283     double x;
284     double y;
285     double z;
286     double xError;
287     double yError;
288     double zError;
289     double cov01;
290     double cov02;
291     double cov12;
292     };
293    
294 amagnan 1.2 double DeltaPhi(const double phi1, const double phi2);
295    
296     double DeltaR(const BaseVars & v1, const BaseVars & v2);
297 amagnan 1.6 double DeltaR(const BaseVars & v1, const GenVars & v2);
298 amagnan 1.2
299     double SameSign(const BaseVars & v1, const BaseVars & v2);
300    
301     double OppSign(const BaseVars & v1, const BaseVars & v2);
302    
303     TLorentzVector FourMomentum(const BaseVars & v, const double scale=1) ;
304    
305     double TransverseMass(const BaseVars & leg1,
306     const BaseVars & leg2,
307     const double mEx,
308     const double mEy);
309    
310     double TransverseMass(const BaseVars & leg1,
311     const double mEx,
312     const double mEy);
313    
314     TLorentzVector FourMomentumCDFmethod(const BaseVars & leg1,
315     const BaseVars & leg2,
316     double mEx,
317     double mEy);
318    
319     TLorentzVector FourMomentumCollinearApprox(const BaseVars & leg1,
320     const BaseVars & leg2,
321     double mEx,
322     double mEy);
323 amagnan 1.1
324 amagnan 1.2 }//namespace
325 amagnan 1.1
326     #endif