ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Electron.h
Revision: 1.55
Committed: Sat May 12 15:55:10 2012 UTC (12 years, 11 months ago) by paus
Content type: text/plain
Branch: MAIN
Changes since 1.54: +54 -33 lines
Log Message:
New tag 028 (EcalEnergy added).

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 paus 1.55 // $Id: Electron.h,v 1.54 2012/05/12 11:37:23 ceballos Exp $
3 bendavid 1.1 //
4 paus 1.3 // Electron
5 bendavid 1.1 //
6 loizides 1.29 // This class holds information about reconstructed electrons from CMSSW.
7 bendavid 1.1 //
8 paus 1.55 // Authors: C.Paus, G.Ceballos, C.Loizides, J.Bendavid, S.Xie
9 bendavid 1.1 //--------------------------------------------------------------------------------------------------
10    
11 loizides 1.23 #ifndef MITANA_DATATREE_ELECTRON_H
12     #define MITANA_DATATREE_ELECTRON_H
13 loizides 1.6
14 sixie 1.13 #include "MitAna/DataTree/interface/SuperCluster.h"
15 bendavid 1.11 #include "MitAna/DataTree/interface/ChargedParticle.h"
16 bendavid 1.24 #include "MitAna/DataCont/interface/Ref.h"
17 loizides 1.6
18 bendavid 1.1 namespace mithep
19     {
20 bendavid 1.11 class Electron : public ChargedParticle
21 bendavid 1.1 {
22     public:
23 loizides 1.34 Electron() :
24 bendavid 1.38 fCharge(-99), fScPixCharge(0),
25 loizides 1.34 fESuperClusterOverP(0), fESeedClusterOverPout(0), fDeltaEtaSuperClTrkAtVtx(0),
26     fDeltaEtaSeedClTrkAtCalo(0), fDeltaPhiSuperClTrkAtVtx(0),
27     fDeltaPhiSeedClTrkAtCalo(0), fFBrem(0), fHadronicOverEm(0), fHcalDepth1OverEcal(0),
28 bendavid 1.35 fHcalDepth2OverEcal(0), fNumberOfClusters(0), fE15(0), fE25Max(0),
29     fE55(0), fCovEtaEta(0), fCoviEtaiEta(0),
30 loizides 1.34 fCaloIsolation(0), fHcalJurassicIsolation(0),
31     fHcalDepth1TowerSumEtDr04(0), fHcalDepth2TowerSumEtDr04(0),
32     fEcalJurassicIsolation(0), fTrackIsolationDr04(0), fCaloTowerIsolation(0),
33     fHcalDepth1TowerSumEtDr03(0), fHcalDepth2TowerSumEtDr03(0),
34     fEcalRecHitSumEtDr03(0), fTrackIsolation(0), fPassLooseID(0),
35     fPassTightID(0), fIDLikelihood(0), fPIn(0), fPOut(0), fFracSharedHits(0),
36 bendavid 1.40 fMva(0), fD0PV(0), fD0PVErr(0), fIp3dPV(0), fIp3dPVErr(0),
37     fD0PVBS(0), fD0PVBSErr(0), fIp3dPVBS(0), fIp3dPVBSErr(0),
38 bendavid 1.44 fD0PVCkf(0), fD0PVCkfErr(0), fIp3dPVCkf(0), fIp3dPVCkfErr(0),
39     fD0PVBSCkf(0), fD0PVBSCkfErr(0), fIp3dPVBSCkf(0), fIp3dPVBSCkfErr(0),
40 bendavid 1.47 fD0PVUB(0), fD0PVUBErr(0), fIp3dPVUB(0), fIp3dPVUBErr(0),
41     fD0PVUBBS(0), fD0PVUBBSErr(0), fIp3dPVUBBS(0), fIp3dPVUBBSErr(0),
42     fD0PVUBCkf(0), fD0PVUBCkfErr(0), fIp3dPVUBCkf(0), fIp3dPVUBCkfErr(0),
43     fD0PVUBBSCkf(0), fD0PVUBBSCkfErr(0), fIp3dPVUBBSCkf(0), fIp3dPVUBBSCkfErr(0),
44 bendavid 1.41 fGsfPVCompatibility(0), fGsfPVBSCompatibility(0),
45     fGsfPVCompatibilityMatched(0), fGsfPVBSCompatibilityMatched(0),
46 bendavid 1.40 fConvPartnerDCotTheta(0), fConvPartnerDist(0), fConvPartnerRadius(0),
47 bendavid 1.46 fPFChargedHadronIso(0), fPFNeutralHadronIso(0), fPFPhotonIso(0),
48 bendavid 1.45 fConvFlag(0), fIsEnergyScaleCorrected(0), fIsMomentumCorrected(0),
49 loizides 1.34 fClassification(0), fIsEB(), fIsEE(0), fIsEBEEGap(0), fIsEBEtaGap(0),
50     fIsEBPhiGap(0), fIsEEDeeGap(0), fIsEERingGap(0),
51 bendavid 1.52 fIsEcalDriven(0), fIsTrackerDriven(0), fMatchesVertexConversion(0),
52 paus 1.55 <<<<<<< Electron.h
53     fHadOverEmTow(0), fHCalIsoTowDr03(0), fHCalIsoTowDr04(0),
54     fEcalEnergy(0), fEcalEnergyError(0) {}
55     =======
56 ceballos 1.54 fHadOverEmTow(0), fHCalIsoTowDr03(0), fHCalIsoTowDr04(0),
57     fCorrectedEcalEnergy(0), fCorrectedEcalEnergyError(0) {}
58 paus 1.55 >>>>>>> 1.54
59 loizides 1.29
60 paus 1.48 const Track *BestTrk() const;
61     Double_t D0PV() const { return fD0PV; }
62     Double_t D0PVErr() const { return fD0PVErr; }
63     Double_t D0PVSignificance() const { return fD0PV/fD0PVErr; }
64     Double_t Ip3dPV() const { return fIp3dPV; }
65     Double_t Ip3dPVErr() const { return fIp3dPVErr; }
66     Double_t Ip3dPVSignificance() const { return fIp3dPV/fIp3dPVErr; }
67     Double_t D0PVBS() const { return fD0PVBS; }
68     Double_t D0PVBSErr() const { return fD0PVBSErr; }
69     Double_t D0PVBSSignificance() const { return fD0PVBS/fD0PVBSErr; }
70     Double_t Ip3dPVBS() const { return fIp3dPVBS; }
71     Double_t Ip3dPVBSErr() const { return fIp3dPVBSErr; }
72     Double_t Ip3dPVBSSignificance() const { return fIp3dPVBS/fIp3dPVBSErr; }
73     Double_t D0PVCkf() const { return fD0PVCkf; }
74     Double_t D0PVCkfErr() const { return fD0PVCkfErr; }
75     Double_t D0PVCkfSignificance() const { return fD0PVCkf/fD0PVCkfErr; }
76     Double_t Ip3dPVCkf() const { return fIp3dPVCkf; }
77     Double_t Ip3dPVCkfErr() const { return fIp3dPVCkfErr; }
78     Double_t Ip3dPVCkfSignificance() const { return fIp3dPVCkf/fIp3dPVCkfErr; }
79     Double_t D0PVBSCkf() const { return fD0PVBSCkf; }
80     Double_t D0PVBSCkfErr() const { return fD0PVBSCkfErr; }
81     Double_t D0PVBSCkfSignificance() const { return fD0PVBSCkf/fD0PVBSCkfErr; }
82     Double_t Ip3dPVBSCkf() const { return fIp3dPVBSCkf; }
83     Double_t Ip3dPVBSCkfErr() const { return fIp3dPVBSCkfErr; }
84     Double_t Ip3dPVBSCkfSignificance() const { return fIp3dPVBSCkf/fIp3dPVBSCkfErr; }
85     Double_t D0PVUB() const { return fD0PVUB; }
86     Double_t D0PVUBErr() const { return fD0PVUBErr; }
87     Double_t D0PVUBSignificance() const { return fD0PVUB/fD0PVUBErr; }
88     Double_t Ip3dPVUB() const { return fIp3dPVUB; }
89     Double_t Ip3dPVUBErr() const { return fIp3dPVUBErr; }
90     Double_t Ip3dPVUBSignificance() const { return fIp3dPVUB/fIp3dPVUBErr; }
91     Double_t D0PVUBBS() const { return fD0PVUBBS; }
92     Double_t D0PVUBBSErr() const { return fD0PVUBBSErr; }
93     Double_t D0PVUBBSSignificance() const { return fD0PVUBBS/fD0PVUBBSErr; }
94     Double_t Ip3dPVUBBS() const { return fIp3dPVUBBS; }
95     Double_t Ip3dPVUBBSErr() const { return fIp3dPVUBBSErr; }
96     Double_t Ip3dPVUBBSSignificance() const { return fIp3dPVUBBS/fIp3dPVUBBSErr; }
97     Double_t D0PVUBCkf() const { return fD0PVUBCkf; }
98     Double_t D0PVUBCkfErr() const { return fD0PVUBCkfErr; }
99     Double_t D0PVUBCkfSignificance() const { return fD0PVUBCkf/fD0PVUBCkfErr; }
100     Double_t Ip3dPVUBCkf() const { return fIp3dPVUBCkf; }
101     Double_t Ip3dPVUBCkfErr() const { return fIp3dPVUBCkfErr; }
102     Double_t Ip3dPVUBCkfSignificance() const { return fIp3dPVUBCkf/fIp3dPVUBCkfErr; }
103     Double_t D0PVUBBSCkf() const { return fD0PVUBBSCkf; }
104     Double_t D0PVUBBSCkfErr() const { return fD0PVUBBSCkfErr; }
105     Double_t D0PVUBBSCkfSignificance() const { return fD0PVUBBSCkf/fD0PVUBBSCkfErr; }
106     Double_t Ip3dPVUBBSCkf() const { return fIp3dPVUBBSCkf; }
107     Double_t Ip3dPVUBBSCkfErr() const { return fIp3dPVUBBSCkfErr; }
108 bendavid 1.47 Double_t Ip3dPVUBBSCkfSignificance() const { return fIp3dPVUBBSCkf/fIp3dPVUBBSCkfErr; }
109 paus 1.48 Double_t GsfPVCompatibility() const { return fGsfPVCompatibility; }
110     Double_t GsfPVBSCompatibility() const { return fGsfPVBSCompatibility; }
111     Double_t GsfPVCompatibilityMatched() const { return fGsfPVCompatibilityMatched; }
112     Double_t GsfPVBSCompatibilityMatched() const { return fGsfPVBSCompatibilityMatched; }
113     Double_t ConvPartnerDCotTheta() const { return fConvPartnerDCotTheta; }
114     Double_t ConvPartnerDist() const { return fConvPartnerDist; }
115     Double_t ConvPartnerRadius() const { return fConvPartnerRadius; }
116     Int_t ConvFlag() const { return fConvFlag; }
117     Double_t CaloIsolation() const { return fCaloIsolation; } // *DEPRECATED*
118     Int_t Classification() const { return fClassification; }
119     Double_t CovEtaEta() const { return fCovEtaEta; }
120     Double_t CoviEtaiEta() const { return fCoviEtaiEta; }
121     Double_t DeltaEtaSuperClusterTrackAtVtx() const { return fDeltaEtaSuperClTrkAtVtx; }
122     Double_t DeltaEtaSeedClusterTrackAtCalo() const { return fDeltaEtaSeedClTrkAtCalo; }
123     Double_t DeltaPhiSuperClusterTrackAtVtx() const { return fDeltaPhiSuperClTrkAtVtx; }
124     Double_t DeltaPhiSeedClusterTrackAtCalo() const { return fDeltaPhiSeedClTrkAtCalo; }
125     Double_t E15() const { return fE15; }
126     Double_t E25Max() const { return fE25Max; }
127     Double_t E55() const { return fE55; }
128     Double_t ESuperClusterOverP() const { return fESuperClusterOverP; }
129     Double_t ESeedClusterOverPout() const { return fESeedClusterOverPout; }
130 sixie 1.51 Double_t EEleClusterOverPout() const { return fEEleClusterOverPout; }
131 paus 1.48 Double_t ESeedClusterOverPIn() const;
132     Double_t FBrem() const { return fFBrem; }
133     Double_t FBremOld() const { return (PIn() - POut())/PIn(); }
134     Double_t FracSharedHits() const { return fFracSharedHits; }
135     const Track *GsfTrk() const { return fGsfTrackRef.Obj(); }
136     Double_t HadronicOverEm() const { return fHadronicOverEm; }
137     Double_t HcalDepth1OverEcal() const { return fHcalDepth1OverEcal; }
138     Double_t HcalDepth2OverEcal() const { return fHcalDepth2OverEcal; }
139     Bool_t HasGsfTrk() const { return fGsfTrackRef.IsValid(); }
140     Bool_t HasTrackerTrk() const { return fTrackerTrackRef.IsValid(); }
141     Bool_t HasSuperCluster() const { return fSuperClusterRef.IsValid(); }
142     Double_t HcalIsolation() const { return fHcalJurassicIsolation; } // *DEPRECATED*
143     Double_t IDLikelihood() const { return fIDLikelihood; }
144     Bool_t IsEnergyScaleCorrected() const { return fIsEnergyScaleCorrected; }
145     Bool_t IsMomentumCorrected() const { return fIsMomentumCorrected; }
146     Bool_t IsEB() const { return fIsEB; }
147     Bool_t IsEE() const { return fIsEE; }
148     Bool_t IsEBEEGap() const { return fIsEBEEGap; }
149     Bool_t IsEBEtaGap() const { return fIsEBEtaGap; }
150     Bool_t IsEBPhiGap() const { return fIsEBPhiGap; }
151     Bool_t IsEEDeeGap() const { return fIsEEDeeGap; }
152     Bool_t IsEERingGap() const { return fIsEERingGap; }
153     Bool_t IsEcalDriven() const { return fIsEcalDriven; }
154     Bool_t IsTrackerDriven() const { return fIsTrackerDriven; }
155     Double_t Mva() const { return fMva; }
156     Double_t NumberOfClusters() const { return fNumberOfClusters; }
157     EObjType ObjType() const { return kElectron; }
158     Double_t PassLooseID() const { return fPassLooseID; }
159     Double_t PassTightID() const { return fPassTightID; }
160     Double_t PIn() const { return fPIn; }
161     Double_t POut() const { return fPOut; }
162     const SuperCluster *SCluster() const { return fSuperClusterRef.Obj(); }
163 paus 1.53 const SuperCluster *PFSCluster() const { return fPFSuperClusterRef.Obj(); }
164 paus 1.48 Double_t ScPixCharge() const { return fScPixCharge; }
165    
166     Double_t EcalRecHitIsoDr04() const { return fEcalJurassicIsolation; }
167     Double_t HcalTowerSumEtDr04() const { return HcalDepth1TowerSumEtDr04() +
168     HcalDepth2TowerSumEtDr04(); }
169     Double_t HcalDepth1TowerSumEtDr04() const { return fHcalDepth1TowerSumEtDr04; }
170     Double_t HcalDepth2TowerSumEtDr04() const { return fHcalDepth2TowerSumEtDr04; }
171     Double_t TrackIsolationDr04() const { return fTrackIsolationDr04; }
172     Double_t EcalRecHitIsoDr03() const { return fEcalRecHitSumEtDr03; }
173     Double_t HcalTowerSumEtDr03() const { return fCaloTowerIsolation; }
174     Double_t HcalDepth1TowerSumEtDr03() const { return fHcalDepth1TowerSumEtDr03; }
175     Double_t HcalDepth2TowerSumEtDr03() const { return fHcalDepth2TowerSumEtDr03; }
176     Double_t TrackIsolationDr03() const { return fTrackIsolation; }
177     Double_t PFChargedHadronIso() const { return fPFChargedHadronIso; }
178     Double_t PFNeutralHadronIso() const { return fPFNeutralHadronIso; }
179     Double_t PFPhotonIso() const { return fPFPhotonIso; }
180     Bool_t MatchesVertexConversion() const { return fMatchesVertexConversion; }
181     UInt_t NAmbiguousGsfTracks() const { return fAmbiguousGsfTracks.Entries(); }
182 bendavid 1.43 Bool_t HasAmbiguousGsfTrack(const Track *t) const { return fAmbiguousGsfTracks.HasObject(t); }
183 paus 1.48 const Track *AmbiguousGsfTrack(UInt_t i) const { return fAmbiguousGsfTracks.At(i); }
184 sixie 1.51 Int_t CTFTrkNLayersWithMeasurement() const { return fCTFTrkNLayersWithMeasurement; }
185 paus 1.55 <<<<<<< Electron.h
186     Double_t HadOverEmTow() const { return fHadOverEmTow; }
187     Double_t HcalIsoTowDr03() const { return fHCalIsoTowDr03; }
188     Double_t HcalIsoTowDr04() const { return fHCalIsoTowDr04; }
189     Double_t EcalEnergy() const { return fEcalEnergy; }
190     Double_t EcalEnergyError() const { return fEcalEnergyError; }
191     =======
192 bendavid 1.52 Double_t HadOverEmTow() const { return fHadOverEmTow; }
193     Double_t HcalIsoTowDr03() const { return fHCalIsoTowDr03; }
194     Double_t HcalIsoTowDr04() const { return fHCalIsoTowDr04; }
195 ceballos 1.54 Double_t CorrectedEcalEnergy() const { return fCorrectedEcalEnergy; }
196     Double_t CorrectedEcalEnergyError() const { return fCorrectedEcalEnergyError; }
197 paus 1.55 >>>>>>> 1.54
198 sixie 1.51
199 paus 1.48 void AddAmbiguousGsfTrack(const Track *t) { fAmbiguousGsfTracks.Add(t); }
200     void SetCharge(Char_t x) { fCharge = x; ClearCharge(); }
201     void SetScPixCharge(Char_t x) { fScPixCharge = x; }
202     void SetD0PV(Double_t x) { fD0PV = x; }
203     void SetD0PVErr(Double_t x) { fD0PVErr = x; }
204     void SetIp3dPV(Double_t x) { fIp3dPV = x; }
205     void SetIp3dPVErr(Double_t x) { fIp3dPVErr = x; }
206     void SetD0PVBS(Double_t x) { fD0PVBS = x; }
207     void SetD0PVBSErr(Double_t x) { fD0PVBSErr = x; }
208     void SetIp3dPVBS(Double_t x) { fIp3dPVBS = x; }
209     void SetIp3dPVBSErr(Double_t x) { fIp3dPVBSErr = x; }
210     void SetD0PVCkf(Double_t x) { fD0PVCkf = x; }
211     void SetD0PVCkfErr(Double_t x) { fD0PVCkfErr = x; }
212     void SetIp3dPVCkf(Double_t x) { fIp3dPVCkf = x; }
213     void SetIp3dPVCkfErr(Double_t x) { fIp3dPVCkfErr = x; }
214     void SetD0PVBSCkf(Double_t x) { fD0PVBSCkf = x; }
215     void SetD0PVBSCkfErr(Double_t x) { fD0PVBSCkfErr = x; }
216     void SetIp3dPVBSCkf(Double_t x) { fIp3dPVBSCkf = x; }
217     void SetIp3dPVBSCkfErr(Double_t x) { fIp3dPVBSCkfErr = x; }
218     void SetD0PVUB(Double_t x) { fD0PVUB = x; }
219     void SetD0PVUBErr(Double_t x) { fD0PVUBErr = x; }
220     void SetIp3dPVUB(Double_t x) { fIp3dPVUB = x; }
221     void SetIp3dPVUBErr(Double_t x) { fIp3dPVUBErr = x; }
222     void SetD0PVUBBS(Double_t x) { fD0PVUBBS = x; }
223     void SetD0PVUBBSErr(Double_t x) { fD0PVUBBSErr = x; }
224     void SetIp3dPVUBBS(Double_t x) { fIp3dPVUBBS = x; }
225     void SetIp3dPVUBBSErr(Double_t x) { fIp3dPVUBBSErr = x; }
226     void SetD0PVUBCkf(Double_t x) { fD0PVUBCkf = x; }
227     void SetD0PVUBCkfErr(Double_t x) { fD0PVUBCkfErr = x; }
228     void SetIp3dPVUBCkf(Double_t x) { fIp3dPVUBCkf = x; }
229     void SetIp3dPVUBCkfErr(Double_t x) { fIp3dPVUBCkfErr = x; }
230     void SetD0PVUBBSCkf(Double_t x) { fD0PVUBBSCkf = x; }
231     void SetD0PVUBBSCkfErr(Double_t x) { fD0PVUBBSCkfErr = x; }
232     void SetIp3dPVUBBSCkf(Double_t x) { fIp3dPVUBBSCkf = x; }
233     void SetIp3dPVUBBSCkfErr(Double_t x) { fIp3dPVUBBSCkfErr = x; }
234     void SetGsfPVCompatibility(Double_t x) { fGsfPVCompatibility = x; }
235     void SetGsfPVBSCompatibility(Double_t x) { fGsfPVBSCompatibility = x; }
236     void SetGsfPVCompatibilityMatched(Double_t x) { fGsfPVCompatibilityMatched = x; }
237 bendavid 1.41 void SetGsfPVBSCompatibilityMatched(Double_t x) { fGsfPVBSCompatibilityMatched = x; }
238 paus 1.48 void SetConvPartnerDCotTheta(Double_t x) { fConvPartnerDCotTheta = x; }
239     void SetConvPartnerDist(Double_t x) { fConvPartnerDist = x; }
240     void SetConvPartnerRadius(Double_t x) { fConvPartnerRadius = x; }
241     void SetConvFlag(Int_t n) { fConvFlag = n; }
242     void SetClassification(Int_t x) { fClassification = x; }
243     void SetCovEtaEta(Double_t x) { fCovEtaEta = x; }
244     void SetCoviEtaiEta(Double_t x) { fCoviEtaiEta = x; }
245 loizides 1.27 void SetDeltaEtaSuperClusterTrackAtVtx(Double_t x)
246 paus 1.48 { fDeltaEtaSuperClTrkAtVtx = x; }
247 loizides 1.27 void SetDeltaEtaSeedClusterTrackAtCalo(Double_t x)
248 paus 1.48 { fDeltaEtaSeedClTrkAtCalo = x; }
249 loizides 1.27 void SetDeltaPhiSuperClusterTrackAtVtx(Double_t x)
250 paus 1.48 { fDeltaPhiSuperClTrkAtVtx = x; }
251 loizides 1.27 void SetDeltaPhiSeedClusterTrackAtCalo(Double_t x)
252 paus 1.48 { fDeltaPhiSeedClTrkAtCalo = x; }
253     void SetE15(Double_t x) { fE15 = x; }
254     void SetE25Max(Double_t x) { fE25Max = x; }
255     void SetE55(Double_t x) { fE55 = x; }
256     void SetESeedClusterOverPout(Double_t x) { fESeedClusterOverPout = x; }
257 sixie 1.51 void SetEEleClusterOverPout(Double_t x) { fEEleClusterOverPout = x; }
258 paus 1.48 void SetESuperClusterOverP(Double_t x) { fESuperClusterOverP = x; }
259     void SetFBrem(Double_t x) { fFBrem = x; }
260     void SetFracSharedHits(Double_t x) { fFracSharedHits = x; }
261 loizides 1.29 void SetGsfTrk(const Track* t)
262 bendavid 1.31 { fGsfTrackRef = t; ClearCharge(); }
263 paus 1.48 void SetHadronicOverEm(Double_t x) { fHadronicOverEm = x; }
264     void SetHcalDepth1OverEcal(Double_t x) { fHcalDepth1OverEcal = x; }
265     void SetHcalDepth2OverEcal(Double_t x) { fHcalDepth2OverEcal = x; }
266     void SetIDLikelihood(Double_t x) { fIDLikelihood = x; }
267     void SetIsEnergyScaleCorrected(Bool_t x) { fIsEnergyScaleCorrected = x; }
268     void SetIsMomentumCorrected(Bool_t x) { fIsMomentumCorrected = x; }
269     void SetNumberOfClusters(Double_t x) { fNumberOfClusters = x; }
270     void SetPIn(Double_t pIn) { fPIn = pIn; }
271     void SetPOut(Double_t pOut) { fPOut = pOut; }
272     void SetPassLooseID(Double_t passLooseID) { fPassLooseID = passLooseID; }
273     void SetPassTightID(Double_t passTightID) { fPassTightID = passTightID; }
274 bendavid 1.31 void SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi);
275     void SetSuperCluster(const SuperCluster* sc)
276     { fSuperClusterRef = sc; }
277 paus 1.53 void SetPFSuperCluster(const SuperCluster* sc)
278     { fPFSuperClusterRef = sc; }
279 loizides 1.29 void SetTrackerTrk(const Track* t)
280 bendavid 1.31 { fTrackerTrackRef = t; ClearCharge(); }
281 bendavid 1.42 void SetConvPartnerTrk(const Track *t)
282     { fConvPartnerTrackRef = t; }
283 paus 1.48 void SetEcalRecHitIsoDr04(Double_t x) { fEcalJurassicIsolation = x; }
284 bendavid 1.33 void SetHcalDepth1TowerSumEtDr04(Double_t x) { fHcalDepth1TowerSumEtDr04 = x; }
285     void SetHcalDepth2TowerSumEtDr04(Double_t x) { fHcalDepth2TowerSumEtDr04 = x; }
286 paus 1.48 void SetTrackIsolationDr04(Double_t x) { fTrackIsolationDr04 = x; }
287     void SetEcalRecHitIsoDr03(Double_t x) { fEcalRecHitSumEtDr03 = x; }
288     void SetHcalTowerSumEtDr03(Double_t x) { fCaloTowerIsolation = x; }
289 bendavid 1.33 void SetHcalDepth1TowerSumEtDr03(Double_t x) { fHcalDepth1TowerSumEtDr03 = x; }
290     void SetHcalDepth2TowerSumEtDr03(Double_t x) { fHcalDepth2TowerSumEtDr03 = x; }
291 paus 1.48 void SetTrackIsolationDr03(Double_t x) { fTrackIsolation = x; }
292     void SetPFChargedHadronIso(Double_t x) { fPFChargedHadronIso = x; }
293     void SetPFNeutralHadronIso(Double_t x) { fPFNeutralHadronIso = x; }
294     void SetPFPhotonIso(Double_t x) { fPFPhotonIso = x; }
295     void SetMva(Double_t x) { fMva = x; }
296     void SetIsEB(Bool_t b) { fIsEB = b; }
297     void SetIsEE(Bool_t b) { fIsEE = b; }
298     void SetIsEBEEGap(Bool_t b) { fIsEBEEGap = b; }
299     void SetIsEBEtaGap(Bool_t b) { fIsEBEtaGap = b; }
300     void SetIsEBPhiGap(Bool_t b) { fIsEBPhiGap = b; }
301     void SetIsEEDeeGap(Bool_t b) { fIsEEDeeGap = b; }
302     void SetIsEERingGap(Bool_t b) { fIsEERingGap = b; }
303     void SetIsEcalDriven(Bool_t b) { fIsEcalDriven = b; }
304     void SetIsTrackerDriven(Bool_t b) { fIsTrackerDriven = b; }
305 bendavid 1.42 void SetMatchesVertexConversion(Bool_t b) { fMatchesVertexConversion = b; }
306     void SetConversionXYZ(Double_t x, Double_t y, Double_t z)
307     { fConvPosition.SetXYZ(x,y,z); }
308 sixie 1.51 void SetCTFTrkNLayersWithMeasurement(Int_t x){ fCTFTrkNLayersWithMeasurement = x; }
309 paus 1.55 <<<<<<< Electron.h
310     void SetHadOverEmTow(Double_t x) { fHadOverEmTow = x; }
311     void SetHCalIsoTowDr03(Double_t x) { fHCalIsoTowDr03 = x; }
312     void SetHCalIsoTowDr04(Double_t x) { fHCalIsoTowDr04 = x; }
313     void SetEcalEnergy(Double_t e) { fEcalEnergy = e; }
314     void SetEcalEnergyError(Double_t e) { fEcalEnergyError = e; }
315     =======
316 bendavid 1.52 void SetHadOverEmTow(Double_t x) { fHadOverEmTow = x; }
317     void SetHCalIsoTowDr03(Double_t x) { fHCalIsoTowDr03 = x; }
318     void SetHCalIsoTowDr04(Double_t x) { fHCalIsoTowDr04 = x; }
319 ceballos 1.54 void SetCorrectedEcalEnergy(Double_t e) { fCorrectedEcalEnergy= e; }
320     void SetCorrectedEcalEnergyError(Double_t e){ fCorrectedEcalEnergyError = e; }
321 paus 1.55 >>>>>>> 1.54
322 bendavid 1.33
323 paus 1.48 const Track *TrackerTrk() const { return fTrackerTrackRef.Obj(); }
324     const Track *Trk() const { return BestTrk(); }
325 bendavid 1.42 const Track *ConvPartnerTrk() const { return fConvPartnerTrackRef.Obj(); }
326 sixie 1.13
327 paus 1.49 // Some structural tools
328 paus 1.50 void Mark(UInt_t i=1) const;
329 paus 1.49
330 loizides 1.8 protected:
331 bendavid 1.37 Double_t GetCharge() const;
332 paus 1.48 Double_t GetMass() const { return 0.51099892e-3; }
333 loizides 1.27 void GetMom() const;
334 loizides 1.25
335 bendavid 1.31 Vect3C fMom; //stored three-momentum
336 bendavid 1.37 Char_t fCharge; //stored charge - filled with -99 when reading old files
337 bendavid 1.38 Char_t fScPixCharge; //charge from supercluster-pixel matching
338 loizides 1.27 Ref<Track> fGsfTrackRef; //gsf track reference
339     Ref<Track> fTrackerTrackRef; //tracker track reference
340 bendavid 1.42 Ref<Track> fConvPartnerTrackRef; //conversion partner track reference
341 loizides 1.27 Ref<SuperCluster> fSuperClusterRef; //reference to SuperCluster
342 loizides 1.29 Double32_t fESuperClusterOverP; //[0,0,14]super cluster e over p ratio
343     Double32_t fESeedClusterOverPout; //[0,0,14]seed cluster e over p mom
344     Double32_t fDeltaEtaSuperClTrkAtVtx; //[0,0,14]delta eta of super cluster with trk
345     Double32_t fDeltaEtaSeedClTrkAtCalo; //[0,0,14]delta eta of seeed cluster with trk
346     Double32_t fDeltaPhiSuperClTrkAtVtx; //[0,0,14]delta phi of super cluster with trk
347     Double32_t fDeltaPhiSeedClTrkAtCalo; //[0,0,14]delta phi of seeed cluster with trk
348 bendavid 1.33 Double32_t fFBrem; //[0,0,14]brem fraction
349     Double32_t fHadronicOverEm; //[0,0,14]hadronic over em fraction *DEPRECATED*
350     Double32_t fHcalDepth1OverEcal; //[0,0,14]hadronic over em fraction depth1
351     Double32_t fHcalDepth2OverEcal; //[0,0,14]hadronic over em fraction depth2
352 loizides 1.29 Double32_t fNumberOfClusters; //[0,0,14]number of associated clusters
353 bendavid 1.33 Double32_t fE15; //[0,0,14]1x5 crystal energy
354     Double32_t fE25Max; //[0,0,14]2x5 crystal energy (max of two possible sums)
355 loizides 1.29 Double32_t fE55; //[0,0,14]5x5 crystal energy
356     Double32_t fCovEtaEta; //[0,0,14]variance eta-eta
357     Double32_t fCoviEtaiEta; //[0,0,14]covariance eta-eta (in crystals)
358 bendavid 1.33 Double32_t fCaloIsolation; //[0,0,14](non-jura) ecal isolation based on rechits dR 0.3 *DEPRECATED*
359     Double32_t fHcalJurassicIsolation; //[0,0,14]hcal jura iso dR 0.4 *DEPRECATED*
360     Double32_t fHcalDepth1TowerSumEtDr04; //[0,0,14]hcal depth1 tower based isolation dR 0.4
361     Double32_t fHcalDepth2TowerSumEtDr04; //[0,0,14]hcal depth2 tower based isolation dR 0.4
362     Double32_t fEcalJurassicIsolation; //[0,0,14]ecal jura iso dR 0.4 *RENAMING*
363     Double32_t fTrackIsolationDr04; //[0,0,14]isolation based on tracks dR 0.4
364     Double32_t fCaloTowerIsolation; //[0,0,14]hcal tower based isolation dR 0.3 *DEPRECATED*
365     Double32_t fHcalDepth1TowerSumEtDr03; //[0,0,14]hcal depth1 tower based isolation dR 0.3
366     Double32_t fHcalDepth2TowerSumEtDr03; //[0,0,14]hcal depth2 tower based isolation dR 0.3
367     Double32_t fEcalRecHitSumEtDr03; //[0,0,14]ecal jura iso dR 0.3
368     Double32_t fTrackIsolation; //[0,0,14]isolation based on tracks dR 0.3 *RENAMING*
369 loizides 1.29 Double32_t fPassLooseID; //[0,0,14]pass loose id
370     Double32_t fPassTightID; //[0,0,14]pass tight id
371     Double32_t fIDLikelihood; //[0,0,14]likelihood value
372     Double32_t fPIn; //[0,0,14]momentum at vtx
373     Double32_t fPOut; //[0,0,14]momentum at ecal surface
374 bendavid 1.33 Double32_t fFracSharedHits; //[0,0,14]fraction of shared hits btw gsf and std. track
375     Double32_t fMva; //[0,0,14] pflow mva output
376 bendavid 1.44 Double32_t fD0PV; //[0,0,14]transverse impact parameter to signal PV (gsf track)
377     Double32_t fD0PVErr; //[0,0,14]transverse impact parameter uncertainty to signal PV (gsf track)
378     Double32_t fIp3dPV; //[0,0,14]3d impact parameter to signal PV (gsf track)
379     Double32_t fIp3dPVErr; //[0,0,14]3d impact parameter uncertainty to signal PV (gsf track)
380     Double32_t fD0PVBS; //[0,0,14]transverse impact parameter to signal PV w/ bs constraint (gsf track)
381     Double32_t fD0PVBSErr; //[0,0,14]transverse impact parameter uncertainty to signal PV w/ bs constraint (gsf track)
382     Double32_t fIp3dPVBS; //[0,0,14]3d impact parameter to signal PV w/ bs constraint (gsf track)
383     Double32_t fIp3dPVBSErr; //[0,0,14]3d impact parameter uncertainty to signal PV w/ bs constraint (gsf track)
384 paus 1.55 Double32_t fD0PVCkf; //[0,0,14]transverse impact parameter to signal PV (ckf track)
385     Double32_t fD0PVCkfErr; //[0,0,14]transverse impact parameter uncertainty to signal PV (ckf track)
386     Double32_t fIp3dPVCkf; //[0,0,14]3d impact parameter to signal PV (ckf track)
387     Double32_t fIp3dPVCkfErr; //[0,0,14]3d impact parameter uncertainty to signal PV (ckf track)
388     Double32_t fD0PVBSCkf; //[0,0,14]transverse impact parameter to signal PV w/ bs constraint (ckf track)
389     Double32_t fD0PVBSCkfErr; //[0,0,14]transverse impact parameter uncertainty to signal PV w/ bs constraint (ckf track)
390     Double32_t fIp3dPVBSCkf; //[0,0,14]3d impact parameter to signal PV w/ bs constraint (ckf track)
391     Double32_t fIp3dPVBSCkfErr; //[0,0,14]3d impact parameter uncertainty to signal PV w/ bs constraint (ckf track)
392     Double32_t fD0PVUB; //[0,0,14]transverse impact parameter to signal PVUB (gsf track)
393     Double32_t fD0PVUBErr; //[0,0,14]transverse impact parameter uncertainty to signal PVUB (gsf track)
394     Double32_t fIp3dPVUB; //[0,0,14]3d impact parameter to signal PVUB (gsf track)
395     Double32_t fIp3dPVUBErr; //[0,0,14]3d impact parameter uncertainty to signal PVUB (gsf track)
396     Double32_t fD0PVUBBS; //[0,0,14]transverse impact parameter to signal PVUB w/ bs constraint (gsf track)
397     Double32_t fD0PVUBBSErr; //[0,0,14]transverse impact parameter uncertainty to signal PVUB w/ bs constraint (gsf track)
398     Double32_t fIp3dPVUBBS; //[0,0,14]3d impact parameter to signal PVUB w/ bs constraint (gsf track)
399     Double32_t fIp3dPVUBBSErr; //[0,0,14]3d impact parameter uncertainty to signal PVUB w/ bs constraint (gsf track)
400     Double32_t fD0PVUBCkf; //[0,0,14]transverse impact parameter to signal PVUB (ckf track)
401     Double32_t fD0PVUBCkfErr; //[0,0,14]transverse impact parameter uncertainty to signal PVUB (ckf track)
402     Double32_t fIp3dPVUBCkf; //[0,0,14]3d impact parameter to signal PVUB (ckf track)
403     Double32_t fIp3dPVUBCkfErr; //[0,0,14]3d impact parameter uncertainty to signal PVUB (ckf track)
404     Double32_t fD0PVUBBSCkf; //[0,0,14]transverse impact parameter to signal PVUB w/ bs constraint (ckf track)
405     Double32_t fD0PVUBBSCkfErr; //[0,0,14]transverse impact parameter uncertainty to signal PVUB w/ bs constraint (ckf track)
406     Double32_t fIp3dPVUBBSCkf; //[0,0,14]3d impact parameter to signal PVUB w/ bs constraint (ckf track)
407     Double32_t fIp3dPVUBBSCkfErr; //[0,0,14]3d impact parameter uncertainty to signal PVUB w/ bs constraint (ckf track)
408 bendavid 1.41 Double32_t fGsfPVCompatibility; //[0,0,14]gsf compatibility with signal PV
409     Double32_t fGsfPVBSCompatibility; //[0,0,14]gsf compatibility with signal PV w/ bs constraint
410     Double32_t fGsfPVCompatibilityMatched; //[0,0,14]gsf compatibility with signal PV (matching ckf track excluded from vertex)
411     Double32_t fGsfPVBSCompatibilityMatched; //[0,0,14]gsf compatibility with signal PV w/ bs constraint (matching ckf track excluded from vertex)
412 bendavid 1.40 Double32_t fConvPartnerDCotTheta; //[0,0,14]delta cot theta to nearest conversion partner track
413     Double32_t fConvPartnerDist; //[0,0,14]distance in x-y plane to nearest conversion partner track
414     Double32_t fConvPartnerRadius; //[0,0,14]radius of helix intersection with conversion partner track
415 bendavid 1.46 Double32_t fPFChargedHadronIso; //[0,0,14]pf isolation, charged hadrons
416     Double32_t fPFNeutralHadronIso; //[0,0,14]pf isolation, neutral hadrons
417     Double32_t fPFPhotonIso; //[0,0,14]pf isolation, photons
418 bendavid 1.45 Int_t fConvFlag; //conversion flag indicating which track combination was used
419 bendavid 1.42 Vect3C fConvPosition;
420 loizides 1.29 Bool_t fIsEnergyScaleCorrected; //class dependent escale correction
421     Bool_t fIsMomentumCorrected; //class dependent E-p combination
422     Int_t fClassification; //classification (see GsfElectron.h)
423 bendavid 1.33 Bool_t fIsEB; //is ECAL barrel
424     Bool_t fIsEE; //is ECAL Endcap
425     Bool_t fIsEBEEGap; //is in barrel-endcap gap
426     Bool_t fIsEBEtaGap; //is in EB eta module gap
427     Bool_t fIsEBPhiGap; //is in EB phi module gap
428     Bool_t fIsEEDeeGap; //is in EE dee gap
429     Bool_t fIsEERingGap; //is in EE ring gap
430     Bool_t fIsEcalDriven; //is std. egamma electron
431     Bool_t fIsTrackerDriven; //is pflow track-seeded electron
432 bendavid 1.42 Bool_t fMatchesVertexConversion;
433 bendavid 1.43 RefArray<Track> fAmbiguousGsfTracks; //ambiguous gsf tracks for this electron
434 sixie 1.51 Double_t fEEleClusterOverPout; //energy of the electron cluster
435     Int_t fCTFTrkNLayersWithMeasurement; //number of tracker layers from associated ctf trk
436 paus 1.55 Double32_t fHadOverEmTow; //[0,0,14]per-tower definition of hadronic/em energy fraction
437     Double32_t fHCalIsoTowDr03; //[0,0,14]hcal isolation matched to per tower h/e definition
438     Double32_t fHCalIsoTowDr04; //[0,0,14]hcal isolation matched to per tower h/e definition
439     Double32_t fEcalEnergy; //[0,0,14]corrected Ecal energy
440     Double32_t fEcalEnergyError; //[0,0,14]corrected Ecal energy error
441     Ref<SuperCluster> fPFSuperClusterRef; //reference to Particle Flow SuperCluster
442 sixie 1.13
443 paus 1.55 ClassDef(Electron, 15) // Electron class
444 bendavid 1.1 };
445 loizides 1.4 }
446 loizides 1.8
447 loizides 1.9 //--------------------------------------------------------------------------------------------------
448 paus 1.50 inline void mithep::Electron::Mark(UInt_t ib) const
449 paus 1.49 {
450     // mark myself
451 paus 1.50 mithep::DataObject::Mark(ib);
452 paus 1.49 // mark my dependencies if they are there
453 paus 1.50 if (fSuperClusterRef.IsValid())
454     fSuperClusterRef.Obj()->Mark(ib);
455     if (fGsfTrackRef.IsValid())
456     fGsfTrackRef.Obj()->Mark(ib);
457     if (fTrackerTrackRef.IsValid())
458     fTrackerTrackRef.Obj()->Mark(ib);
459 paus 1.49 if (fConvPartnerTrackRef.IsValid())
460 paus 1.50 fConvPartnerTrackRef.Obj()->Mark(ib);
461     fAmbiguousGsfTracks.Mark(ib);
462 paus 1.49 }
463    
464     //--------------------------------------------------------------------------------------------------
465 loizides 1.10 inline const mithep::Track *mithep::Electron::BestTrk() const
466 loizides 1.9 {
467 loizides 1.10 // Return "best" track.
468    
469 bendavid 1.24 if (HasGsfTrk())
470 loizides 1.10 return GsfTrk();
471 bendavid 1.24 else if (HasTrackerTrk())
472 loizides 1.10 return TrackerTrk();
473 loizides 1.9
474 loizides 1.10 return 0;
475 loizides 1.9 }
476    
477 loizides 1.25 //--------------------------------------------------------------------------------------------------
478 bendavid 1.37 inline Double_t mithep::Electron::GetCharge() const
479     {
480     // Return stored charge, unless it is set to invalid (-99),
481     // in that case get charge from track as before
482    
483     if (fCharge==-99)
484     return mithep::ChargedParticle::GetCharge();
485     else
486     return fCharge;
487    
488     }
489    
490     //--------------------------------------------------------------------------------------------------
491 loizides 1.25 inline void mithep::Electron::GetMom() const
492 sixie 1.14 {
493 bendavid 1.31 // Get momentum of the electron. We use an explicitly stored three vector, with the pdg mass,
494     // since the momentum vector may be computed non-trivially in cmssw
495 sixie 1.14
496 bendavid 1.31 fCachedMom.SetCoordinates(fMom.Rho(),fMom.Eta(),fMom.Phi(),GetMass());
497 bendavid 1.18 }
498    
499     //-------------------------------------------------------------------------------------------------
500 loizides 1.25 inline Double_t mithep::Electron::ESeedClusterOverPIn() const
501 bendavid 1.18 {
502 loizides 1.25 // Return energy of the SuperCluster seed divided by the magnitude
503     // of the track momentum at the vertex.
504    
505     return SCluster()->Seed()->Energy() / PIn();
506 bendavid 1.18 }
507 bendavid 1.31
508     //-------------------------------------------------------------------------------------------------
509     inline void mithep::Electron::SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
510     {
511     // Set three-vector
512    
513     fMom.Set(pt,eta,phi);
514     ClearMom();
515     }
516 loizides 1.8 #endif