5 |
|
// |
6 |
|
// Details to be worked out... |
7 |
|
// |
8 |
< |
// Authors: C.Loizides, J. Bendavid |
9 |
< |
// |
8 |
> |
// Authors: C.Loizides, J.Bendavid, S.Xie |
9 |
|
//-------------------------------------------------------------------------------------------------- |
10 |
|
|
11 |
|
#ifndef DATATREE_ELECTRON_H |
12 |
|
#define DATATREE_ELECTRON_H |
13 |
|
|
14 |
< |
#include "MitAna/DataTree/interface/Lepton.h" |
14 |
> |
#include "MitAna/DataTree/interface/SuperCluster.h" |
15 |
> |
#include "MitAna/DataTree/interface/ChargedParticle.h" |
16 |
|
|
17 |
|
namespace mithep |
18 |
|
{ |
19 |
< |
class Electron : public Lepton |
19 |
> |
class Electron : public ChargedParticle |
20 |
|
{ |
21 |
|
public: |
22 |
|
Electron() {} |
23 |
– |
Electron(Double_t px, Double_t py, Double_t pz, Double_t e) : Lepton(px,py,pz,e) {} |
23 |
|
~Electron() {} |
24 |
|
|
25 |
< |
ClassDef(Electron, 1) // Electron class |
25 |
> |
const Track *BestTrk() const; |
26 |
> |
const Track *GsfTrk() const; |
27 |
> |
const Track *TrackerTrk() const; |
28 |
> |
const SuperCluster *SCluster() const; |
29 |
> |
FourVector Mom() const; |
30 |
> |
const Track *Trk() const { return BestTrk(); } |
31 |
> |
Double_t E() const {return SCluster()->Energy(); } |
32 |
> |
|
33 |
> |
|
34 |
> |
Double_t Mass() const { return 0.51099892e-3; } |
35 |
> |
Double_t ESuperClusterOverP() const { return fESuperClusterOverP; } |
36 |
> |
Double_t ESeedClusterOverPout() const { return fESeedClusterOverPout; } |
37 |
> |
Double_t DeltaEtaSuperClusterTrackAtVtx() const { return fDeltaEtaSuperClTrkAtVtx; } |
38 |
> |
Double_t DeltaEtaSeedClusterTrackAtCalo() const { return fDeltaEtaSeedClTrkAtCalo; } |
39 |
> |
Double_t DeltaPhiSuperClusterTrackAtVtx() const { return fDeltaPhiSuperClTrkAtVtx; } |
40 |
> |
Double_t DeltaPhiSeedClusterTrackAtCalo() const { return fDeltaPhiSeedClTrkAtCalo; } |
41 |
> |
Double_t HadronicOverEm() const { return fHadronicOverEm; } |
42 |
> |
Double_t IsEnergyScaleCorrected() const { return fIsEnergyScaleCorrected; } |
43 |
> |
Double_t IsMomentumCorrected() const { return fIsMomentumCorrected; } |
44 |
> |
Double_t NumberOfClusters() const { return fNumberOfClusters; } |
45 |
> |
Double_t Classification() const { return fClassification; } |
46 |
> |
Double_t E33() const { return fE33; } |
47 |
> |
Double_t E55() const { return fE55; } |
48 |
> |
Double_t CovEtaEta() const { return fCovEtaEta; } |
49 |
> |
Double_t CovEtaPhi() const { return fCovEtaPhi; } |
50 |
> |
Double_t CovPhiPhi() const { return fCovPhiPhi; } |
51 |
> |
Double_t CaloIsolation() const { return fCaloIsolation; } |
52 |
> |
Double_t TrackIsolation() const { return fTrackIsolation; } |
53 |
> |
|
54 |
> |
Double_t ComputeTrackIsolation ( Double_t extRadius, Double_t intRadius, |
55 |
> |
Double_t ptLow, Double_t maxVtxZDist, |
56 |
> |
mithep::Collection<Track> *tracks ); |
57 |
> |
Double_t ComputeEcalIsolation ( Double_t coneSize, Double_t etLow, |
58 |
> |
mithep::Collection<BasicCluster> *basicClusters); |
59 |
> |
|
60 |
> |
void SetGsfTrk(Track* t) { fGsfTrackRef = t; } |
61 |
> |
void SetTrackerTrk(Track* t) { fTrackerTrackRef = t; } |
62 |
> |
void SetSuperCluster(SuperCluster* sc) { fSuperClusterRef = sc; } |
63 |
> |
void SetESuperClusterOverP(Double_t x) { fESuperClusterOverP = x; } |
64 |
> |
void SetESeedClusterOverPout(Double_t x) { fESeedClusterOverPout = x; } |
65 |
> |
void SetDeltaEtaSuperClusterTrackAtVtx(Double_t x) { fDeltaEtaSuperClTrkAtVtx = x; } |
66 |
> |
void SetDeltaEtaSeedClusterTrackAtCalo(Double_t x) { fDeltaEtaSeedClTrkAtCalo = x; } |
67 |
> |
void SetDeltaPhiSuperClusterTrackAtVtx(Double_t x) { fDeltaPhiSuperClTrkAtVtx = x; } |
68 |
> |
void SetDeltaPhiSeedClusterTrackAtCalo(Double_t x) { fDeltaPhiSeedClTrkAtCalo = x; } |
69 |
> |
void SetHadronicOverEm(Double_t x) { fHadronicOverEm = x; } |
70 |
> |
void SetIsEnergyScaleCorrected(Double_t x) { fIsEnergyScaleCorrected = x; } |
71 |
> |
void SetIsMomentumCorrected(Double_t x) { fIsMomentumCorrected = x; } |
72 |
> |
void SetNumberOfClusters(Double_t x) { fNumberOfClusters = x; } |
73 |
> |
void SetClassification(Double_t x) { fClassification = x; } |
74 |
> |
void SetE33(Double_t E33) { fE33 = E33; } |
75 |
> |
void SetE55(Double_t E55) { fE55 = E55; } |
76 |
> |
void SetCovEtaEta(Double_t CovEtaEta) { fCovEtaEta = CovEtaEta; } |
77 |
> |
void SetCovEtaPhi(Double_t CovEtaPhi) { fCovEtaPhi = CovEtaPhi; } |
78 |
> |
void SetCovPhiPhi(Double_t CovPhiPhi) { fCovPhiPhi = CovPhiPhi; } |
79 |
> |
void SetCaloIsolation(Double_t CaloIsolation) { fCaloIsolation = CaloIsolation; } |
80 |
> |
void SetTrackIsolation(Double_t TrackIsolation) { fTrackIsolation = TrackIsolation;} |
81 |
> |
|
82 |
> |
protected: |
83 |
> |
TRef fGsfTrackRef; //global combined track reference |
84 |
> |
TRef fTrackerTrackRef; //tracker track reference |
85 |
> |
TRef fSuperClusterRef; //superCluster |
86 |
> |
|
87 |
> |
Double_t fESuperClusterOverP; |
88 |
> |
Double_t fESeedClusterOverPout; |
89 |
> |
Double_t fDeltaEtaSuperClTrkAtVtx; |
90 |
> |
Double_t fDeltaEtaSeedClTrkAtCalo; |
91 |
> |
Double_t fDeltaPhiSuperClTrkAtVtx; |
92 |
> |
Double_t fDeltaPhiSeedClTrkAtCalo; |
93 |
> |
Double_t fHadronicOverEm; |
94 |
> |
Double_t fIsEnergyScaleCorrected; |
95 |
> |
Double_t fIsMomentumCorrected; |
96 |
> |
Double_t fNumberOfClusters; |
97 |
> |
Double_t fClassification; |
98 |
> |
Double_t fSuperClusterPx; |
99 |
> |
Double_t fSuperClusterPy; |
100 |
> |
Double_t fSuperClusterPz; |
101 |
> |
Double_t fSuperClusterE; |
102 |
> |
Double_t fE33; |
103 |
> |
Double_t fE55; |
104 |
> |
Double_t fCovEtaEta; |
105 |
> |
Double_t fCovEtaPhi; |
106 |
> |
Double_t fCovPhiPhi; |
107 |
> |
Double_t fCaloIsolation; |
108 |
> |
Double_t fTrackIsolation; |
109 |
> |
|
110 |
> |
ClassDef(Electron, 1) // Electron class |
111 |
|
}; |
112 |
|
} |
113 |
+ |
|
114 |
+ |
//-------------------------------------------------------------------------------------------------- |
115 |
+ |
inline const mithep::Track *mithep::Electron::BestTrk() const |
116 |
+ |
{ |
117 |
+ |
// Return "best" track. |
118 |
+ |
|
119 |
+ |
if (GsfTrk()) |
120 |
+ |
return GsfTrk(); |
121 |
+ |
else if (TrackerTrk()) |
122 |
+ |
return TrackerTrk(); |
123 |
+ |
|
124 |
+ |
return 0; |
125 |
+ |
} |
126 |
+ |
|
127 |
+ |
//-------------------------------------------------------------------------------------------------- |
128 |
+ |
inline const mithep::Track *mithep::Electron::GsfTrk() const |
129 |
+ |
{ |
130 |
+ |
// Return global combined track. |
131 |
+ |
|
132 |
+ |
return static_cast<const Track*>(fGsfTrackRef.GetObject()); |
133 |
+ |
} |
134 |
+ |
|
135 |
+ |
//-------------------------------------------------------------------------------------------------- |
136 |
+ |
inline const mithep::Track *mithep::Electron::TrackerTrk() const |
137 |
+ |
{ |
138 |
+ |
// Return tracker track. |
139 |
+ |
|
140 |
+ |
return static_cast<const Track*>(fTrackerTrackRef.GetObject()); |
141 |
+ |
} |
142 |
+ |
//-------------------------------------------------------------------------------------------------- |
143 |
+ |
inline const mithep::SuperCluster *mithep::Electron::SCluster() const |
144 |
+ |
{ |
145 |
+ |
// Return Super cluster |
146 |
+ |
|
147 |
+ |
return static_cast<const SuperCluster*>(fSuperClusterRef.GetObject()); |
148 |
+ |
} |
149 |
+ |
|
150 |
+ |
//------------------------------------------------------------------------------------------------- |
151 |
+ |
inline mithep::FourVector mithep::Electron::Mom() const |
152 |
+ |
{ |
153 |
+ |
// Return Momentum of the electron. We use the direction of the |
154 |
+ |
// Track and the Energy of the Super Cluster |
155 |
+ |
|
156 |
+ |
double P = TMath::Sqrt( E()*E() - Mass()*Mass()); |
157 |
+ |
return FourVector(P*sin(Trk()->Theta())*cos(Trk()->Phi()), |
158 |
+ |
P*sin(Trk()->Theta())*sin(Trk()->Phi()), P*cos(Trk()->Theta()), E()); |
159 |
+ |
} |
160 |
|
#endif |