ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/TRootMuon.h
Revision: 1.12
Committed: Tue Apr 21 17:08:53 2009 UTC (16 years ago) by lethuill
Content type: text/plain
Branch: MAIN
CVS Tags: JeSuisBeaucoupPlusGrosQunReco_2_2_7_01
Changes since 1.11: +32 -1 lines
Log Message:
Keep innerTrack, outerTrack and globalTrack momenta for debugging

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