ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/TRootElectron.h
Revision: 1.10
Committed: Wed Jun 10 11:17:05 2009 UTC (15 years, 10 months ago) by lethuill
Content type: text/plain
Branch: MAIN
CVS Tags: all_2_2_9_01
Changes since 1.9: +678 -667 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 TRootElectron_h
2     #define TRootElectron_h
3    
4 lethuill 1.4 #include <map>
5    
6 mlethuil 1.1 #include "../interface/TRootParticle.h"
7    
8     using namespace std;
9    
10     class TRootElectron : public TRootParticle
11     {
12 lethuill 1.3
13 lethuill 1.10 public:
14 lethuill 1.3
15 lethuill 1.10 TRootElectron() :
16     TRootParticle()
17     ,classification_(-9999)
18     ,caloEnergy_(-9999.)
19     ,caloEnergyError_(-9999.)
20     ,trackMomentum_(-9999.)
21     ,trackMomentumError_(-9999.)
22     ,hadOverEm_(-9999.)
23     ,deltaEtaIn_(-9999.)
24     ,deltaPhiIn_(-9999.)
25     ,energySuperClusterOverPin_(-9999.)
26     ,deltaEtaOut_(-9999.)
27     ,deltaPhiOut_(-9999.)
28     ,energySeedClusterOverPout_(-9999.)
29     ,energyScaleCorrected_(false)
30     ,momentumCorrected_(false)
31     ,pixelLayersWithMeasurement_(-1)
32     ,stripLayersWithMeasurement_(-1)
33     ,d0_(-9999.)
34     ,d0Error_(-9999.)
35     ,dsz_(-9999.)
36     ,dszError_(-9999.)
37     ,normalizedChi2_(-9999.)
38     ,ptError_(-9999.)
39     ,etaError_(-9999.)
40     ,phiError_(-9999.)
41     ,ip3DSignificance_(-9999.)
42     ,nbClusters_(-9999)
43     ,superClusterRawEnergy_(-9999.)
44     ,preshowerEnergy_(-9999.)
45     ,caloPosition_(-9999.,-9999.,-9999.)
46     ,scRef_()
47     ,clusterAlgo_(-9999)
48     ,caloConeSize_(-9999.)
49     ,e2x2_(-9999.)
50     ,e3x3_(-9999.)
51     ,e5x5_(-9999.)
52     ,eMax_(-9999.)
53     ,isoR01_sumPt_(-9999.)
54     ,isoR01_nTracks_(-9999)
55     ,isoR02_sumPt_(-9999.)
56     ,isoR02_nTracks_(-9999)
57     ,isoR03_emEt_(-9999.)
58     ,isoR03_hadEt_(-9999.)
59     ,isoR03_sumPt_(-9999.)
60     ,isoR03_nTracks_(-9999)
61     ,isoR05_emEt_(-9999.)
62     ,isoR05_hadEt_(-9999.)
63     ,isoR05_sumPt_(-9999.)
64     ,isoR05_nTracks_(-9999)
65     ,idCutBasedFixedThresholdLoose_(-1)
66     ,idCutBasedFixedThresholdTight_(-1)
67     ,idCutBasedFixedThresholdHighEnergy_(-1)
68     ,idCutBasedCategorizedLoose_(-1)
69     ,idCutBasedCategorizedTight_(-1)
70     ,idLikelihood_(-9999.)
71     ,idNeuralNet_(-9999.)
72     {;}
73    
74     TRootElectron(const TRootElectron& electron) :
75     TRootParticle(electron)
76     ,classification_(electron.classification_)
77     ,caloEnergy_(electron.caloEnergy_)
78     ,caloEnergyError_(electron.caloEnergyError_)
79     ,trackMomentum_(electron.trackMomentum_)
80     ,trackMomentumError_(electron.trackMomentumError_)
81     ,hadOverEm_(electron.hadOverEm_)
82     ,deltaEtaIn_(electron.deltaEtaIn_)
83     ,deltaPhiIn_(electron.deltaPhiIn_)
84     ,energySuperClusterOverPin_(electron.energySuperClusterOverPin_)
85     ,deltaEtaOut_(electron.deltaEtaOut_)
86     ,deltaPhiOut_(electron.deltaPhiOut_)
87     ,energySeedClusterOverPout_(electron.energySeedClusterOverPout_)
88     ,energyScaleCorrected_(electron.energyScaleCorrected_)
89     ,momentumCorrected_(electron.momentumCorrected_)
90     ,pixelLayersWithMeasurement_(electron.pixelLayersWithMeasurement_)
91     ,stripLayersWithMeasurement_(electron.stripLayersWithMeasurement_)
92     ,d0_(electron.d0_)
93     ,d0Error_(electron.d0Error_)
94     ,dsz_(electron.dsz_)
95     ,dszError_(electron.dszError_)
96     ,normalizedChi2_(electron.normalizedChi2_)
97     ,ptError_(electron.ptError_)
98     ,etaError_(electron.etaError_)
99     ,phiError_(electron.phiError_)
100     ,ip3DSignificance_(electron.ip3DSignificance_)
101     ,nbClusters_(electron.nbClusters_)
102     ,superClusterRawEnergy_(electron.superClusterRawEnergy_)
103     ,preshowerEnergy_(electron.preshowerEnergy_)
104     ,caloPosition_(electron.caloPosition_)
105     ,scRef_(electron.scRef_)
106     ,clusterAlgo_(electron.clusterAlgo_)
107     ,caloConeSize_(electron.caloConeSize_)
108     ,e2x2_(electron.e2x2_)
109     ,e3x3_(electron.e3x3_)
110     ,e5x5_(electron.e5x5_)
111     ,eMax_(electron.eMax_)
112     ,isoR01_sumPt_(electron.isoR01_sumPt_)
113     ,isoR01_nTracks_(electron.isoR01_nTracks_)
114     ,isoR02_sumPt_(electron.isoR02_sumPt_)
115     ,isoR02_nTracks_(electron.isoR02_nTracks_)
116     ,isoR03_emEt_(electron.isoR03_emEt_)
117     ,isoR03_hadEt_(electron.isoR03_hadEt_)
118     ,isoR03_sumPt_(electron.isoR03_sumPt_)
119     ,isoR03_nTracks_(electron.isoR03_nTracks_)
120     ,isoR05_emEt_(electron.isoR05_emEt_)
121     ,isoR05_hadEt_(electron.isoR05_hadEt_)
122     ,isoR05_sumPt_(electron.isoR05_sumPt_)
123     ,isoR05_nTracks_(electron.isoR05_nTracks_)
124     ,idCutBasedFixedThresholdLoose_(electron.idCutBasedFixedThresholdLoose_)
125     ,idCutBasedFixedThresholdTight_(electron.idCutBasedFixedThresholdTight_)
126     ,idCutBasedFixedThresholdHighEnergy_(electron.idCutBasedFixedThresholdHighEnergy_)
127     ,idCutBasedCategorizedLoose_(electron.idCutBasedCategorizedLoose_)
128     ,idCutBasedCategorizedTight_(electron.idCutBasedCategorizedTight_)
129     ,idLikelihood_(electron.idLikelihood_)
130     ,idNeuralNet_(electron.idNeuralNet_)
131     {;}
132    
133     TRootElectron(Double_t px, Double_t py, Double_t pz, Double_t e) :
134     TRootParticle(px,py,pz,e)
135     ,classification_(-9999)
136     ,caloEnergy_(-9999.)
137     ,caloEnergyError_(-9999.)
138     ,trackMomentum_(-9999.)
139     ,trackMomentumError_(-9999.)
140     ,hadOverEm_(-9999.)
141     ,deltaEtaIn_(-9999.)
142     ,deltaPhiIn_(-9999.)
143     ,energySuperClusterOverPin_(-9999.)
144     ,deltaEtaOut_(-9999.)
145     ,deltaPhiOut_(-9999.)
146     ,energySeedClusterOverPout_(-9999.)
147     ,energyScaleCorrected_(false)
148     ,momentumCorrected_(false)
149     ,pixelLayersWithMeasurement_(-1)
150     ,stripLayersWithMeasurement_(-1)
151     ,d0_(-9999.)
152     ,d0Error_(-9999.)
153     ,dsz_(-9999.)
154     ,dszError_(-9999.)
155     ,normalizedChi2_(-9999.)
156     ,ptError_(-9999.)
157     ,etaError_(-9999.)
158     ,phiError_(-9999.)
159     ,ip3DSignificance_(-9999.)
160     ,nbClusters_(-9999)
161     ,superClusterRawEnergy_(-9999.)
162     ,preshowerEnergy_(-9999.)
163     ,caloPosition_(-9999.,-9999.,-9999.)
164     ,scRef_()
165     ,clusterAlgo_(-9999)
166     ,caloConeSize_(-9999.)
167     ,e2x2_(-9999.)
168     ,e3x3_(-9999.)
169     ,e5x5_(-9999.)
170     ,eMax_(-9999.)
171     ,isoR01_sumPt_(-9999.)
172     ,isoR01_nTracks_(-9999)
173     ,isoR02_sumPt_(-9999.)
174     ,isoR02_nTracks_(-9999)
175     ,isoR03_emEt_(-9999.)
176     ,isoR03_hadEt_(-9999.)
177     ,isoR03_sumPt_(-9999.)
178     ,isoR03_nTracks_(-9999)
179     ,isoR05_emEt_(-9999.)
180     ,isoR05_hadEt_(-9999.)
181     ,isoR05_sumPt_(-9999.)
182     ,isoR05_nTracks_(-9999)
183     ,idCutBasedFixedThresholdLoose_(-1)
184     ,idCutBasedFixedThresholdTight_(-1)
185     ,idCutBasedFixedThresholdHighEnergy_(-1)
186     ,idCutBasedCategorizedLoose_(-1)
187     ,idCutBasedCategorizedTight_(-1)
188     ,idLikelihood_(-9999.)
189     ,idNeuralNet_(-9999.)
190     {;}
191    
192     TRootElectron(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z) :
193     TRootParticle(px,py,pz,e,vtx_x,vtx_y,vtx_z)
194     ,classification_(-9999)
195     ,caloEnergy_(-9999.)
196     ,caloEnergyError_(-9999.)
197     ,trackMomentum_(-9999.)
198     ,trackMomentumError_(-9999.)
199     ,hadOverEm_(-9999.)
200     ,deltaEtaIn_(-9999.)
201     ,deltaPhiIn_(-9999.)
202     ,energySuperClusterOverPin_(-9999.)
203     ,deltaEtaOut_(-9999.)
204     ,deltaPhiOut_(-9999.)
205     ,energySeedClusterOverPout_(-9999.)
206     ,energyScaleCorrected_(false)
207     ,momentumCorrected_(false)
208     ,pixelLayersWithMeasurement_(-1)
209     ,stripLayersWithMeasurement_(-1)
210     ,d0_(-9999.)
211     ,d0Error_(-9999.)
212     ,dsz_(-9999.)
213     ,dszError_(-9999.)
214     ,normalizedChi2_(-9999.)
215     ,ptError_(-9999.)
216     ,etaError_(-9999.)
217     ,phiError_(-9999.)
218     ,ip3DSignificance_(-9999.)
219     ,nbClusters_(-9999)
220     ,superClusterRawEnergy_(-9999.)
221     ,preshowerEnergy_(-9999.)
222     ,caloPosition_(-9999.,-9999.,-9999.)
223     ,scRef_()
224     ,clusterAlgo_(-9999)
225     ,caloConeSize_(-9999.)
226     ,e2x2_(-9999.)
227     ,e3x3_(-9999.)
228     ,e5x5_(-9999.)
229     ,eMax_(-9999.)
230     ,isoR01_sumPt_(-9999.)
231     ,isoR01_nTracks_(-9999)
232     ,isoR02_sumPt_(-9999.)
233     ,isoR02_nTracks_(-9999)
234     ,isoR03_emEt_(-9999.)
235     ,isoR03_hadEt_(-9999.)
236     ,isoR03_sumPt_(-9999.)
237     ,isoR03_nTracks_(-9999)
238     ,isoR05_emEt_(-9999.)
239     ,isoR05_hadEt_(-9999.)
240     ,isoR05_sumPt_(-9999.)
241     ,isoR05_nTracks_(-9999)
242     ,idCutBasedFixedThresholdLoose_(-1)
243     ,idCutBasedFixedThresholdTight_(-1)
244     ,idCutBasedFixedThresholdHighEnergy_(-1)
245     ,idCutBasedCategorizedLoose_(-1)
246     ,idCutBasedCategorizedTight_(-1)
247     ,idLikelihood_(-9999.)
248     ,idNeuralNet_(-9999.)
249     {;}
250    
251     TRootElectron(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) :
252     TRootParticle(px,py,pz,e,vtx_x,vtx_y,vtx_z,type,charge)
253     ,classification_(-9999)
254     ,caloEnergy_(-9999.)
255     ,caloEnergyError_(-9999.)
256     ,trackMomentum_(-9999.)
257     ,trackMomentumError_(-9999.)
258     ,hadOverEm_(-9999.)
259     ,deltaEtaIn_(-9999.)
260     ,deltaPhiIn_(-9999.)
261     ,energySuperClusterOverPin_(-9999.)
262     ,deltaEtaOut_(-9999.)
263     ,deltaPhiOut_(-9999.)
264     ,energySeedClusterOverPout_(-9999.)
265     ,energyScaleCorrected_(false)
266     ,momentumCorrected_(false)
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     ,nbClusters_(-9999)
279     ,superClusterRawEnergy_(-9999.)
280     ,preshowerEnergy_(-9999.)
281     ,caloPosition_(-9999.,-9999.,-9999.)
282     ,scRef_()
283     ,clusterAlgo_(-9999)
284     ,caloConeSize_(-9999.)
285     ,e2x2_(-9999.)
286     ,e3x3_(-9999.)
287     ,e5x5_(-9999.)
288     ,eMax_(-9999.)
289     ,isoR01_sumPt_(-9999.)
290     ,isoR01_nTracks_(-9999)
291     ,isoR02_sumPt_(-9999.)
292     ,isoR02_nTracks_(-9999)
293     ,isoR03_emEt_(-9999.)
294     ,isoR03_hadEt_(-9999.)
295     ,isoR03_sumPt_(-9999.)
296     ,isoR03_nTracks_(-9999)
297     ,isoR05_emEt_(-9999.)
298     ,isoR05_hadEt_(-9999.)
299     ,isoR05_sumPt_(-9999.)
300     ,isoR05_nTracks_(-9999)
301     ,idCutBasedFixedThresholdLoose_(-1)
302     ,idCutBasedFixedThresholdTight_(-1)
303     ,idCutBasedFixedThresholdHighEnergy_(-1)
304     ,idCutBasedCategorizedLoose_(-1)
305     ,idCutBasedCategorizedTight_(-1)
306     ,idLikelihood_(-9999.)
307     ,idNeuralNet_(-9999.)
308     {;}
309    
310     TRootElectron(const TLorentzVector &momentum) :
311     TRootParticle(momentum)
312     ,classification_(-9999)
313     ,caloEnergy_(-9999.)
314     ,caloEnergyError_(-9999.)
315     ,trackMomentum_(-9999.)
316     ,trackMomentumError_(-9999.)
317     ,hadOverEm_(-9999.)
318     ,deltaEtaIn_(-9999.)
319     ,deltaPhiIn_(-9999.)
320     ,energySuperClusterOverPin_(-9999.)
321     ,deltaEtaOut_(-9999.)
322     ,deltaPhiOut_(-9999.)
323     ,energySeedClusterOverPout_(-9999.)
324     ,energyScaleCorrected_(false)
325     ,momentumCorrected_(false)
326     ,pixelLayersWithMeasurement_(-1)
327     ,stripLayersWithMeasurement_(-1)
328     ,d0_(-9999.)
329     ,d0Error_(-9999.)
330     ,dsz_(-9999.)
331     ,dszError_(-9999.)
332     ,normalizedChi2_(-9999.)
333     ,ptError_(-9999.)
334     ,etaError_(-9999.)
335     ,phiError_(-9999.)
336     ,ip3DSignificance_(-9999.)
337     ,nbClusters_(-9999)
338     ,superClusterRawEnergy_(-9999.)
339     ,preshowerEnergy_(-9999.)
340     ,caloPosition_(-9999.,-9999.,-9999.)
341     ,scRef_()
342     ,clusterAlgo_(-9999)
343     ,caloConeSize_(-9999.)
344     ,e2x2_(-9999.)
345     ,e3x3_(-9999.)
346     ,e5x5_(-9999.)
347     ,eMax_(-9999.)
348     ,isoR01_sumPt_(-9999.)
349     ,isoR01_nTracks_(-9999)
350     ,isoR02_sumPt_(-9999.)
351     ,isoR02_nTracks_(-9999)
352     ,isoR03_emEt_(-9999.)
353     ,isoR03_hadEt_(-9999.)
354     ,isoR03_sumPt_(-9999.)
355     ,isoR03_nTracks_(-9999)
356     ,isoR05_emEt_(-9999.)
357     ,isoR05_hadEt_(-9999.)
358     ,isoR05_sumPt_(-9999.)
359     ,isoR05_nTracks_(-9999)
360     ,idCutBasedFixedThresholdLoose_(-1)
361     ,idCutBasedFixedThresholdTight_(-1)
362     ,idCutBasedFixedThresholdHighEnergy_(-1)
363     ,idCutBasedCategorizedLoose_(-1)
364     ,idCutBasedCategorizedTight_(-1)
365     ,idLikelihood_(-9999.)
366     ,idNeuralNet_(-9999.)
367     {;}
368    
369     TRootElectron(const TLorentzVector &momentum, const TVector3 &vertex, Int_t type, Float_t charge) :
370     TRootParticle(momentum, vertex, type, charge)
371     ,classification_(-9999)
372     ,caloEnergy_(-9999.)
373     ,caloEnergyError_(-9999.)
374     ,trackMomentum_(-9999.)
375     ,trackMomentumError_(-9999.)
376     ,hadOverEm_(-9999.)
377     ,deltaEtaIn_(-9999.)
378     ,deltaPhiIn_(-9999.)
379     ,energySuperClusterOverPin_(-9999.)
380     ,deltaEtaOut_(-9999.)
381     ,deltaPhiOut_(-9999.)
382     ,energySeedClusterOverPout_(-9999.)
383     ,energyScaleCorrected_(false)
384     ,momentumCorrected_(false)
385     ,pixelLayersWithMeasurement_(-1)
386     ,stripLayersWithMeasurement_(-1)
387     ,d0_(-9999.)
388     ,d0Error_(-9999.)
389     ,dsz_(-9999.)
390     ,dszError_(-9999.)
391     ,normalizedChi2_(-9999.)
392     ,ptError_(-9999.)
393     ,etaError_(-9999.)
394     ,phiError_(-9999.)
395     ,ip3DSignificance_(-9999.)
396     ,nbClusters_(-9999)
397     ,superClusterRawEnergy_(-9999.)
398     ,preshowerEnergy_(-9999.)
399     ,caloPosition_(-9999.,-9999.,-9999.)
400     ,scRef_()
401     ,clusterAlgo_(-9999)
402     ,caloConeSize_(-9999.)
403     ,e2x2_(-9999.)
404     ,e3x3_(-9999.)
405     ,e5x5_(-9999.)
406     ,eMax_(-9999.)
407     ,isoR01_sumPt_(-9999.)
408     ,isoR01_nTracks_(-9999)
409     ,isoR02_sumPt_(-9999.)
410     ,isoR02_nTracks_(-9999)
411     ,isoR03_emEt_(-9999.)
412     ,isoR03_hadEt_(-9999.)
413     ,isoR03_sumPt_(-9999.)
414     ,isoR03_nTracks_(-9999)
415     ,isoR05_emEt_(-9999.)
416     ,isoR05_hadEt_(-9999.)
417     ,isoR05_sumPt_(-9999.)
418     ,isoR05_nTracks_(-9999)
419     ,idCutBasedFixedThresholdLoose_(-1)
420     ,idCutBasedFixedThresholdTight_(-1)
421     ,idCutBasedFixedThresholdHighEnergy_(-1)
422     ,idCutBasedCategorizedLoose_(-1)
423     ,idCutBasedCategorizedTight_(-1)
424     ,idLikelihood_(-9999.)
425     ,idNeuralNet_(-9999.)
426     {;}
427    
428     ~TRootElectron() {;}
429    
430    
431     Int_t classification() const { return classification_ ;}
432     Float_t caloEnergy() const { return caloEnergy_ ;}
433     Float_t caloEnergyError() const { return caloEnergyError_ ;}
434     Float_t trackMomentum() const { return trackMomentum_ ;}
435     Float_t trackMomentumError() const { return trackMomentumError_ ;}
436     Float_t hadOverEm() const { return hadOverEm_ ;}
437     Float_t deltaEtaIn() const { return deltaEtaIn_ ;}
438     Float_t deltaPhiIn() const { return deltaPhiIn_ ;}
439     Float_t energySuperClusterOverPin() const { return energySuperClusterOverPin_ ;}
440     Float_t deltaEtaOut() const { return deltaEtaOut_ ;}
441     Float_t deltaPhiOut() const { return deltaPhiOut_ ;}
442     Float_t energySeedClusterOverPout() const { return energySeedClusterOverPout_ ;}
443     Bool_t energyScaleCorrected() const { return energyScaleCorrected_ ;}
444     Bool_t momentumCorrected() const { return momentumCorrected_ ;}
445    
446     Int_t pixelLayersWithMeasurement() const { return pixelLayersWithMeasurement_; }
447     Int_t stripLayersWithMeasurement() const { return stripLayersWithMeasurement_; }
448     Float_t d0() const { return d0_ ;}
449     Float_t d0Error() const { return d0Error_ ;}
450     Float_t dsz() const { return dsz_ ;}
451     Float_t dszError() const { return dszError_ ;}
452     Float_t normalizedChi2() const { return normalizedChi2_ ;}
453     Float_t ptError() const { return ptError_ ;}
454     Float_t etaError() const { return etaError_ ;}
455     Float_t phiError() const { return phiError_ ;}
456     Float_t ip3DSignificance() const { return ip3DSignificance_ ;}
457    
458     Int_t nbClusters() const { return nbClusters_ ;}
459     Float_t superClusterRawEnergy() const { return superClusterRawEnergy_ ;}
460     Float_t preshowerEnergy() const { return preshowerEnergy_ ;}
461     TVector3 caloPosition() const { return caloPosition_ ;}
462     map<Int_t,TRef> scRef() const { return scRef_ ;}
463     Int_t clusterAlgo() const { return clusterAlgo_ ;}
464     Float_t caloConeSize() const { return caloConeSize_ ;}
465     Float_t e2x2() const { return e2x2_ ;}
466     Float_t e3x3() const { return e3x3_ ;}
467     Float_t e5x5() const { return e5x5_ ;}
468     Float_t eMax() const { return eMax_ ;}
469     Float_t isoR01_sumPt() const { return isoR01_sumPt_ ;}
470     Int_t isoR01_nTracks() const { return isoR01_nTracks_ ;}
471     Float_t isoR02_sumPt() const { return isoR02_sumPt_ ;}
472     Int_t isoR02_nTracks() const { return isoR02_nTracks_ ;}
473     Float_t isoR03_emEt() const { return isoR03_emEt_ ;}
474     Float_t isoR03_hadEt() const { return isoR03_hadEt_ ;}
475     Float_t isoR03_sumPt() const { return isoR03_sumPt_ ;}
476     Int_t isoR03_nTracks() const { return isoR03_nTracks_ ;}
477     Float_t isoR05_emEt() const { return isoR05_emEt_ ;}
478     Float_t isoR05_hadEt() const { return isoR05_hadEt_ ;}
479     Float_t isoR05_sumPt() const { return isoR05_sumPt_ ;}
480     Int_t isoR05_nTracks() const { return isoR05_nTracks_ ;}
481     Int_t idCutBasedFixedThresholdLoose() const { return idCutBasedFixedThresholdLoose_ ;}
482     Int_t idCutBasedFixedThresholdTight() const { return idCutBasedFixedThresholdTight_ ;}
483     Int_t idCutBasedFixedThresholdHighEnergy() const { return idCutBasedFixedThresholdHighEnergy_ ;}
484     Int_t idCutBasedCategorizedLoose() const { return idCutBasedCategorizedLoose_ ;}
485     Int_t idCutBasedCategorizedTight() const { return idCutBasedCategorizedTight_ ;}
486     Float_t idLikelihood() const { return idLikelihood_ ;}
487     Float_t idNeuralNet() const { return idNeuralNet_ ;}
488    
489     /* TODO - isBarrel / isEndcap / isCrack
490 lethuill 1.4 if (fabs (eta) <= 1.4442) {
491 lethuill 1.10 localElectron.setPosition (1);
492 lethuill 1.4 }
493     else if (fabs (eta) > 1.4442 & fabs (eta) < 1.5560) {
494 lethuill 1.10 localElectron.setPosition (0);
495 lethuill 1.4 }
496     else if (fabs (eta) >= 1.5560) {
497 lethuill 1.10 localElectron.setPosition (-1);
498 lethuill 1.4 }
499 lethuill 1.10 */
500    
501     virtual TString typeName() const { return "TRootElectron"; }
502    
503    
504     void setClassification(Int_t classification) { classification_ = classification; }
505     void setCaloEnergy(Float_t caloEnergy) { caloEnergy_ = caloEnergy; }
506     void setCaloEnergyError(Float_t caloEnergyError) { caloEnergyError_ = caloEnergyError; }
507     void setTrackMomentum(Float_t trackMomentum) { trackMomentum_ = trackMomentum; }
508     void setTrackMomentumError(Float_t trackMomentumError) { trackMomentumError_ = trackMomentumError; }
509     void setHadOverEm(Float_t hadOverEm) { hadOverEm_ = hadOverEm; }
510     void setDeltaEtaIn(Float_t deltaEtaIn) { deltaEtaIn_ = deltaEtaIn; }
511     void setDeltaPhiIn(Float_t deltaPhiIn) { deltaPhiIn_ = deltaPhiIn; }
512     void setEnergySuperClusterOverPin(Float_t energySuperClusterOverPin) { energySuperClusterOverPin_ = energySuperClusterOverPin; }
513     void setDeltaEtaOut(Float_t deltaEtaOut) { deltaEtaOut_ = deltaEtaOut; }
514     void setDeltaPhiOut(Float_t deltaPhiOut) { deltaPhiOut_ = deltaPhiOut; }
515     void setEnergySeedClusterOverPout(Float_t energySeedClusterOverPout) { energySeedClusterOverPout_ = energySeedClusterOverPout; }
516     void setEnergyScaleCorrected(Bool_t energyScaleCorrected) { energyScaleCorrected_ = energyScaleCorrected; }
517     void setMomentumCorrected(Bool_t momentumCorrected) { momentumCorrected_ = momentumCorrected; }
518    
519     void setPixelLayersWithMeasurement(Int_t pixelLayersWithMeasurement) { pixelLayersWithMeasurement_ = pixelLayersWithMeasurement; }
520     void setStripLayersWithMeasurement(Int_t stripLayersWithMeasurement) { stripLayersWithMeasurement_ = stripLayersWithMeasurement; }
521     void setD0(Float_t d0) { d0_ = d0; }
522     void setD0Error(Float_t d0Error) { d0Error_ = d0Error; }
523     void setDsz(Float_t dsz) { dsz_ = dsz; }
524     void setDszError(Float_t dszError) { dszError_ = dszError; }
525     void setNormalizedChi2(Float_t normalizedChi2) { normalizedChi2_ = normalizedChi2; }
526     void setPtError(Float_t ptError) { ptError_ = ptError; }
527     void setEtaError(Float_t etaError) { etaError_ = etaError; }
528     void setPhiError(Float_t phiError) { phiError_ = phiError; }
529     void setIP3DSignificance(Float_t ip3DSignificance) { ip3DSignificance_ = ip3DSignificance; }
530    
531     void setNbClusters(Int_t nbClusters) { nbClusters_ = nbClusters; }
532     void setSuperClusterRawEnergy(Float_t superClusterRawEnergy) { superClusterRawEnergy_ = superClusterRawEnergy; }
533     void setPreshowerEnergy(Float_t preshowerEnergy) { preshowerEnergy_ = preshowerEnergy; }
534     void setCaloPosition(TVector3 caloPosition) { caloPosition_ = caloPosition; }
535     void setCaloPosition(Double_t x, Double_t y, Double_t z) { caloPosition_.SetXYZ(x, y ,z); }
536     void setSCRef(map<Int_t,TRef> scRef) { scRef_ = scRef; }
537     void setClusterAlgo(Int_t clusterAlgo) { clusterAlgo_ = clusterAlgo; }
538     void setCaloConeSize(Float_t caloConeSize) { caloConeSize_ = caloConeSize; }
539     void setE2x2(Float_t e2x2) { e2x2_ = e2x2; }
540     void setE3x3(Float_t e3x3) { e3x3_ = e3x3; }
541     void setE5x5(Float_t e5x5) { e5x5_ = e5x5; }
542     void setEMax(Float_t eMax) { eMax_ = eMax; }
543     void setIsoR01_sumPt(Float_t isoR01_sumPt) { isoR01_sumPt_ = isoR01_sumPt; }
544     void setIsoR01_nTracks(Int_t isoR01_nTracks) { isoR01_nTracks_ = isoR01_nTracks; }
545     void setIsoR02_sumPt(Float_t isoR02_sumPt) { isoR02_sumPt_ = isoR02_sumPt; }
546     void setIsoR02_nTracks(Int_t isoR02_nTracks) { isoR02_nTracks_ = isoR02_nTracks; }
547     void setIsoR03_emEt(Float_t isoR03_emEt) { isoR03_emEt_ = isoR03_emEt; }
548     void setIsoR03_hadEt(Float_t isoR03_hadEt) { isoR03_hadEt_ = isoR03_hadEt; }
549     void setIsoR03_sumPt(Float_t isoR03_sumPt) { isoR03_sumPt_ = isoR03_sumPt; }
550     void setIsoR03_nTracks(Int_t isoR03_nTracks) { isoR03_nTracks_ = isoR03_nTracks; }
551     void setIsoR05_emEt(Float_t isoR05_emEt) { isoR05_emEt_ = isoR05_emEt; }
552     void setIsoR05_hadEt(Float_t isoR05_hadEt) { isoR05_hadEt_ = isoR05_hadEt; }
553     void setIsoR05_sumPt(Float_t isoR05_sumPt) { isoR05_sumPt_ = isoR05_sumPt; }
554     void setIsoR05_nTracks(Int_t isoR05_nTracks) { isoR05_nTracks_ = isoR05_nTracks; }
555     void setIDCutBasedFixedThresholdLoose(Int_t idCutBasedFixedThresholdLoose) { idCutBasedFixedThresholdLoose_ = idCutBasedFixedThresholdLoose; }
556     void setIDCutBasedFixedThresholdTight(Int_t idCutBasedFixedThresholdTight) { idCutBasedFixedThresholdTight_ = idCutBasedFixedThresholdTight; }
557     void setIDCutBasedFixedThresholdHighEnergy(Int_t idCutBasedFixedThresholdHighEnergy) { idCutBasedFixedThresholdHighEnergy_ = idCutBasedFixedThresholdHighEnergy; }
558     void setIDCutBasedCategorizedLoose(Int_t idCutBasedCategorizedLoose) { idCutBasedCategorizedLoose_ = idCutBasedCategorizedLoose; }
559     void setIDCutBasedCategorizedTight(Int_t idCutBasedCategorizedTight) { idCutBasedCategorizedTight_ = idCutBasedCategorizedTight; }
560     void setIDLikelihood(Float_t idLikelihood) { idLikelihood_ = idLikelihood; }
561     void setIDNeuralNet(Float_t idNeuralNet) { idNeuralNet_ = idNeuralNet; }
562    
563     friend std::ostream& operator<< (std::ostream& stream, const TRootElectron& electron) {
564     stream << "TRootElectron - Charge=" << electron.charge() << " (Et,eta,phi)=("<< electron.Et() <<","<< electron.Eta() <<","<< electron.Phi() << ")"
565     << " vertex(x,y,z)=("<< electron.vx() <<","<< electron.vy() <<","<< electron.vz() << ")";
566     return stream;
567     };
568    
569    
570     private:
571    
572     // Variables from reco::GsfElectron
573    
574     // Classification:
575     // barrel : 0: golden, 10: bigbrem, 20: narrow, 30-34: showering, 40: crack
576     // (30: showering nbrem=0, 31: showering nbrem=1, 32: showering nbrem=2 ,33: showering nbrem=3, 34: showering nbrem>=4)
577     // endcaps : 100: golden, 110: bigbrem, 120: narrow, 130-134: showering
578     // (130: showering nbrem=0, 131: showering nbrem=1, 132: showering nbrem=2 ,133: showering nbrem=3, 134: showering nbrem>=4)
579    
580     Int_t classification_; // Electron classification
581    
582     Float_t caloEnergy_; // SuperCluster energy corrected by EnergyScaleFactor
583     Float_t caloEnergyError_; // Error on caloEnergy_
584     Float_t trackMomentum_; // Track momentum at vertex
585     Float_t trackMomentumError_; // Error on trackMomentum_
586    
587     Float_t hadOverEm_; // hadronic over electromagnetic fraction
588    
589     Float_t deltaEtaIn_; // Supercluster eta - Track eta from helix extrapolation from impact point
590     Float_t deltaPhiIn_; // Supercluster phi - Track phi from helix extrapolation from impact point
591     Float_t energySuperClusterOverPin_; // supercluster energy / track momentum at impact point
592    
593     Float_t deltaEtaOut_; // SeedCluster eta - Track eta at calo from outermost state
594     Float_t deltaPhiOut_; // SeedCluster phi - Track phi at calo from outermost state
595     Float_t energySeedClusterOverPout_; // SeedCluster energy / track momentum at calo from outermost state
596    
597     Bool_t energyScaleCorrected_; // Has Energy Scale been applied ?
598     Bool_t momentumCorrected_; // Tell if class dependant E-p combination has been determined
599    
600    
601     // Variables from reco::GsfTrack
602    
603     /* cf: http://cmslxr.fnal.gov/lxr/source/DataFormats/TrackReco/interface/TrackBase.h
604     For tracks reconstructed in the CMS Tracker, the reference position is the point of closest approach to the centre
605     of CMS. For muons, this is not necessarily true. Parameters associated to the 5D curvilinear covariance matrix:
606     qoverp = q / abs(p) = signed inverse of momentum [1/GeV]
607     lambda = pi/2 - polar angle at the given point
608     phi = azimuth angle at the given point
609     dxy = -vx*sin(phi) + vy*cos(phi) [cm]
610     dsz = vz*cos(lambda) - (vx*cos(phi)+vy*sin(phi))*sin(lambda) [cm]
611    
612     Geometrically, dxy is the signed distance in the XY plane between the straight line passing through (vx,vy) with
613     azimuthal angle phi and the point (0,0). The dsz parameter is the signed distance in the SZ plane between the straight
614     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
615     of the straight line onto the XY plane. The convention is to assign the S coordinate for (vx,vy) as the value
616     vx*cos(phi)+vy*sin(phi). This value is zero when (vx,vy) is the point of minimum transverse distance to (0,0).
617    
618     Note that dxy and dsz provide sensible estimates of the distance from the true particle trajectory to (0,0,0) ONLY
619     in two cases:
620     - When (vx,vy,vz) already correspond to the point of minimum transverse distance to (0,0,0) or is close to it
621     (so that the differences between considering the exact trajectory or a straight line in this range are negligible).
622     This is usually true for Tracker tracks.
623     - When the track has infinite or extremely high momentum */
624    
625     Int_t pixelLayersWithMeasurement_; // Number of pixel layers with at least one valid hit
626     Int_t stripLayersWithMeasurement_; // Number of strip layers with at least one valid hit
627    
628     Float_t d0_; // d0=-dxy
629     Float_t d0Error_; // error on d0_
630     Float_t dsz_; // dsz parameter
631     Float_t dszError_; // error on dsz_
632     Float_t normalizedChi2_; // chi-squared divided by n.d.o.f. of track fit
633    
634     Float_t ptError_; // needed ? ptError()
635     Float_t etaError_; // needed ? etaError()
636     Float_t phiError_; // needed ? phiError()
637    
638     Float_t ip3DSignificance_; // Significance of the impact parameter wrt to the selected primary vertex
639    
640    
641     // Variables from reco::SuperCluster
642     Int_t nbClusters_; // Number of related brem clusters
643     Float_t superClusterRawEnergy_;
644     Float_t preshowerEnergy_;
645     TVector3 caloPosition_; // SuperCluster centroid position
646     map<Int_t,TRef> scRef_; // references to the seed SuperClusters (one per SC tytpe)
647    
648    
649     // Cluster Shape variables
650     // need reco::SuperCluster and reco::BasicCluster
651     Int_t clusterAlgo_; // reco::BasicCluster::algo() island = 0, hybrid = 1, fixedMatrix = 2, dynamicHybrid = 3, multi5x5 = 4
652     Float_t caloConeSize_; // Delta_R of the cone centered on the reco::GsfElectron and containing all its basic clusters constituents
653     // need reco::SuperCluster and reco::BasicCluster and reduced Ecal RecHits Collections for EcalClusterLazyTools
654     Float_t e2x2_;
655     Float_t e3x3_;
656     Float_t e5x5_;
657     Float_t eMax_;
658    
659    
660     // pat::Electron Isolation
661     Float_t isoR01_sumPt_;
662     Int_t isoR01_nTracks_;
663    
664     Float_t isoR02_sumPt_;
665     Int_t isoR02_nTracks_;
666    
667     Float_t isoR03_emEt_;
668     Float_t isoR03_hadEt_;
669     Float_t isoR03_sumPt_;
670     Int_t isoR03_nTracks_;
671    
672     Float_t isoR05_emEt_;
673     Float_t isoR05_hadEt_;
674     Float_t isoR05_sumPt_; // Pt sum of tracks in a DR=0.5 cone around the electron
675     Int_t isoR05_nTracks_; // Tracks multiplicity in a DR=0.5 cone around the electron
676    
677    
678     // pat::Electron ID (cf https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideElectronID)
679     // By default in 2.2.X, only cut based identification is available in pat (https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCutBasedElectronID
680     Int_t idCutBasedFixedThresholdLoose_; // Simple cut based ID (aka 'robust') - Loose Thresholds on H/E, DeltaEta, DeltaPhi, SigmaEtaEta
681     Int_t idCutBasedFixedThresholdTight_; // Simple cut based ID (default in EWK group) - Tight Thresholds on H/E, DeltaEta, DeltaPhi, SigmaEtaEta
682     Int_t idCutBasedFixedThresholdHighEnergy_; // Simple cut based ID - Thresholds optimized for high energy electron (~TeV)
683     Int_t idCutBasedCategorizedLoose_; // Category based ID - Different loose thresholds on H/E, DeltaEta, DeltaPhi, SigmaEtaEta, eSeedOverPin for differents regions in the E/p vs fBrem plane
684     Int_t idCutBasedCategorizedTight_; // Category based ID - Different tight thresholds on H/E, DeltaEta, DeltaPhi, SigmaEtaEta, eSeedOverPin for differents regions in the E/p vs fBrem plane
685     Float_t idLikelihood_; // Lieklihood ID - not activated by default in 2.2.X
686     Float_t idNeuralNet_; // NN ID - not activated by default in 2.2.X
687    
688    
689     // Matched genParticle
690     TLorentzVector momentumMCElectron_;
691     TVector3 vertexMCElectron_;
692     Int_t pdgIdMCElectron_;
693    
694     // needed ?
695     //Float_t sigmaEtaEta_;
696     //Float_t sigmaPhiPhi_;
697 lethuill 1.4
698    
699 lethuill 1.10 ClassDef (TRootElectron,3);
700 lethuill 1.3
701 mlethuil 1.1 };
702    
703     #endif