ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/TRootMuon.h
Revision: 1.13
Committed: Wed Jun 10 11:17:06 2009 UTC (15 years, 10 months ago) by lethuill
Content type: text/plain
Branch: MAIN
Changes since 1.12: +556 -554 lines
Log Message:
Better protection against missing collection / Cleaning data format selection / Last iteration for migration to PAT of Photons

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.13
11     public:
12    
13     TRootMuon() :
14     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     ,numberOfValidPixelHits_(-1)
41     ,numberOfValidTrackerHits_(-1)
42     ,pixelLayersWithMeasurement_(-1)
43     ,stripLayersWithMeasurement_(-1)
44     ,d0_(-9999.)
45     ,d0Error_(-9999.)
46     ,dsz_(-9999.)
47     ,dszError_(-9999.)
48     ,normalizedChi2_(-9999.)
49     ,ptError_(-9999.)
50     ,etaError_(-9999.)
51     ,phiError_(-9999.)
52     ,ip3DSignificance_(-9999.)
53     ,innerTrack_(0.,0.,0.,0.)
54     ,outerTrack_(0.,0.,0.,0.)
55     ,globalTrack_(0.,0.,0.,0.)
56     {;}
57    
58     TRootMuon(const TRootMuon& muon) :
59     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     ,numberOfValidPixelHits_(muon.numberOfValidPixelHits_)
86     ,numberOfValidTrackerHits_(muon.numberOfValidTrackerHits_)
87     ,pixelLayersWithMeasurement_(muon.pixelLayersWithMeasurement_)
88     ,stripLayersWithMeasurement_(muon.stripLayersWithMeasurement_)
89     ,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     ,ip3DSignificance_(muon.ip3DSignificance_)
98     ,innerTrack_(muon.innerTrack_)
99     ,outerTrack_(muon.outerTrack_)
100     ,globalTrack_(muon.globalTrack_)
101     {;}
102    
103     TRootMuon(Double_t px, Double_t py, Double_t pz, Double_t e) :
104     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     ,numberOfValidPixelHits_(-1)
131     ,numberOfValidTrackerHits_(-1)
132     ,pixelLayersWithMeasurement_(-1)
133     ,stripLayersWithMeasurement_(-1)
134     ,d0_(-9999.)
135     ,d0Error_(-9999.)
136     ,dsz_(-9999.)
137     ,dszError_(-9999.)
138     ,normalizedChi2_(-9999.)
139     ,ptError_(-9999.)
140     ,etaError_(-9999.)
141     ,phiError_(-9999.)
142     ,ip3DSignificance_(-9999.)
143     ,innerTrack_(0.,0.,0.,0.)
144     ,outerTrack_(0.,0.,0.,0.)
145     ,globalTrack_(0.,0.,0.,0.)
146     {;}
147    
148     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     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     ,numberOfValidPixelHits_(-1)
176     ,numberOfValidTrackerHits_(-1)
177     ,pixelLayersWithMeasurement_(-1)
178     ,stripLayersWithMeasurement_(-1)
179     ,d0_(-9999.)
180     ,d0Error_(-9999.)
181     ,dsz_(-9999.)
182     ,dszError_(-9999.)
183     ,normalizedChi2_(-9999.)
184     ,ptError_(-9999.)
185     ,etaError_(-9999.)
186     ,phiError_(-9999.)
187     ,ip3DSignificance_(-9999.)
188     ,innerTrack_(0.,0.,0.,0.)
189     ,outerTrack_(0.,0.,0.,0.)
190     ,globalTrack_(0.,0.,0.,0.)
191     {;}
192    
193     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     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     ,numberOfValidPixelHits_(-1)
221     ,numberOfValidTrackerHits_(-1)
222     ,pixelLayersWithMeasurement_(-1)
223     ,stripLayersWithMeasurement_(-1)
224     ,d0_(-9999.)
225     ,d0Error_(-9999.)
226     ,dsz_(-9999.)
227     ,dszError_(-9999.)
228     ,normalizedChi2_(-9999.)
229     ,ptError_(-9999.)
230     ,etaError_(-9999.)
231     ,phiError_(-9999.)
232     ,ip3DSignificance_(-9999.)
233     ,innerTrack_(0.,0.,0.,0.)
234     ,outerTrack_(0.,0.,0.,0.)
235     ,globalTrack_(0.,0.,0.,0.)
236     {;}
237    
238     TRootMuon(const TLorentzVector &momentum) :
239     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     ,numberOfValidPixelHits_(-1)
266     ,numberOfValidTrackerHits_(-1)
267     ,pixelLayersWithMeasurement_(-1)
268     ,stripLayersWithMeasurement_(-1)
269     ,d0_(-9999.)
270     ,d0Error_(-9999.)
271     ,dsz_(-9999.)
272     ,dszError_(-9999.)
273     ,normalizedChi2_(-9999.)
274     ,ptError_(-9999.)
275     ,etaError_(-9999.)
276     ,phiError_(-9999.)
277     ,ip3DSignificance_(-9999.)
278     ,innerTrack_(0.,0.,0.,0.)
279     ,outerTrack_(0.,0.,0.,0.)
280     ,globalTrack_(0.,0.,0.,0.)
281     {;}
282    
283     TRootMuon(const TLorentzVector &momentum, const TVector3 &vertex, Int_t type, Float_t charge) :
284     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     ,numberOfValidPixelHits_(-1)
311     ,numberOfValidTrackerHits_(-1)
312     ,pixelLayersWithMeasurement_(-1)
313     ,stripLayersWithMeasurement_(-1)
314     ,d0_(-9999.)
315     ,d0Error_(-9999.)
316     ,dsz_(-9999.)
317     ,dszError_(-9999.)
318     ,normalizedChi2_(-9999.)
319     ,ptError_(-9999.)
320     ,etaError_(-9999.)
321     ,phiError_(-9999.)
322     ,ip3DSignificance_(-9999.)
323     ,innerTrack_(0.,0.,0.,0.)
324     ,outerTrack_(0.,0.,0.,0.)
325     ,globalTrack_(0.,0.,0.,0.)
326     {;}
327    
328     ~TRootMuon() {;}
329    
330    
331     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    
357     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     Int_t numberOfValidPixelHits() const { return numberOfValidPixelHits_; }
375     Int_t numberOfValidTrackerHits() const { return numberOfValidTrackerHits_; }
376     Int_t pixelLayersWithMeasurement() const { return pixelLayersWithMeasurement_; }
377     Int_t stripLayersWithMeasurement() const { return stripLayersWithMeasurement_; }
378     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     Float_t ip3DSignificance() const { return ip3DSignificance_ ;}
387    
388     TLorentzVector innerTrack() const { return innerTrack_; }
389     TLorentzVector outerTrack() const { return outerTrack_; }
390     TLorentzVector globalTrack() const { return globalTrack_; }
391    
392     //TObject* genMuon() const { return genMuon_.GetObject() ;}
393     virtual TString typeName() const { return "TRootMuon"; }
394    
395    
396     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     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     void setNumberOfValidPixelHits(Int_t numberOfValidPixelHits) { numberOfValidPixelHits_ = numberOfValidPixelHits; }
449     void setNumberOfValidTrackerHits(Int_t numberOfValidTrackerHits) { numberOfValidTrackerHits_ = numberOfValidTrackerHits; }
450     void setPixelLayersWithMeasurement(Int_t pixelLayersWithMeasurement) { pixelLayersWithMeasurement_ = pixelLayersWithMeasurement; }
451     void setStripLayersWithMeasurement(Int_t stripLayersWithMeasurement) { stripLayersWithMeasurement_ = stripLayersWithMeasurement; }
452     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     void setIP3DSignificance(Float_t ip3DSignificance) { ip3DSignificance_ = ip3DSignificance; }
461    
462     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    
466     friend std::ostream& operator<< (std::ostream& stream, const TRootMuon& muon) {
467     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     << " 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     << " 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     << " d0=" << muon.d0_ << " +- " << muon.d0Error_ << " dsz=" << muon.dsz_ << " +- " << muon.dszError_ << " IP 3D Significance=" << muon.ip3DSignificance_;
476     return stream;
477     };
478    
479    
480     private:
481    
482     // Variables from reco::Muon
483     Float_t et_em_; // energy deposited in crossed ECAL crystals
484     Float_t et_emS9_; // energy deposited in 3x3 ECAL crystal matrix around crossed crystal
485     Float_t et_had_; // energy deposited in crossed HCAL tower (RecHits)
486     Float_t et_hadS9_; // energy deposited in 3x3 HCAL tower matrix around crossed tower (RecHits)
487     Float_t et_ho_; // energy deposited in crossed HO tower (RecHits)
488     Float_t et_hoS9_; // energy deposited in 3x3 HO tower matrix around crossed tower (RecHits)
489     Float_t caloCompatibility_; // Relative likelihood based on ECAL, HCAL, HO energy defined as L_muon/(L_muon+L_not_muon)
490    
491     // Muon isolation encapsulated in reco::Muon
492     // http://cmslxr.fnal.gov/lxr/source/RecoMuon/MuonIsolationProducers/doc/MuonIsolationProducers.doc
493     // Cone DR=0.3
494     Float_t isoR03_emEt_;
495     Float_t isoR03_hadEt_;
496     Float_t isoR03_hoEt_;
497     Float_t isoR03_sumPt_;
498     Int_t isoR03_nTracks_;
499     Int_t isoR03_nJets_;
500    
501     // Cone DR=0.5
502     Float_t isoR05_emEt_;
503     Float_t isoR05_hadEt_;
504     Float_t isoR05_hoEt_;
505     Float_t isoR05_sumPt_;
506     Int_t isoR05_nTracks_;
507     Int_t isoR05_nJets_;
508    
509     Bool_t energyValid_;
510     Bool_t matchesValid_;
511     Bool_t isolationValid_;
512    
513     Int_t direction_; // OutsideIn = -1, Undefined = 0, InsideOut = 1
514     Int_t algo_; // binary => GlobalMuon=00010 , TrackerMuon=00100 , StandAloneMuon=01000 , CaloMuon=10000
515     Int_t id_; // MuonId coded in binary word id_ ==> TrackerMuonArbitrated=0000001 , AllArbitrated=0000010 , GlobalMuonPromptTight=0000100 ,
516     // TMLastStationLoose=0001000 , TMLastStationTight=0010000 , TM2DCompatibilityLoose=0100000 , TM2DCompatibilityTight=1000000
517    
518    
519     // Variables from reco::GsfTrack
520    
521     /* cf: http://cmslxr.fnal.gov/lxr/source/DataFormats/TrackReco/interface/TrackBase.h
522     For tracks reconstructed in the CMS Tracker, the reference position is the point of closest approach to the centre
523     of CMS. For muons, this is not necessarily true. Parameters associated to the 5D curvilinear covariance matrix:
524     qoverp = q / abs(p) = signed inverse of momentum [1/GeV]
525     lambda = pi/2 - polar angle at the given point
526     phi = azimuth angle at the given point
527     dxy = -vx*sin(phi) + vy*cos(phi) [cm]
528     dsz = vz*cos(lambda) - (vx*cos(phi)+vy*sin(phi))*sin(lambda) [cm]
529    
530     Geometrically, dxy is the signed distance in the XY plane between the straight line passing through (vx,vy) with
531     azimuthal angle phi and the point (0,0). The dsz parameter is the signed distance in the SZ plane between the straight
532     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
533     of the straight line onto the XY plane. The convention is to assign the S coordinate for (vx,vy) as the value
534     vx*cos(phi)+vy*sin(phi). This value is zero when (vx,vy) is the point of minimum transverse distance to (0,0).
535    
536     Note that dxy and dsz provide sensible estimates of the distance from the true particle trajectory to (0,0,0) ONLY
537     in two cases:
538     - When (vx,vy,vz) already correspond to the point of minimum transverse distance to (0,0,0) or is close to it
539     (so that the differences between considering the exact trajectory or a straight line in this range are negligible).
540     This is usually true for Tracker tracks.
541     - When the track has infinite or extremely high momentum */
542    
543     Int_t numberOfValidPixelHits_; // Number of valid pixel hits
544     Int_t numberOfValidTrackerHits_; // Number of valid tracker hits (pixel+strip) - More than 1 hit per layer (even mono) is possible due to modules overlap
545     Int_t pixelLayersWithMeasurement_; // Number of pixel layers with at least one valid hit
546     Int_t stripLayersWithMeasurement_; // Number of strip layers with at least one valid hit
547    
548     Float_t d0_; // d0=-dxy
549     Float_t d0Error_; // error on d0_
550     Float_t dsz_; // dsz parameter
551     Float_t dszError_; // error on dsz_
552     Float_t normalizedChi2_; // chi-squared divided by n.d.o.f. of track fit
553    
554     Float_t ptError_; // needed ? ptError()
555     Float_t etaError_; // needed ? etaError()
556     Float_t phiError_; // needed ? phiError()
557    
558     Float_t ip3DSignificance_; // Significance of the impact parameter wrt to the selected primary vertex
559    
560     TLorentzVector innerTrack_; // Tracker only
561     TLorentzVector outerTrack_; // Muon detector only
562     TLorentzVector globalTrack_; // Tracker + Muon detector
563    
564     ClassDef (TRootMuon,6);
565    
566 mlethuil 1.1 };
567    
568     #endif