ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/TRootMuon.h
(Generate patch)

Comparing UserCode/Morgan/interface/TRootMuon.h (file contents):
Revision 1.2 by lethuill, Wed Nov 19 19:03:16 2008 UTC vs.
Revision 1.11 by lethuill, Tue Apr 21 10:42:22 2009 UTC

# Line 3 | Line 3
3  
4   #include "../interface/TRootParticle.h"
5  
6
6   using namespace std;
7  
8   class TRootMuon : public TRootParticle
9   {
10 <        
10 >
11   public:
12 <        
12 >
13          TRootMuon() :
14 <                        TRootParticle()
15 <                        ,et_em_(0.)
16 <                        ,et_emS9_(0.)
17 <                        ,et_had_(0.)
18 <                        ,et_hadS9_(0.)
19 <                        ,et_ho_(0.)
20 <                        ,et_hoS9_(0.)
21 <                        ,caloCompatibility_(0.)
22 <                        ,isoR03_emEt_(0.)
23 <                        ,isoR03_hadEt_(0.)
24 <                        ,isoR03_hoEt_(0.)
25 <                        ,isoR03_sumPt_(0.)
26 <                        ,isoR03_nTracks_(0)
27 <                        ,isoR03_nJets_(0)
28 <                        ,isoR05_emEt_(0.)
29 <                        ,isoR05_hadEt_(0.)
30 <                        ,isoR05_hoEt_(0.)
31 <                        ,isoR05_sumPt_(0.)
32 <                        ,isoR05_nTracks_(0)
33 <                        ,isoR05_nJets_(0)
34 <                        ,energyValid_(false)
35 <                        ,matchesValid_(false)
36 <                        ,isolationValid_(false)
37 <                        {;}
38 <                        
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 >                {;}
54 >
55          TRootMuon(const TRootMuon& muon) :
56 <                        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 <                        {;}
80 <                                
56 >                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 >                ,numberOfValidPixelHits_(muon.numberOfValidPixelHits_)
83 >                ,numberOfValidTrackerHits_(muon.numberOfValidTrackerHits_)
84 >                ,pixelLayersWithMeasurement_(muon.pixelLayersWithMeasurement_)
85 >                ,stripLayersWithMeasurement_(muon.stripLayersWithMeasurement_)
86 >                ,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 >                ,ip3DSignificance_(muon.ip3DSignificance_)
95 >                {;}
96 >
97          TRootMuon(Double_t px, Double_t py, Double_t pz, Double_t e) :
98 <                        TRootParticle(px,py,pz,e)
99 <                        ,et_em_(0.)
100 <                        ,et_emS9_(0.)
101 <                        ,et_had_(0.)
102 <                        ,et_hadS9_(0.)
103 <                        ,et_ho_(0.)
104 <                        ,et_hoS9_(0.)
105 <                        ,caloCompatibility_(0.)
106 <                        ,isoR03_emEt_(0.)
107 <                        ,isoR03_hadEt_(0.)
108 <                        ,isoR03_hoEt_(0.)
109 <                        ,isoR03_sumPt_(0.)
110 <                        ,isoR03_nTracks_(0)
111 <                        ,isoR03_nJets_(0)
112 <                        ,isoR05_emEt_(0.)
113 <                        ,isoR05_hadEt_(0.)
114 <                        ,isoR05_hoEt_(0.)
115 <                        ,isoR05_sumPt_(0.)
116 <                        ,isoR05_nTracks_(0)
117 <                        ,isoR05_nJets_(0)
118 <                        ,energyValid_(false)
119 <                        ,matchesValid_(false)
120 <                        ,isolationValid_(false)
121 <                        {;}
122 <        
98 >                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 >                ,numberOfValidPixelHits_(-1)
125 >                ,numberOfValidTrackerHits_(-1)
126 >                ,pixelLayersWithMeasurement_(-1)
127 >                ,stripLayersWithMeasurement_(-1)
128 >                ,d0_(-9999.)
129 >                ,d0Error_(-9999.)
130 >                ,dsz_(-9999.)
131 >                ,dszError_(-9999.)
132 >                ,normalizedChi2_(-9999.)
133 >                ,ptError_(-9999.)
134 >                ,etaError_(-9999.)
135 >                ,phiError_(-9999.)
136 >                ,ip3DSignificance_(-9999.)
137 >                {;}
138 >
139          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 <                        TRootParticle(px,py,pz,e,vtx_x,vtx_y,vtx_z)
141 <                        ,et_em_(0.)
142 <                        ,et_emS9_(0.)
143 <                        ,et_had_(0.)
144 <                        ,et_hadS9_(0.)
145 <                        ,et_ho_(0.)
146 <                        ,et_hoS9_(0.)
147 <                        ,caloCompatibility_(0.)
148 <                        ,isoR03_emEt_(0.)
149 <                        ,isoR03_hadEt_(0.)
150 <                        ,isoR03_hoEt_(0.)
151 <                        ,isoR03_sumPt_(0.)
152 <                        ,isoR03_nTracks_(0)
153 <                        ,isoR03_nJets_(0)
154 <                        ,isoR05_emEt_(0.)
155 <                        ,isoR05_hadEt_(0.)
156 <                        ,isoR05_hoEt_(0.)
157 <                        ,isoR05_sumPt_(0.)
158 <                        ,isoR05_nTracks_(0)
159 <                        ,isoR05_nJets_(0)
160 <                        ,energyValid_(false)
161 <                        ,matchesValid_(false)
162 <                        ,isolationValid_(false)
163 <                        {;}
164 <        
140 >                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 >                ,numberOfValidPixelHits_(-1)
167 >                ,numberOfValidTrackerHits_(-1)
168 >                ,pixelLayersWithMeasurement_(-1)
169 >                ,stripLayersWithMeasurement_(-1)
170 >                ,d0_(-9999.)
171 >                ,d0Error_(-9999.)
172 >                ,dsz_(-9999.)
173 >                ,dszError_(-9999.)
174 >                ,normalizedChi2_(-9999.)
175 >                ,ptError_(-9999.)
176 >                ,etaError_(-9999.)
177 >                ,phiError_(-9999.)
178 >                ,ip3DSignificance_(-9999.)
179 >                {;}
180 >
181          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 <                        TRootParticle(px,py,pz,e,vtx_x,vtx_y,vtx_z,type,charge)
183 <                        ,et_em_(0.)
184 <                        ,et_emS9_(0.)
185 <                        ,et_had_(0.)
186 <                        ,et_hadS9_(0.)
187 <                        ,et_ho_(0.)
188 <                        ,et_hoS9_(0.)
189 <                        ,caloCompatibility_(0.)
190 <                        ,isoR03_emEt_(0.)
191 <                        ,isoR03_hadEt_(0.)
192 <                        ,isoR03_hoEt_(0.)
193 <                        ,isoR03_sumPt_(0.)
194 <                        ,isoR03_nTracks_(0)
195 <                        ,isoR03_nJets_(0)
196 <                        ,isoR05_emEt_(0.)
197 <                        ,isoR05_hadEt_(0.)
198 <                        ,isoR05_hoEt_(0.)
199 <                        ,isoR05_sumPt_(0.)
200 <                        ,isoR05_nTracks_(0)
201 <                        ,isoR05_nJets_(0)
202 <                        ,energyValid_(false)
203 <                        ,matchesValid_(false)
204 <                        ,isolationValid_(false)
205 <                        {;}
206 <        
182 >                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 >                ,numberOfValidPixelHits_(-1)
209 >                ,numberOfValidTrackerHits_(-1)
210 >                ,pixelLayersWithMeasurement_(-1)
211 >                ,stripLayersWithMeasurement_(-1)
212 >                ,d0_(-9999.)
213 >                ,d0Error_(-9999.)
214 >                ,dsz_(-9999.)
215 >                ,dszError_(-9999.)
216 >                ,normalizedChi2_(-9999.)
217 >                ,ptError_(-9999.)
218 >                ,etaError_(-9999.)
219 >                ,phiError_(-9999.)
220 >                ,ip3DSignificance_(-9999.)
221 >                {;}
222 >
223          TRootMuon(const TLorentzVector &momentum) :
224 <                        TRootParticle(momentum)
225 <                        ,et_em_(0.)
226 <                        ,et_emS9_(0.)
227 <                        ,et_had_(0.)
228 <                        ,et_hadS9_(0.)
229 <                        ,et_ho_(0.)
230 <                        ,et_hoS9_(0.)
231 <                        ,caloCompatibility_(0.)
232 <                        ,isoR03_emEt_(0.)
233 <                        ,isoR03_hadEt_(0.)
234 <                        ,isoR03_hoEt_(0.)
235 <                        ,isoR03_sumPt_(0.)
236 <                        ,isoR03_nTracks_(0)
237 <                        ,isoR03_nJets_(0)
238 <                        ,isoR05_emEt_(0.)
239 <                        ,isoR05_hadEt_(0.)
240 <                        ,isoR05_hoEt_(0.)
241 <                        ,isoR05_sumPt_(0.)
242 <                        ,isoR05_nTracks_(0)
243 <                        ,isoR05_nJets_(0)
244 <                        ,energyValid_(false)
245 <                        ,matchesValid_(false)
246 <                        ,isolationValid_(false)
247 <                        {;}
248 <        
224 >                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 >                ,numberOfValidPixelHits_(-1)
251 >                ,numberOfValidTrackerHits_(-1)
252 >                ,pixelLayersWithMeasurement_(-1)
253 >                ,stripLayersWithMeasurement_(-1)
254 >                ,d0_(-9999.)
255 >                ,d0Error_(-9999.)
256 >                ,dsz_(-9999.)
257 >                ,dszError_(-9999.)
258 >                ,normalizedChi2_(-9999.)
259 >                ,ptError_(-9999.)
260 >                ,etaError_(-9999.)
261 >                ,phiError_(-9999.)
262 >                ,ip3DSignificance_(-9999.)
263 >                {;}
264 >
265          TRootMuon(const TLorentzVector &momentum, const TVector3 &vertex, Int_t type, Float_t charge) :
266 <                        TRootParticle(momentum, vertex, type, charge)
267 <                        ,et_em_(0.)
268 <                        ,et_emS9_(0.)
269 <                        ,et_had_(0.)
270 <                        ,et_hadS9_(0.)
271 <                        ,et_ho_(0.)
272 <                        ,et_hoS9_(0.)
273 <                        ,caloCompatibility_(0.)
274 <                        ,isoR03_emEt_(0.)
275 <                        ,isoR03_hadEt_(0.)
276 <                        ,isoR03_hoEt_(0.)
277 <                        ,isoR03_sumPt_(0.)
278 <                        ,isoR03_nTracks_(0)
279 <                        ,isoR03_nJets_(0)
280 <                        ,isoR05_emEt_(0.)
281 <                        ,isoR05_hadEt_(0.)
282 <                        ,isoR05_hoEt_(0.)
283 <                        ,isoR05_sumPt_(0.)
284 <                        ,isoR05_nTracks_(0)
285 <                        ,isoR05_nJets_(0)
286 <                        ,energyValid_(false)
287 <                        ,matchesValid_(false)
288 <                        ,isolationValid_(false)
289 <                        {;}
290 <        
266 >                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 >                ,numberOfValidPixelHits_(-1)
293 >                ,numberOfValidTrackerHits_(-1)
294 >                ,pixelLayersWithMeasurement_(-1)
295 >                ,stripLayersWithMeasurement_(-1)
296 >                ,d0_(-9999.)
297 >                ,d0Error_(-9999.)
298 >                ,dsz_(-9999.)
299 >                ,dszError_(-9999.)
300 >                ,normalizedChi2_(-9999.)
301 >                ,ptError_(-9999.)
302 >                ,etaError_(-9999.)
303 >                ,phiError_(-9999.)
304 >                ,ip3DSignificance_(-9999.)
305 >                {;}
306 >
307          ~TRootMuon() {;}
308 <        
309 <        
308 >
309 >
310          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_;}
# Line 222 | Line 333 | public:
333          Bool_t matchesValid() const { return matchesValid_;}
334          Bool_t isolationValid() const { return isolationValid_;}
335          
336 <        
336 >        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 >        Int_t numberOfValidPixelHits() const { return numberOfValidPixelHits_; }
354 >        Int_t numberOfValidTrackerHits() const { return numberOfValidTrackerHits_; }
355 >        Int_t pixelLayersWithMeasurement() const { return pixelLayersWithMeasurement_; }
356 >        Int_t stripLayersWithMeasurement() const { return stripLayersWithMeasurement_; }
357 >        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 >        Float_t ip3DSignificance() const { return ip3DSignificance_ ;}
366 >
367 >
368 >        //TObject* genMuon() const { return genMuon_.GetObject() ;}
369 >        virtual TString typeName() const { return "TRootMuon"; }
370 >
371 >
372          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;
# Line 254 | Line 400 | public:
400                  isoR05_nJets_ = isoR05_nJets;
401          }
402          
403 +        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 +        void setNumberOfValidPixelHits(Int_t numberOfValidPixelHits) { numberOfValidPixelHits_ = numberOfValidPixelHits; }
425 +        void setNumberOfValidTrackerHits(Int_t numberOfValidTrackerHits) { numberOfValidTrackerHits_ = numberOfValidTrackerHits; }
426 +        void setPixelLayersWithMeasurement(Int_t pixelLayersWithMeasurement) { pixelLayersWithMeasurement_ = pixelLayersWithMeasurement; }
427 +        void setStripLayersWithMeasurement(Int_t stripLayersWithMeasurement) { stripLayersWithMeasurement_ = stripLayersWithMeasurement; }
428 +        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 +        void setIP3DSignificance(Float_t ip3DSignificance) { ip3DSignificance_ = ip3DSignificance; }
437 +
438 +
439          friend std::ostream& operator<< (std::ostream& stream, const TRootMuon& muon) {
440 <                stream << "TRootMuon - Charge=" << muon.charge() << " (Et,eta,phi)=("<< muon.Et() <<","<< muon.Eta() <<","<< muon.Phi() << ")  vertex(x,y,z)=("<< muon.vx() <<","<< muon.vy() <<","<< muon.vz() << ")"
441 <                                << "  caloCompatibility="<<  muon.caloCompatibility_ << "  validity(energy, matches, isolation)=(" << muon.energyValid_ <<","<< muon.matchesValid_ <<","<< muon.isolationValid_ << ")" << endl
440 >                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                                  << "            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 <                                << "            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_;
447 >                                << "            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 >                                << "            d0=" << muon.d0_ << " +- " << muon.d0Error_ << "  dsz=" << muon.dsz_ << " +- " << muon.dszError_ << "   IP 3D Significance=" << muon.ip3DSignificance_;
449                  return stream;
450          };
451  
452          
453          private:
454          
455 +        // Variables from reco::Muon
456          Float_t et_em_;
457          Float_t et_emS9_;
458          Float_t et_had_;
# Line 291 | Line 478 | public:
478          Bool_t energyValid_;
479          Bool_t matchesValid_;
480          Bool_t isolationValid_;
481 +
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          
489 <        ClassDef (TRootMuon,1);
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 >        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 >        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 >
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 >     Float_t ip3DSignificance_;  // Significance of the impact parameter wrt to the selected primary vertex
529 >
530 >        ClassDef (TRootMuon,4);
531   };
532  
533   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines