ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/interface/Objects.hh
Revision: 1.9
Committed: Mon May 10 18:45:09 2010 UTC (14 years, 11 months ago) by amagnan
Content type: text/plain
Branch: MAIN
CVS Tags: v00-05-00
Changes since 1.8: +32 -7 lines
Log Message:
add etaDet calculation, rapidity, adapt to new reco::JPTJet format

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