ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/interface/Objects.hh
Revision: 1.12
Committed: Fri Aug 27 13:17:14 2010 UTC (14 years, 8 months ago) by amagnan
Content type: text/plain
Branch: MAIN
Changes since 1.11: +3 -1 lines
Log Message:
add HLT matches for elec and mu and ID WP95 for elec

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.12 bool 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     float IPd0;
102     float IPdz;
103     unsigned int nHits;
104     };
105    
106 amagnan 1.1 struct MuIsoVars {
107     float sumPt;
108     float emEt;
109     float hadEt;
110     float nTracks;
111     float nJets;
112     };
113    
114     struct MuIDVars{
115     unsigned short type;
116     std::vector<unsigned short> ids;
117     float caloCompat;
118     float segCompat;
119     unsigned int nChambers;
120     unsigned int nMatchesLoose;
121     unsigned int nMatchesMedium;
122     unsigned int nMatchesTight;
123     };
124    
125 amagnan 1.9 struct TrkVars{
126 amagnan 1.1 double pT;
127     double eta;
128     double phi;
129     double matchDist;
130     double IPxy;
131     double IPz;
132     float signedSipt;
133     };
134    
135     struct CaloTauIsoVars{
136     unsigned int nIsoTracks;
137     unsigned int nSigTracks;
138     float leadTrackHCAL3x3hitsEtSum;
139     float leadTrackHCAL3x3hottesthitDEta;
140     float signalTracksInvariantMass;
141     float tracksInvariantMass;
142     float isolationTracksPtSum;
143     float isolationECALhitsEtSum;
144     float maximumHCALhitEt;
145     };
146    
147     struct CaloTauIDVars{
148     float byIsolation;
149     float byLeadingTrackFinding;
150     float byLeadingTrackPtCut;
151     };
152    
153     struct PFTauIsoVars{
154     unsigned int nSigCands;
155     unsigned int nIsoCands;
156     double maximumHCALPFClusterEt;
157     //double emFraction;
158     double hcalTotOverPLead;
159     double hcalMaxOverPLead;
160     double hcal3x3OverPLead;
161     double ecalStripSumEOverPLead;
162     double bremsRecoveryEOverPLead;
163     };
164    
165     //for hadr, neutr and gamma cands
166     struct PFTauCandVars{
167     unsigned int nSigCands;
168     unsigned int nIsoCands;
169     double isolationPtSum;
170     };
171    
172     struct PFTauIDVars{
173     float byLeadingTrackFinding;
174     float byLeadingTrackPtCut;
175     float byTrackIsolation;
176     float byECALIsolation;
177     float byIsolation;
178     float againstElectron;
179     float againstMuon;
180 amagnan 1.4 float byIsolationUsingLeadingPion;
181     float byTaNC;
182     float byTaNCfrHalfPercent;
183     float byTaNCfrOnePercent;
184     float byTaNCfrQuarterPercent;
185     float byTaNCfrTenthPercent;
186     float ecalIsolationUsingLeadingPion;
187     float leadingPionPtCut;
188     float trackIsolationUsingLeadingPion;
189 amagnan 1.1 };
190    
191     struct PFTauEleIDVars{
192     double pT;
193     double eta;
194     double phi;
195     float output;
196     float decision;
197     };
198    
199     struct PFTauMuIDVars{
200     float caloCompat;
201     float segCompat;
202     float decision;
203     };
204    
205     struct JetVars{
206     //1=had, 2=e, 3=mu for heavy quarks;
207     //2=uds, 3=g for light quarks
208     unsigned int flavour;
209     int partonFlavour;
210     unsigned int nAssociatedTracks;
211     double rawpT;
212 amagnan 1.5 float etaMean;
213     float phiMean;
214     float etaEtaMoment;
215     float phiPhiMoment;
216     float etaPhiMoment;
217 amagnan 1.9 bool l1Match;
218     bool hltMatch;
219 amagnan 1.1 //double rawEta;
220     //double rawPhi;
221     };
222    
223     struct CaloJetVars{
224     double maxEInEmTowers;
225     double maxEInHadTowers;
226     double energyFractionHadronic;
227     double emEnergyFraction;
228     double hadEnergyInHB;
229     double hadEnergyInHO;
230     double hadEnergyInHE;
231     double hadEnergyInHF;
232     double emEnergyInEB;
233     double emEnergyInEE;
234     double emEnergyInHF;
235     double towersArea;
236     double n90;
237     double n60;
238     };
239    
240 amagnan 1.9 struct JPTJetVars{
241 amagnan 1.10 float zspCorrection;
242     int elecMultiplicity;
243 amagnan 1.9 std::vector<TrkVars> pionsInCone;
244     std::vector<TrkVars> pionsCurledOut;
245     std::vector<TrkVars> pionsCurledIn;
246     std::vector<TrkVars> elecsInCone;
247     std::vector<TrkVars> elecsCurledOut;
248     std::vector<TrkVars> elecsCurledIn;
249     std::vector<TrkVars> muonsInCone;
250     std::vector<TrkVars> muonsCurledOut;
251     std::vector<TrkVars> muonsCurledIn;
252     };
253    
254     struct JPTPFJetVars{
255 amagnan 1.1 double chargedHadronEnergy;
256     double chargedHadronEnergyFraction;
257     double neutralHadronEnergy;
258     double neutralHadronEnergyFraction;
259     double chargedEmEnergy;
260     double chargedEmEnergyFraction;
261     double neutralEmEnergy;
262     double neutralEmEnergyFraction;
263     double chargedMultiplicity;
264 amagnan 1.9 double muonMultiplicity;
265     };
266    
267     struct PFJetVars{
268     double chargedMuEnergy;
269     double chargedMuEnergyFraction;
270 amagnan 1.1 double neutralMultiplicity;
271     };
272    
273     struct JetBtagVars{
274     double cSV;
275     double cSVMVA;
276     double iPMVA;
277     double bProba;
278     double probability;
279 amagnan 1.8 double sSVHE;
280     double sSVHP;
281 amagnan 1.4 double softElectronByPt;
282     double softElectronByIP3d;
283 amagnan 1.1 double softMuon;
284 amagnan 1.4 double softMuonByPt;
285     double softMuonByIP3d;
286 amagnan 1.1 double tCHE;
287     double tCHP;
288     };
289    
290 amagnan 1.4
291     struct JetIDVars{
292     double fHPD;
293     double fRBX;
294 amagnan 1.9 int n90Hits;
295 amagnan 1.4 //double fSubDetector1;
296     //double fSubDetector2;
297     //double fSubDetector3;
298     //double fSubDetector4;
299 amagnan 1.10 double restrictedEMF;
300     int nHCALTowers;
301     int nECALTowers;
302 amagnan 1.4 //double approximatefHPD;
303     //double approximatefRBX;
304 amagnan 1.9 int hitsInN90;
305 amagnan 1.4 // muon hits id
306     //int numberOfHits2RPC;
307     //int numberOfHits3RPC;
308     //int numberOfHitsRPC;
309     };
310    
311    
312 amagnan 1.1 struct MetVars{
313     double mET;
314     double mEx;
315     double mEy;
316     double sumET;
317     double phi;
318     double mEtSig;
319     };
320    
321     struct TriggerVars{
322     std::string name;
323     unsigned int index;
324     bool accept;
325     };
326    
327 amagnan 1.4
328     struct VertexVars{
329     std::vector<float> trackWeights;
330     double chi2;
331     double ndof;
332     double x;
333     double y;
334     double z;
335     double xError;
336     double yError;
337     double zError;
338     double cov01;
339     double cov02;
340     double cov12;
341     };
342    
343 amagnan 1.2 double DeltaPhi(const double phi1, const double phi2);
344    
345     double DeltaR(const BaseVars & v1, const BaseVars & v2);
346 amagnan 1.6 double DeltaR(const BaseVars & v1, const GenVars & v2);
347 amagnan 1.2
348     double SameSign(const BaseVars & v1, const BaseVars & v2);
349    
350     double OppSign(const BaseVars & v1, const BaseVars & v2);
351    
352     TLorentzVector FourMomentum(const BaseVars & v, const double scale=1) ;
353    
354     double TransverseMass(const BaseVars & leg1,
355     const BaseVars & leg2,
356     const double mEx,
357     const double mEy);
358    
359     double TransverseMass(const BaseVars & leg1,
360     const double mEx,
361     const double mEy);
362    
363     TLorentzVector FourMomentumCDFmethod(const BaseVars & leg1,
364     const BaseVars & leg2,
365     double mEx,
366     double mEy);
367    
368     TLorentzVector FourMomentumCollinearApprox(const BaseVars & leg1,
369     const BaseVars & leg2,
370     double mEx,
371     double mEy);
372 amagnan 1.1
373 amagnan 1.9 double EtaDetector(const BaseVars & v1);
374     double EtaDetector(const GenVars & v1);
375    
376 amagnan 1.2 }//namespace
377 amagnan 1.1
378     #endif