ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/TRootMuon.h
Revision: 1.11
Committed: Tue Apr 21 10:42:22 2009 UTC (16 years ago) by lethuill
Content type: text/plain
Branch: MAIN
CVS Tags: RecoPhoton_2_2_7_02, pat_2_2_7_01
Changes since 1.10: +23 -3 lines
Log Message:
Use beam spot in impact parameter calculation

File Contents

# User Rev Content
1 mlethuil 1.1 #ifndef TRootMuon_h
2     #define TRootMuon_h
3    
4     #include "../interface/TRootParticle.h"
5    
6     using namespace std;
7    
8     class TRootMuon : public TRootParticle
9     {
10 lethuill 1.6
11 mlethuil 1.1 public:
12 lethuill 1.6
13 lethuill 1.2 TRootMuon() :
14 lethuill 1.5 TRootParticle()
15     ,et_em_(-9999.)
16     ,et_emS9_(-9999.)
17     ,et_had_(-9999.)
18     ,et_hadS9_(-9999.)
19     ,et_ho_(-9999.)
20     ,et_hoS9_(-9999.)
21     ,caloCompatibility_(-9999.)
22     ,isoR03_emEt_(-9999.)
23     ,isoR03_hadEt_(-9999.)
24     ,isoR03_hoEt_(-9999.)
25     ,isoR03_sumPt_(-9999.)
26     ,isoR03_nTracks_(-9999)
27     ,isoR03_nJets_(-9999)
28     ,isoR05_emEt_(-9999.)
29     ,isoR05_hadEt_(-9999.)
30     ,isoR05_hoEt_(-9999.)
31     ,isoR05_sumPt_(-9999.)
32     ,isoR05_nTracks_(-9999)
33     ,isoR05_nJets_(-9999)
34     ,energyValid_(false)
35     ,matchesValid_(false)
36     ,isolationValid_(false)
37     ,direction_(-9999)
38     ,algo_(-9999)
39     ,id_(-9999)
40 lethuill 1.11 ,numberOfValidPixelHits_(-1)
41     ,numberOfValidTrackerHits_(-1)
42 lethuill 1.9 ,pixelLayersWithMeasurement_(-1)
43     ,stripLayersWithMeasurement_(-1)
44 lethuill 1.8 ,d0_(-9999.)
45     ,d0Error_(-9999.)
46     ,dsz_(-9999.)
47     ,dszError_(-9999.)
48     ,normalizedChi2_(-9999.)
49     ,ptError_(-9999.)
50     ,etaError_(-9999.)
51     ,phiError_(-9999.)
52 lethuill 1.10 ,ip3DSignificance_(-9999.)
53 lethuill 1.5 {;}
54 lethuill 1.6
55 lethuill 1.2 TRootMuon(const TRootMuon& muon) :
56 lethuill 1.5 TRootParticle(muon)
57     ,et_em_(muon.et_em_)
58     ,et_emS9_(muon.et_emS9_)
59     ,et_had_(muon.et_had_)
60     ,et_hadS9_(muon.et_hadS9_)
61     ,et_ho_(muon.et_ho_)
62     ,et_hoS9_(muon.et_hoS9_)
63     ,caloCompatibility_(muon.caloCompatibility_)
64     ,isoR03_emEt_(muon.isoR03_emEt_)
65     ,isoR03_hadEt_(muon.isoR03_hadEt_)
66     ,isoR03_hoEt_(muon.isoR03_hoEt_)
67     ,isoR03_sumPt_(muon.isoR03_sumPt_)
68     ,isoR03_nTracks_(muon.isoR03_nTracks_)
69     ,isoR03_nJets_(muon.isoR03_nJets_)
70     ,isoR05_emEt_(muon.isoR05_emEt_)
71     ,isoR05_hadEt_(muon.isoR05_hadEt_)
72     ,isoR05_hoEt_(muon.isoR05_hoEt_)
73     ,isoR05_sumPt_(muon.isoR05_sumPt_)
74     ,isoR05_nTracks_(muon.isoR05_nTracks_)
75     ,isoR05_nJets_(muon.isoR05_nJets_)
76     ,energyValid_(muon.energyValid_)
77     ,matchesValid_(muon.matchesValid_)
78     ,isolationValid_(muon.isolationValid_)
79     ,direction_(muon.direction_)
80     ,algo_(muon.algo_)
81     ,id_(muon.id_)
82 lethuill 1.11 ,numberOfValidPixelHits_(muon.numberOfValidPixelHits_)
83     ,numberOfValidTrackerHits_(muon.numberOfValidTrackerHits_)
84 lethuill 1.9 ,pixelLayersWithMeasurement_(muon.pixelLayersWithMeasurement_)
85     ,stripLayersWithMeasurement_(muon.stripLayersWithMeasurement_)
86 lethuill 1.8 ,d0_(muon.d0_)
87     ,d0Error_(muon.d0Error_)
88     ,dsz_(muon.dsz_)
89     ,dszError_(muon.dszError_)
90     ,normalizedChi2_(muon.normalizedChi2_)
91     ,ptError_(muon.ptError_)
92     ,etaError_(muon.etaError_)
93     ,phiError_(muon.phiError_)
94 lethuill 1.10 ,ip3DSignificance_(muon.ip3DSignificance_)
95 lethuill 1.5 {;}
96 lethuill 1.6
97 lethuill 1.2 TRootMuon(Double_t px, Double_t py, Double_t pz, Double_t e) :
98 lethuill 1.5 TRootParticle(px,py,pz,e)
99     ,et_em_(-9999.)
100     ,et_emS9_(-9999.)
101     ,et_had_(-9999.)
102     ,et_hadS9_(-9999.)
103     ,et_ho_(-9999.)
104     ,et_hoS9_(-9999.)
105     ,caloCompatibility_(-9999.)
106     ,isoR03_emEt_(-9999.)
107     ,isoR03_hadEt_(-9999.)
108     ,isoR03_hoEt_(-9999.)
109     ,isoR03_sumPt_(-9999.)
110     ,isoR03_nTracks_(-9999)
111     ,isoR03_nJets_(-9999)
112     ,isoR05_emEt_(-9999.)
113     ,isoR05_hadEt_(-9999.)
114     ,isoR05_hoEt_(-9999.)
115     ,isoR05_sumPt_(-9999.)
116     ,isoR05_nTracks_(-9999)
117     ,isoR05_nJets_(-9999)
118     ,energyValid_(false)
119     ,matchesValid_(false)
120     ,isolationValid_(false)
121     ,direction_(-9999)
122     ,algo_(-9999)
123     ,id_(-9999)
124 lethuill 1.11 ,numberOfValidPixelHits_(-1)
125     ,numberOfValidTrackerHits_(-1)
126 lethuill 1.9 ,pixelLayersWithMeasurement_(-1)
127     ,stripLayersWithMeasurement_(-1)
128 lethuill 1.8 ,d0_(-9999.)
129     ,d0Error_(-9999.)
130     ,dsz_(-9999.)
131     ,dszError_(-9999.)
132     ,normalizedChi2_(-9999.)
133     ,ptError_(-9999.)
134     ,etaError_(-9999.)
135     ,phiError_(-9999.)
136 lethuill 1.10 ,ip3DSignificance_(-9999.)
137 lethuill 1.5 {;}
138 lethuill 1.6
139 lethuill 1.2 TRootMuon(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z) :
140 lethuill 1.5 TRootParticle(px,py,pz,e,vtx_x,vtx_y,vtx_z)
141     ,et_em_(-9999.)
142     ,et_emS9_(-9999.)
143     ,et_had_(-9999.)
144     ,et_hadS9_(-9999.)
145     ,et_ho_(-9999.)
146     ,et_hoS9_(-9999.)
147     ,caloCompatibility_(-9999.)
148     ,isoR03_emEt_(-9999.)
149     ,isoR03_hadEt_(-9999.)
150     ,isoR03_hoEt_(-9999.)
151     ,isoR03_sumPt_(-9999.)
152     ,isoR03_nTracks_(-9999)
153     ,isoR03_nJets_(-9999)
154     ,isoR05_emEt_(-9999.)
155     ,isoR05_hadEt_(-9999.)
156     ,isoR05_hoEt_(-9999.)
157     ,isoR05_sumPt_(-9999.)
158     ,isoR05_nTracks_(-9999)
159     ,isoR05_nJets_(-9999)
160     ,energyValid_(false)
161     ,matchesValid_(false)
162     ,isolationValid_(false)
163     ,direction_(-9999)
164     ,algo_(-9999)
165     ,id_(-9999)
166 lethuill 1.11 ,numberOfValidPixelHits_(-1)
167     ,numberOfValidTrackerHits_(-1)
168 lethuill 1.9 ,pixelLayersWithMeasurement_(-1)
169     ,stripLayersWithMeasurement_(-1)
170 lethuill 1.8 ,d0_(-9999.)
171     ,d0Error_(-9999.)
172     ,dsz_(-9999.)
173     ,dszError_(-9999.)
174     ,normalizedChi2_(-9999.)
175     ,ptError_(-9999.)
176     ,etaError_(-9999.)
177     ,phiError_(-9999.)
178 lethuill 1.10 ,ip3DSignificance_(-9999.)
179 lethuill 1.5 {;}
180 lethuill 1.6
181 lethuill 1.2 TRootMuon(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z, Int_t type, Float_t charge) :
182 lethuill 1.5 TRootParticle(px,py,pz,e,vtx_x,vtx_y,vtx_z,type,charge)
183     ,et_em_(-9999.)
184     ,et_emS9_(-9999.)
185     ,et_had_(-9999.)
186     ,et_hadS9_(-9999.)
187     ,et_ho_(-9999.)
188     ,et_hoS9_(-9999.)
189     ,caloCompatibility_(-9999.)
190     ,isoR03_emEt_(-9999.)
191     ,isoR03_hadEt_(-9999.)
192     ,isoR03_hoEt_(-9999.)
193     ,isoR03_sumPt_(-9999.)
194     ,isoR03_nTracks_(-9999)
195     ,isoR03_nJets_(-9999)
196     ,isoR05_emEt_(-9999.)
197     ,isoR05_hadEt_(-9999.)
198     ,isoR05_hoEt_(-9999.)
199     ,isoR05_sumPt_(-9999.)
200     ,isoR05_nTracks_(-9999)
201     ,isoR05_nJets_(-9999)
202     ,energyValid_(false)
203     ,matchesValid_(false)
204     ,isolationValid_(false)
205     ,direction_(-9999)
206     ,algo_(-9999)
207     ,id_(-9999)
208 lethuill 1.11 ,numberOfValidPixelHits_(-1)
209     ,numberOfValidTrackerHits_(-1)
210 lethuill 1.9 ,pixelLayersWithMeasurement_(-1)
211     ,stripLayersWithMeasurement_(-1)
212 lethuill 1.8 ,d0_(-9999.)
213     ,d0Error_(-9999.)
214     ,dsz_(-9999.)
215     ,dszError_(-9999.)
216     ,normalizedChi2_(-9999.)
217     ,ptError_(-9999.)
218     ,etaError_(-9999.)
219     ,phiError_(-9999.)
220 lethuill 1.10 ,ip3DSignificance_(-9999.)
221 lethuill 1.5 {;}
222 lethuill 1.6
223 lethuill 1.2 TRootMuon(const TLorentzVector &momentum) :
224 lethuill 1.5 TRootParticle(momentum)
225     ,et_em_(-9999.)
226     ,et_emS9_(-9999.)
227     ,et_had_(-9999.)
228     ,et_hadS9_(-9999.)
229     ,et_ho_(-9999.)
230     ,et_hoS9_(-9999.)
231     ,caloCompatibility_(-9999.)
232     ,isoR03_emEt_(-9999.)
233     ,isoR03_hadEt_(-9999.)
234     ,isoR03_hoEt_(-9999.)
235     ,isoR03_sumPt_(-9999.)
236     ,isoR03_nTracks_(-9999)
237     ,isoR03_nJets_(-9999)
238     ,isoR05_emEt_(-9999.)
239     ,isoR05_hadEt_(-9999.)
240     ,isoR05_hoEt_(-9999.)
241     ,isoR05_sumPt_(-9999.)
242     ,isoR05_nTracks_(-9999)
243     ,isoR05_nJets_(-9999)
244     ,energyValid_(false)
245     ,matchesValid_(false)
246     ,isolationValid_(false)
247     ,direction_(-9999)
248     ,algo_(-9999)
249     ,id_(-9999)
250 lethuill 1.11 ,numberOfValidPixelHits_(-1)
251     ,numberOfValidTrackerHits_(-1)
252 lethuill 1.9 ,pixelLayersWithMeasurement_(-1)
253     ,stripLayersWithMeasurement_(-1)
254 lethuill 1.8 ,d0_(-9999.)
255     ,d0Error_(-9999.)
256     ,dsz_(-9999.)
257     ,dszError_(-9999.)
258     ,normalizedChi2_(-9999.)
259     ,ptError_(-9999.)
260     ,etaError_(-9999.)
261     ,phiError_(-9999.)
262 lethuill 1.10 ,ip3DSignificance_(-9999.)
263 lethuill 1.5 {;}
264 lethuill 1.6
265 lethuill 1.2 TRootMuon(const TLorentzVector &momentum, const TVector3 &vertex, Int_t type, Float_t charge) :
266 lethuill 1.5 TRootParticle(momentum, vertex, type, charge)
267     ,et_em_(-9999.)
268     ,et_emS9_(-9999.)
269     ,et_had_(-9999.)
270     ,et_hadS9_(-9999.)
271     ,et_ho_(-9999.)
272     ,et_hoS9_(-9999.)
273     ,caloCompatibility_(-9999.)
274     ,isoR03_emEt_(-9999.)
275     ,isoR03_hadEt_(-9999.)
276     ,isoR03_hoEt_(-9999.)
277     ,isoR03_sumPt_(-9999.)
278     ,isoR03_nTracks_(-9999)
279     ,isoR03_nJets_(-9999)
280     ,isoR05_emEt_(-9999.)
281     ,isoR05_hadEt_(-9999.)
282     ,isoR05_hoEt_(-9999.)
283     ,isoR05_sumPt_(-9999.)
284     ,isoR05_nTracks_(-9999)
285     ,isoR05_nJets_(-9999)
286     ,energyValid_(false)
287     ,matchesValid_(false)
288     ,isolationValid_(false)
289     ,direction_(-9999)
290     ,algo_(-9999)
291     ,id_(-9999)
292 lethuill 1.11 ,numberOfValidPixelHits_(-1)
293     ,numberOfValidTrackerHits_(-1)
294 lethuill 1.9 ,pixelLayersWithMeasurement_(-1)
295     ,stripLayersWithMeasurement_(-1)
296 lethuill 1.8 ,d0_(-9999.)
297     ,d0Error_(-9999.)
298     ,dsz_(-9999.)
299     ,dszError_(-9999.)
300     ,normalizedChi2_(-9999.)
301     ,ptError_(-9999.)
302     ,etaError_(-9999.)
303     ,phiError_(-9999.)
304 lethuill 1.10 ,ip3DSignificance_(-9999.)
305 lethuill 1.5 {;}
306 lethuill 1.6
307 mlethuil 1.1 ~TRootMuon() {;}
308 lethuill 1.6
309    
310 lethuill 1.2 Float_t et_em() const { return et_em_;}
311     Float_t et_emS9() const { return et_emS9_;}
312     Float_t et_had() const { return et_had_;}
313     Float_t et_hadS9() const { return et_hadS9_;}
314     Float_t et_ho() const { return et_ho_;}
315     Float_t et_hoS9() const { return et_hoS9_;}
316     Float_t caloCompatibility() const { return caloCompatibility_;}
317    
318     Float_t isoR03_emEt() const { return isoR03_emEt_;}
319     Float_t isoR03_hadEt() const { return isoR03_hadEt_;}
320     Float_t isoR03_hoEt() const { return isoR03_hoEt_;}
321     Float_t isoR03_sumPt() const { return isoR03_sumPt_;}
322     Int_t isoR03_nTracks() const { return isoR03_nTracks_;}
323     Int_t isoR03_nJets() const { return isoR03_nJets_;}
324    
325     Float_t isoR05_emEt() const { return isoR05_emEt_;}
326     Float_t isoR05_hadEt() const { return isoR05_hadEt_;}
327     Float_t isoR05_hoEt() const { return isoR05_hoEt_;}
328     Float_t isoR05_sumPt() const { return isoR05_sumPt_;}
329     Int_t isoR05_nTracks() const { return isoR05_nTracks_;}
330     Int_t isoR05_nJets() const { return isoR05_nJets_;}
331    
332     Bool_t energyValid() const { return energyValid_;}
333     Bool_t matchesValid() const { return matchesValid_;}
334     Bool_t isolationValid() const { return isolationValid_;}
335 mlethuil 1.1
336 lethuill 1.3 Int_t direction() const { return direction_;}
337     Int_t algo() const { return algo_;}
338    
339     Bool_t isGlobalMuon() const { return algo_ & 2; }
340     Bool_t isTrackerMuon() const { return algo_ & 4; }
341     Bool_t isStandAloneMuon() const { return algo_ & 8; }
342     Bool_t isCaloMuon() const { return algo_ & 16; }
343    
344     Int_t id() const { return id_;}
345     Bool_t idTrackerMuonArbitrated() const { return id_ & 1; }
346     Bool_t idAllArbitrated() const { return id_ & 2; }
347     Bool_t idGlobalMuonPromptTight() const { return id_ & 4; }
348     Bool_t idTMLastStationLoose() const { return id_ & 8; }
349     Bool_t idTMLastStationTight() const { return id_ & 16; }
350     Bool_t idTM2DCompatibilityLoose() const { return id_ & 32; }
351     Bool_t idTM2DCompatibilityTight() const { return id_ & 64; }
352    
353 lethuill 1.11 Int_t numberOfValidPixelHits() const { return numberOfValidPixelHits_; }
354     Int_t numberOfValidTrackerHits() const { return numberOfValidTrackerHits_; }
355 lethuill 1.9 Int_t pixelLayersWithMeasurement() const { return pixelLayersWithMeasurement_; }
356     Int_t stripLayersWithMeasurement() const { return stripLayersWithMeasurement_; }
357 lethuill 1.8 Float_t d0() const { return d0_ ;}
358     Float_t d0Error() const { return d0Error_ ;}
359     Float_t dsz() const { return dsz_ ;}
360     Float_t dszError() const { return dszError_ ;}
361     Float_t normalizedChi2() const { return normalizedChi2_ ;}
362     Float_t ptError() const { return ptError_ ;}
363     Float_t etaError() const { return etaError_ ;}
364     Float_t phiError() const { return phiError_ ;}
365 lethuill 1.10 Float_t ip3DSignificance() const { return ip3DSignificance_ ;}
366 lethuill 1.8
367    
368 lethuill 1.5 //TObject* genMuon() const { return genMuon_.GetObject() ;}
369     virtual TString typeName() const { return "TRootMuon"; }
370    
371 lethuill 1.4
372 mlethuil 1.1 void setCaloEnergy(Float_t et_em, Float_t et_emS9, Float_t et_had, Float_t et_hadS9, Float_t et_ho, Float_t et_hoS9, Float_t caloCompatibility)
373     {
374     et_em_ = et_em;
375     et_emS9_ = et_emS9;
376     et_had_ = et_had;
377     et_hadS9_ = et_hadS9;
378     et_ho_ = et_ho;
379     et_hoS9_ = et_hoS9;
380     caloCompatibility_ = caloCompatibility;
381     }
382    
383     void setIsoR03(Float_t isoR03_emEt, Float_t isoR03_hadEt, Float_t isoR03_hoEt, Float_t isoR03_sumPt, Int_t isoR03_nTracks, Int_t isoR03_nJets)
384     {
385     isoR03_emEt_ = isoR03_emEt;
386     isoR03_hadEt_ = isoR03_hadEt;
387     isoR03_hoEt_ = isoR03_hoEt;
388     isoR03_sumPt_ = isoR03_sumPt;
389     isoR03_nTracks_ = isoR03_nTracks;
390     isoR03_nJets_ = isoR03_nJets;
391     }
392    
393     void setIsoR05(Float_t isoR05_emEt, Float_t isoR05_hadEt, Float_t isoR05_hoEt, Float_t isoR05_sumPt, Int_t isoR05_nTracks, Int_t isoR05_nJets)
394     {
395     isoR05_emEt_ = isoR05_emEt;
396     isoR05_hadEt_ = isoR05_hadEt;
397     isoR05_hoEt_ = isoR05_hoEt;
398     isoR05_sumPt_ = isoR05_sumPt;
399     isoR05_nTracks_ = isoR05_nTracks;
400     isoR05_nJets_ = isoR05_nJets;
401     }
402    
403 lethuill 1.3 void setValidity(Bool_t energyValid, Bool_t matchesValid, Bool_t isolationValid)
404     {
405     energyValid_ = energyValid;
406     matchesValid_ = matchesValid;
407     isolationValid_ = isolationValid;
408     }
409    
410     void setDirection(Int_t direction) { direction_ = direction; }
411     void setAlgo(Int_t algo) { algo_ = algo; }
412     void setID(Int_t id) { id_ = id; }
413     void setID(
414     Int_t trackerMuonArbitrated
415     ,Int_t allArbitrated
416     ,Int_t globalMuonPromptTight
417     ,Int_t tmLastStationLoose
418     ,Int_t tmLastStationTight
419     ,Int_t tm2DCompatibilityLoose
420     ,Int_t tm2DCompatibilityTight
421     )
422     { id_ = trackerMuonArbitrated*1 + allArbitrated*2 + globalMuonPromptTight*4 + tmLastStationLoose*8 + tmLastStationTight*16 + tm2DCompatibilityLoose*32 + tm2DCompatibilityTight*64; }
423    
424 lethuill 1.11 void setNumberOfValidPixelHits(Int_t numberOfValidPixelHits) { numberOfValidPixelHits_ = numberOfValidPixelHits; }
425     void setNumberOfValidTrackerHits(Int_t numberOfValidTrackerHits) { numberOfValidTrackerHits_ = numberOfValidTrackerHits; }
426 lethuill 1.9 void setPixelLayersWithMeasurement(Int_t pixelLayersWithMeasurement) { pixelLayersWithMeasurement_ = pixelLayersWithMeasurement; }
427     void setStripLayersWithMeasurement(Int_t stripLayersWithMeasurement) { stripLayersWithMeasurement_ = stripLayersWithMeasurement; }
428 lethuill 1.8 void setD0(Float_t d0) { d0_ = d0; }
429     void setD0Error(Float_t d0Error) { d0Error_ = d0Error; }
430     void setDsz(Float_t dsz) { dsz_ = dsz; }
431     void setDszError(Float_t dszError) { dszError_ = dszError; }
432     void setNormalizedChi2(Float_t normalizedChi2) { normalizedChi2_ = normalizedChi2; }
433     void setPtError(Float_t ptError) { ptError_ = ptError; }
434     void setEtaError(Float_t etaError) { etaError_ = etaError; }
435     void setPhiError(Float_t phiError) { phiError_ = phiError; }
436 lethuill 1.10 void setIP3DSignificance(Float_t ip3DSignificance) { ip3DSignificance_ = ip3DSignificance; }
437 lethuill 1.8
438 lethuill 1.3
439 mlethuil 1.1 friend std::ostream& operator<< (std::ostream& stream, const TRootMuon& muon) {
440 lethuill 1.3 stream << "TRootMuon - Charge=" << muon.charge() << " (Et,eta,phi)=("<< muon.Et() <<","<< muon.Eta() <<","<< muon.Phi() << ") vertex(x,y,z)=("<< muon.vx() <<","<< muon.vy() <<","<< muon.vz() << ")" << endl
441     << " Type(G,T,S,C)=(" << muon.isGlobalMuon() << "," << muon.isTrackerMuon() << "," << muon.isStandAloneMuon() << "," << muon.isCaloMuon() << ") "
442     << " ID=(" << muon.idTrackerMuonArbitrated() << "," << muon.idAllArbitrated() << "," << muon.idGlobalMuonPromptTight() << "," << muon.idTMLastStationLoose()
443     << "," << muon.idTMLastStationTight() << "," << muon.idTM2DCompatibilityLoose() << "," << muon.idTM2DCompatibilityTight() << ")" << " Direction=" << muon.direction_
444     << " caloCompatibility="<< muon.caloCompatibility_ << " validity(energy,matches,isolation)=(" << muon.energyValid_ <<","<< muon.matchesValid_ <<","<< muon.isolationValid_ << ")" << endl
445 mlethuil 1.1 << " Et_em=" << muon.et_em_ << " Et_emS9=" << muon.et_emS9_ << " Et_had=" << muon.et_had_ << " Et_hadS9=" << muon.et_hadS9_ << " Et_ho=" << muon.et_ho_ << " Et_hoS9=" << muon.et_hoS9_ << endl
446     << " isolation cone 0.3: Et_em=" << muon.isoR03_emEt_ << " Et_had=" << muon.isoR03_hadEt_ <<" Et_ho=" << muon.isoR03_hoEt_ << " nTracks=" << muon.isoR03_nTracks_ <<" nJets=" << muon.isoR03_nJets_ << endl
447 lethuill 1.10 << " isolation cone 0.5: Et_em=" << muon.isoR05_emEt_ << " Et_had=" << muon.isoR05_hadEt_ <<" Et_ho=" << muon.isoR05_hoEt_ << " nTracks=" << muon.isoR05_nTracks_ <<" nJets=" << muon.isoR05_nJets_ << endl
448 lethuill 1.11 << " d0=" << muon.d0_ << " +- " << muon.d0Error_ << " dsz=" << muon.dsz_ << " +- " << muon.dszError_ << " IP 3D Significance=" << muon.ip3DSignificance_;
449 mlethuil 1.1 return stream;
450     };
451    
452    
453     private:
454    
455 lethuill 1.4 // Variables from reco::Muon
456 mlethuil 1.1 Float_t et_em_;
457     Float_t et_emS9_;
458     Float_t et_had_;
459     Float_t et_hadS9_;
460     Float_t et_ho_;
461     Float_t et_hoS9_;
462     Float_t caloCompatibility_;
463    
464     Float_t isoR03_emEt_;
465     Float_t isoR03_hadEt_;
466     Float_t isoR03_hoEt_;
467     Float_t isoR03_sumPt_;
468     Int_t isoR03_nTracks_;
469     Int_t isoR03_nJets_;
470    
471     Float_t isoR05_emEt_;
472     Float_t isoR05_hadEt_;
473     Float_t isoR05_hoEt_;
474     Float_t isoR05_sumPt_;
475     Int_t isoR05_nTracks_;
476     Int_t isoR05_nJets_;
477    
478     Bool_t energyValid_;
479     Bool_t matchesValid_;
480     Bool_t isolationValid_;
481 lethuill 1.3
482     Int_t direction_; // OutsideIn = -1, Undefined = 0, InsideOut = 1
483     Int_t algo_; // binary => GlobalMuon=00010 , TrackerMuon=00100 , StandAloneMuon=01000 , CaloMuon=10000
484     // MuonId coded in binary word id_ ==> TrackerMuonArbitrated=0000001 , AllArbitrated=0000010 , GlobalMuonPromptTight=0000100 ,
485     // TMLastStationLoose=0001000 , TMLastStationTight=0010000 , TM2DCompatibilityLoose=0100000 , TM2DCompatibilityTight=1000000
486     Int_t id_;
487    
488 lethuill 1.8
489     // Variables from reco::GsfTrack
490    
491     /* cf: http://cmslxr.fnal.gov/lxr/source/DataFormats/TrackReco/interface/TrackBase.h
492     For tracks reconstructed in the CMS Tracker, the reference position is the point of closest approach to the centre
493     of CMS. For muons, this is not necessarily true. Parameters associated to the 5D curvilinear covariance matrix:
494     qoverp = q / abs(p) = signed inverse of momentum [1/GeV]
495     lambda = pi/2 - polar angle at the given point
496     phi = azimuth angle at the given point
497     dxy = -vx*sin(phi) + vy*cos(phi) [cm]
498     dsz = vz*cos(lambda) - (vx*cos(phi)+vy*sin(phi))*sin(lambda) [cm]
499    
500     Geometrically, dxy is the signed distance in the XY plane between the straight line passing through (vx,vy) with
501     azimuthal angle phi and the point (0,0). The dsz parameter is the signed distance in the SZ plane between the straight
502     line passing through (vx,vy,vz) with angles (phi, lambda) and the point (s=0,z=0). The S axis is defined by the projection
503     of the straight line onto the XY plane. The convention is to assign the S coordinate for (vx,vy) as the value
504     vx*cos(phi)+vy*sin(phi). This value is zero when (vx,vy) is the point of minimum transverse distance to (0,0).
505    
506     Note that dxy and dsz provide sensible estimates of the distance from the true particle trajectory to (0,0,0) ONLY
507     in two cases:
508     - When (vx,vy,vz) already correspond to the point of minimum transverse distance to (0,0,0) or is close to it
509     (so that the differences between considering the exact trajectory or a straight line in this range are negligible).
510     This is usually true for Tracker tracks.
511     - When the track has infinite or extremely high momentum */
512    
513 lethuill 1.11 Int_t numberOfValidPixelHits_; // Number of valid pixel hits
514     Int_t numberOfValidTrackerHits_; // Number of valid tracker hits (pixel+strip) - More than 1 hit per layer (even mono) is possible due to modules overlap
515 lethuill 1.9 Int_t pixelLayersWithMeasurement_; // Number of pixel layers with at least one valid hit
516     Int_t stripLayersWithMeasurement_; // Number of strip layers with at least one valid hit
517 lethuill 1.8
518     Float_t d0_; // d0=-dxy
519     Float_t d0Error_; // error on d0_
520     Float_t dsz_; // dsz parameter
521     Float_t dszError_; // error on dsz_
522     Float_t normalizedChi2_; // chi-squared divided by n.d.o.f. of track fit
523    
524     Float_t ptError_; // needed ? ptError()
525     Float_t etaError_; // needed ? etaError()
526     Float_t phiError_; // needed ? phiError()
527    
528 lethuill 1.11 Float_t ip3DSignificance_; // Significance of the impact parameter wrt to the selected primary vertex
529 lethuill 1.8
530 lethuill 1.11 ClassDef (TRootMuon,4);
531 mlethuil 1.1 };
532    
533     #endif
534    
535