3 |
|
// |
4 |
|
// Electron |
5 |
|
// |
6 |
< |
// Details to be worked out... |
6 |
> |
// This class holds information about reconstructed electrons from CMSSW. |
7 |
|
// |
8 |
|
// Authors: C.Loizides, J.Bendavid, S.Xie |
9 |
|
//-------------------------------------------------------------------------------------------------- |
10 |
|
|
11 |
< |
#ifndef DATATREE_ELECTRON_H |
12 |
< |
#define DATATREE_ELECTRON_H |
11 |
> |
#ifndef MITANA_DATATREE_ELECTRON_H |
12 |
> |
#define MITANA_DATATREE_ELECTRON_H |
13 |
|
|
14 |
|
#include "MitAna/DataTree/interface/SuperCluster.h" |
15 |
|
#include "MitAna/DataTree/interface/ChargedParticle.h" |
16 |
+ |
#include "MitAna/DataCont/interface/Ref.h" |
17 |
|
|
18 |
|
namespace mithep |
19 |
|
{ |
20 |
|
class Electron : public ChargedParticle |
21 |
|
{ |
22 |
|
public: |
23 |
< |
Electron() {} |
24 |
< |
~Electron() {} |
25 |
< |
|
26 |
< |
const Track *BestTrk() const; |
27 |
< |
const Track *GsfTrk() const; |
28 |
< |
const Track *TrackerTrk() const; |
29 |
< |
const SuperCluster *SCluster() const; |
30 |
< |
FourVector Mom() const; |
31 |
< |
const Track *Trk() const { return BestTrk(); } |
32 |
< |
Double_t E() const; |
33 |
< |
Double_t P() const; |
34 |
< |
Double_t Pt() const; |
35 |
< |
Double_t Px() const; |
36 |
< |
Double_t Py() const; |
37 |
< |
Double_t Pz() const; |
38 |
< |
|
39 |
< |
Double_t Mass() const { return 0.51099892e-3; } |
40 |
< |
Double_t ESuperClusterOverP() const { return fESuperClusterOverP; } |
41 |
< |
Double_t ESeedClusterOverPout() const { return fESeedClusterOverPout; } |
42 |
< |
Double_t ESeedClusterOverPIn() const; |
43 |
< |
Double_t PIn() const { return fPIn; } |
44 |
< |
Double_t POut() const { return fPOut; } |
45 |
< |
Double_t DeltaEtaSuperClusterTrackAtVtx() const { return fDeltaEtaSuperClTrkAtVtx; } |
46 |
< |
Double_t DeltaEtaSeedClusterTrackAtCalo() const { return fDeltaEtaSeedClTrkAtCalo; } |
47 |
< |
Double_t DeltaPhiSuperClusterTrackAtVtx() const { return fDeltaPhiSuperClTrkAtVtx; } |
48 |
< |
Double_t DeltaPhiSeedClusterTrackAtCalo() const { return fDeltaPhiSeedClTrkAtCalo; } |
49 |
< |
Double_t HadronicOverEm() const { return fHadronicOverEm; } |
50 |
< |
Double_t IsEnergyScaleCorrected() const { return fIsEnergyScaleCorrected; } |
51 |
< |
Double_t IsMomentumCorrected() const { return fIsMomentumCorrected; } |
52 |
< |
Double_t NumberOfClusters() const { return fNumberOfClusters; } |
53 |
< |
Double_t Classification() const { return fClassification; } |
54 |
< |
Double_t E33() const { return fE33; } |
55 |
< |
Double_t E55() const { return fE55; } |
56 |
< |
Double_t CovEtaEta() const { return fCovEtaEta; } |
57 |
< |
Double_t CovEtaPhi() const { return fCovEtaPhi; } |
58 |
< |
Double_t CovPhiPhi() const { return fCovPhiPhi; } |
59 |
< |
Double_t CoviEtaiEta() const { return fCoviEtaiEta; } |
60 |
< |
Double_t CaloIsolation() const { return fCaloIsolation; } |
61 |
< |
Double_t CaloTowerIsolation() const { return fCaloTowerIsolation; } |
62 |
< |
Double_t TrackIsolation() const { return fTrackIsolation; } |
63 |
< |
Double_t EcalJurassicIsolation() const { return fEcalJurassicIsolation; } |
64 |
< |
Double_t HcalIsolation() const { return fHcalJurassicIsolation; } |
65 |
< |
Double_t PassLooseID() const { return fPassLooseID; } |
66 |
< |
Double_t PassTightID() const { return fPassTightID; } |
67 |
< |
Double_t IDLikelihood() const { return fIDLikelihood; } |
68 |
< |
|
69 |
< |
void SetGsfTrk(Track* t) { fGsfTrackRef = t; } |
70 |
< |
void SetTrackerTrk(Track* t) { fTrackerTrackRef = t; } |
71 |
< |
void SetSuperCluster(SuperCluster* sc) { fSuperClusterRef = sc; } |
72 |
< |
void SetESuperClusterOverP(Double_t x) { fESuperClusterOverP = x; } |
73 |
< |
void SetESeedClusterOverPout(Double_t x) { fESeedClusterOverPout = x; } |
74 |
< |
void SetPIn(Double_t PIn) { fPIn = PIn; } |
75 |
< |
void SetPOut(Double_t POut) { fPOut = POut; } |
76 |
< |
void SetDeltaEtaSuperClusterTrackAtVtx(Double_t x) { fDeltaEtaSuperClTrkAtVtx = x; } |
77 |
< |
void SetDeltaEtaSeedClusterTrackAtCalo(Double_t x) { fDeltaEtaSeedClTrkAtCalo = x; } |
78 |
< |
void SetDeltaPhiSuperClusterTrackAtVtx(Double_t x) { fDeltaPhiSuperClTrkAtVtx = x; } |
79 |
< |
void SetDeltaPhiSeedClusterTrackAtCalo(Double_t x) { fDeltaPhiSeedClTrkAtCalo = x; } |
80 |
< |
void SetHadronicOverEm(Double_t x) { fHadronicOverEm = x; } |
81 |
< |
void SetIsEnergyScaleCorrected(Double_t x) { fIsEnergyScaleCorrected = x; } |
82 |
< |
void SetIsMomentumCorrected(Double_t x) { fIsMomentumCorrected = x; } |
83 |
< |
void SetNumberOfClusters(Double_t x) { fNumberOfClusters = x; } |
84 |
< |
void SetClassification(Double_t x) { fClassification = x; } |
85 |
< |
void SetE33(Double_t E33) { fE33 = E33; } |
86 |
< |
void SetE55(Double_t E55) { fE55 = E55; } |
87 |
< |
void SetCovEtaEta(Double_t CovEtaEta) { fCovEtaEta = CovEtaEta; } |
88 |
< |
void SetCovEtaPhi(Double_t CovEtaPhi) { fCovEtaPhi = CovEtaPhi; } |
89 |
< |
void SetCovPhiPhi(Double_t CovPhiPhi) { fCovPhiPhi = CovPhiPhi; } |
90 |
< |
void SetCoviEtaiEta(Double_t CoviEtaiEta) { fCoviEtaiEta = CoviEtaiEta; } |
91 |
< |
void SetCaloIsolation(Double_t CaloIsolation) { fCaloIsolation = CaloIsolation; } |
92 |
< |
void SetCaloTowerIsolation(Double_t TowerIso) { fCaloTowerIsolation = TowerIso; } |
93 |
< |
void SetTrackIsolation(Double_t TrackIsolation) { fTrackIsolation = TrackIsolation;} |
94 |
< |
void SetEcalJurassicIsolation(Double_t iso ) { fEcalJurassicIsolation = iso; } |
95 |
< |
void SetHcalIsolation(Double_t iso ) { fHcalJurassicIsolation = iso; } |
96 |
< |
void SetPassLooseID(Double_t passLooseID) { fPassLooseID = passLooseID; } |
97 |
< |
void SetPassTightID(Double_t passTightID) { fPassTightID = passTightID; } |
98 |
< |
void SetIDLikelihood(Double_t likelihood) { fIDLikelihood = likelihood; } |
23 |
> |
Electron() : fESuperClusterOverP(0), fESeedClusterOverPout(0), fDeltaEtaSuperClTrkAtVtx(0), |
24 |
> |
fDeltaEtaSeedClTrkAtCalo(0), fDeltaPhiSuperClTrkAtVtx(0), |
25 |
> |
fDeltaPhiSeedClTrkAtCalo(0), fHadronicOverEm(0), fNumberOfClusters(0), fE33(0), |
26 |
> |
fE55(0), fCovEtaEta(0), fCoviEtaiEta(0), fCovEtaPhi(0), fCovPhiPhi(0), |
27 |
> |
fCaloIsolation(0), fCaloTowerIsolation(0), fTrackIsolation(0), |
28 |
> |
fEcalJurassicIsolation(0), fHcalJurassicIsolation(0), fPassLooseID(0), |
29 |
> |
fPassTightID(0), fIDLikelihood(0), fPIn(0), fPOut(0), |
30 |
> |
fIsEnergyScaleCorrected(0), fIsMomentumCorrected(0), fClassification(0) {} |
31 |
> |
|
32 |
> |
const Track *BestTrk() const; |
33 |
> |
Double_t CaloIsolation() const { return fCaloIsolation; } |
34 |
> |
Double_t CaloTowerIsolation() const { return fCaloTowerIsolation; } |
35 |
> |
Int_t Classification() const { return fClassification; } |
36 |
> |
Double_t CovEtaEta() const { return fCovEtaEta; } |
37 |
> |
Double_t CovEtaPhi() const { return fCovEtaPhi; } |
38 |
> |
Double_t CovPhiPhi() const { return fCovPhiPhi; } |
39 |
> |
Double_t CoviEtaiEta() const { return fCoviEtaiEta; } |
40 |
> |
Double_t DeltaEtaSuperClusterTrackAtVtx() const |
41 |
> |
{ return fDeltaEtaSuperClTrkAtVtx; } |
42 |
> |
Double_t DeltaEtaSeedClusterTrackAtCalo() const |
43 |
> |
{ return fDeltaEtaSeedClTrkAtCalo; } |
44 |
> |
Double_t DeltaPhiSuperClusterTrackAtVtx() const |
45 |
> |
{ return fDeltaPhiSuperClTrkAtVtx; } |
46 |
> |
Double_t DeltaPhiSeedClusterTrackAtCalo() const |
47 |
> |
{ return fDeltaPhiSeedClTrkAtCalo; } |
48 |
> |
Double_t E33() const { return fE33; } |
49 |
> |
Double_t E55() const { return fE55; } |
50 |
> |
Double_t EcalJurassicIsolation() const { return fEcalJurassicIsolation; } |
51 |
> |
Double_t ESuperClusterOverP() const { return fESuperClusterOverP; } |
52 |
> |
Double_t ESeedClusterOverPout() const { return fESeedClusterOverPout; } |
53 |
> |
Double_t ESeedClusterOverPIn() const; |
54 |
> |
const Track *GsfTrk() const { return fGsfTrackRef.Obj(); } |
55 |
> |
Double_t HadronicOverEm() const { return fHadronicOverEm; } |
56 |
> |
Bool_t HasGsfTrk() const { return fGsfTrackRef.IsValid(); } |
57 |
> |
Bool_t HasTrackerTrk() const { return fTrackerTrackRef.IsValid(); } |
58 |
> |
Bool_t HasSuperCluster() const { return fSuperClusterRef.IsValid(); } |
59 |
> |
Double_t HcalIsolation() const { return fHcalJurassicIsolation; } |
60 |
> |
Double_t IDLikelihood() const { return fIDLikelihood; } |
61 |
> |
Bool_t IsEnergyScaleCorrected() const { return fIsEnergyScaleCorrected; } |
62 |
> |
Bool_t IsMomentumCorrected() const { return fIsMomentumCorrected; } |
63 |
> |
Double_t NumberOfClusters() const { return fNumberOfClusters; } |
64 |
> |
EObjType ObjType() const { return kElectron; } |
65 |
> |
Double_t PassLooseID() const { return fPassLooseID; } |
66 |
> |
Double_t PassTightID() const { return fPassTightID; } |
67 |
> |
Double_t PIn() const { return fPIn; } |
68 |
> |
Double_t POut() const { return fPOut; } |
69 |
> |
const SuperCluster *SCluster() const { return fSuperClusterRef.Obj(); } |
70 |
> |
void SetCaloIsolation(Double_t caloiso) { fCaloIsolation = caloiso; } |
71 |
> |
void SetCaloTowerIsolation(Double_t tiso) { fCaloTowerIsolation = tiso; } |
72 |
> |
void SetClassification(Int_t x) { fClassification = x; } |
73 |
> |
void SetCovEtaEta(Double_t CovEtaEta) { fCovEtaEta = CovEtaEta; } |
74 |
> |
void SetCovEtaPhi(Double_t CovEtaPhi) { fCovEtaPhi = CovEtaPhi; } |
75 |
> |
void SetCovPhiPhi(Double_t CovPhiPhi) { fCovPhiPhi = CovPhiPhi; } |
76 |
> |
void SetCoviEtaiEta(Double_t CoviEtaiEta) { fCoviEtaiEta = CoviEtaiEta; } |
77 |
> |
void SetDeltaEtaSuperClusterTrackAtVtx(Double_t x) |
78 |
> |
{ fDeltaEtaSuperClTrkAtVtx = x; } |
79 |
> |
void SetDeltaEtaSeedClusterTrackAtCalo(Double_t x) |
80 |
> |
{ fDeltaEtaSeedClTrkAtCalo = x; } |
81 |
> |
void SetDeltaPhiSuperClusterTrackAtVtx(Double_t x) |
82 |
> |
{ fDeltaPhiSuperClTrkAtVtx = x; } |
83 |
> |
void SetDeltaPhiSeedClusterTrackAtCalo(Double_t x) |
84 |
> |
{ fDeltaPhiSeedClTrkAtCalo = x; } |
85 |
> |
void SetE33(Double_t E33) { fE33 = E33; } |
86 |
> |
void SetE55(Double_t E55) { fE55 = E55; } |
87 |
> |
void SetESeedClusterOverPout(Double_t x) { fESeedClusterOverPout = x; } |
88 |
> |
void SetESuperClusterOverP(Double_t x) { fESuperClusterOverP = x; } |
89 |
> |
void SetEcalJurassicIso(Double_t iso ) { fEcalJurassicIsolation = iso; } |
90 |
> |
void SetGsfTrk(const Track* t) |
91 |
> |
{ fGsfTrackRef = t; ClearCharge(); } |
92 |
> |
void SetHadronicOverEm(Double_t x) { fHadronicOverEm = x; } |
93 |
> |
void SetHcalIsolation(Double_t iso ) { fHcalJurassicIsolation = iso; } |
94 |
> |
void SetIDLikelihood(Double_t likelihood) { fIDLikelihood = likelihood; } |
95 |
> |
void SetIsEnergyScaleCorrected(Bool_t x) { fIsEnergyScaleCorrected = x; } |
96 |
> |
void SetIsMomentumCorrected(Bool_t x) { fIsMomentumCorrected = x; } |
97 |
> |
void SetNumberOfClusters(Double_t x) { fNumberOfClusters = x; } |
98 |
> |
void SetPIn(Double_t PIn) { fPIn = PIn; } |
99 |
> |
void SetPOut(Double_t POut) { fPOut = POut; } |
100 |
> |
void SetPassLooseID(Double_t passLooseID) { fPassLooseID = passLooseID; } |
101 |
> |
void SetPassTightID(Double_t passTightID) { fPassTightID = passTightID; } |
102 |
> |
void SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi); |
103 |
> |
void SetSuperCluster(const SuperCluster* sc) |
104 |
> |
{ fSuperClusterRef = sc; } |
105 |
> |
void SetTrackerTrk(const Track* t) |
106 |
> |
{ fTrackerTrackRef = t; ClearCharge(); } |
107 |
> |
void SetTrackIsolation(Double_t trkiso) { fTrackIsolation = trkiso; } |
108 |
> |
const Track *TrackerTrk() const { return fTrackerTrackRef.Obj(); } |
109 |
> |
Double_t TrackIsolation() const { return fTrackIsolation; } |
110 |
> |
const Track *Trk() const { return BestTrk(); } |
111 |
|
|
112 |
|
protected: |
113 |
< |
TRef fGsfTrackRef; //global combined track reference |
114 |
< |
TRef fTrackerTrackRef; //tracker track reference |
115 |
< |
TRef fSuperClusterRef; //superCluster |
116 |
< |
|
117 |
< |
Double_t fESuperClusterOverP; |
118 |
< |
Double_t fESeedClusterOverPout; |
119 |
< |
Double_t fDeltaEtaSuperClTrkAtVtx; |
120 |
< |
Double_t fDeltaEtaSeedClTrkAtCalo; |
121 |
< |
Double_t fDeltaPhiSuperClTrkAtVtx; |
122 |
< |
Double_t fDeltaPhiSeedClTrkAtCalo; |
123 |
< |
Double_t fHadronicOverEm; |
124 |
< |
Double_t fIsEnergyScaleCorrected; |
125 |
< |
Double_t fIsMomentumCorrected; |
126 |
< |
Double_t fNumberOfClusters; |
127 |
< |
Double_t fClassification; |
128 |
< |
Double_t fE33; |
129 |
< |
Double_t fE55; |
130 |
< |
Double_t fCovEtaEta; |
131 |
< |
Double_t fCoviEtaiEta; |
132 |
< |
Double_t fCovEtaPhi; |
133 |
< |
Double_t fCovPhiPhi; |
134 |
< |
Double_t fCaloIsolation; |
135 |
< |
Double_t fCaloTowerIsolation; |
136 |
< |
Double_t fTrackIsolation; |
137 |
< |
Double_t fEcalJurassicIsolation; |
138 |
< |
Double_t fHcalJurassicIsolation; |
139 |
< |
Double_t fPassLooseID; |
140 |
< |
Double_t fPassTightID; |
141 |
< |
Double_t fIDLikelihood; |
142 |
< |
Double_t fPIn; |
143 |
< |
Double_t fPOut; |
113 |
> |
Double_t GetMass() const { return 0.51099892e-3; } |
114 |
> |
void GetMom() const; |
115 |
> |
|
116 |
> |
Vect3C fMom; //stored three-momentum |
117 |
> |
Ref<Track> fGsfTrackRef; //gsf track reference |
118 |
> |
Ref<Track> fTrackerTrackRef; //tracker track reference |
119 |
> |
Ref<SuperCluster> fSuperClusterRef; //reference to SuperCluster |
120 |
> |
Double32_t fESuperClusterOverP; //[0,0,14]super cluster e over p ratio |
121 |
> |
Double32_t fESeedClusterOverPout; //[0,0,14]seed cluster e over p mom |
122 |
> |
Double32_t fDeltaEtaSuperClTrkAtVtx; //[0,0,14]delta eta of super cluster with trk |
123 |
> |
Double32_t fDeltaEtaSeedClTrkAtCalo; //[0,0,14]delta eta of seeed cluster with trk |
124 |
> |
Double32_t fDeltaPhiSuperClTrkAtVtx; //[0,0,14]delta phi of super cluster with trk |
125 |
> |
Double32_t fDeltaPhiSeedClTrkAtCalo; //[0,0,14]delta phi of seeed cluster with trk |
126 |
> |
Double32_t fHadronicOverEm; //[0,0,14]hadronic over em fraction |
127 |
> |
Double32_t fNumberOfClusters; //[0,0,14]number of associated clusters |
128 |
> |
Double32_t fE33; //[0,0,14]3x3 crystal energy |
129 |
> |
Double32_t fE55; //[0,0,14]5x5 crystal energy |
130 |
> |
Double32_t fCovEtaEta; //[0,0,14]variance eta-eta |
131 |
> |
Double32_t fCoviEtaiEta; //[0,0,14]covariance eta-eta (in crystals) |
132 |
> |
Double32_t fCovEtaPhi; //[0,0,14]covariance eta-phi |
133 |
> |
Double32_t fCovPhiPhi; //[0,0,14]covariance phi-phi |
134 |
> |
Double32_t fCaloIsolation; //[0,0,14]isolation based on rechits |
135 |
> |
Double32_t fCaloTowerIsolation; //[0,0,14]isolation based on calo towers |
136 |
> |
Double32_t fTrackIsolation; //[0,0,14]isolation based on tracks |
137 |
> |
Double32_t fEcalJurassicIsolation; //[0,0,14]ecal jura iso |
138 |
> |
Double32_t fHcalJurassicIsolation; //[0,0,14]hcal jura iso |
139 |
> |
Double32_t fPassLooseID; //[0,0,14]pass loose id |
140 |
> |
Double32_t fPassTightID; //[0,0,14]pass tight id |
141 |
> |
Double32_t fIDLikelihood; //[0,0,14]likelihood value |
142 |
> |
Double32_t fPIn; //[0,0,14]momentum at vtx |
143 |
> |
Double32_t fPOut; //[0,0,14]momentum at ecal surface |
144 |
> |
Bool_t fIsEnergyScaleCorrected; //class dependent escale correction |
145 |
> |
Bool_t fIsMomentumCorrected; //class dependent E-p combination |
146 |
> |
Int_t fClassification; //classification (see GsfElectron.h) |
147 |
|
|
148 |
|
ClassDef(Electron, 1) // Electron class |
149 |
|
}; |
154 |
|
{ |
155 |
|
// Return "best" track. |
156 |
|
|
157 |
< |
if (GsfTrk()) |
157 |
> |
if (HasGsfTrk()) |
158 |
|
return GsfTrk(); |
159 |
< |
else if (TrackerTrk()) |
159 |
> |
else if (HasTrackerTrk()) |
160 |
|
return TrackerTrk(); |
161 |
|
|
162 |
|
return 0; |
163 |
|
} |
164 |
|
|
165 |
|
//-------------------------------------------------------------------------------------------------- |
166 |
< |
inline const mithep::Track *mithep::Electron::GsfTrk() const |
151 |
< |
{ |
152 |
< |
// Return global combined track. |
153 |
< |
|
154 |
< |
return static_cast<const Track*>(fGsfTrackRef.GetObject()); |
155 |
< |
} |
156 |
< |
|
157 |
< |
//-------------------------------------------------------------------------------------------------- |
158 |
< |
inline const mithep::Track *mithep::Electron::TrackerTrk() const |
159 |
< |
{ |
160 |
< |
// Return tracker track. |
161 |
< |
|
162 |
< |
return static_cast<const Track*>(fTrackerTrackRef.GetObject()); |
163 |
< |
} |
164 |
< |
//-------------------------------------------------------------------------------------------------- |
165 |
< |
inline const mithep::SuperCluster *mithep::Electron::SCluster() const |
166 |
> |
inline void mithep::Electron::GetMom() const |
167 |
|
{ |
168 |
< |
// Return Super cluster |
168 |
> |
// Get momentum of the electron. We use an explicitly stored three vector, with the pdg mass, |
169 |
> |
// since the momentum vector may be computed non-trivially in cmssw |
170 |
|
|
171 |
< |
return static_cast<const SuperCluster*>(fSuperClusterRef.GetObject()); |
170 |
< |
} |
171 |
< |
|
172 |
< |
//------------------------------------------------------------------------------------------------- |
173 |
< |
inline mithep::FourVector mithep::Electron::Mom() const |
174 |
< |
{ |
175 |
< |
// Return Momentum of the electron. We use the direction of the |
176 |
< |
// Track and the Energy of the Super Cluster |
177 |
< |
|
178 |
< |
return FourVector(Px(), Py(), Pz(), E()); |
171 |
> |
fCachedMom.SetCoordinates(fMom.Rho(),fMom.Eta(),fMom.Phi(),GetMass()); |
172 |
|
} |
173 |
|
|
174 |
|
//------------------------------------------------------------------------------------------------- |
175 |
|
inline Double_t mithep::Electron::ESeedClusterOverPIn() const |
176 |
|
{ |
177 |
< |
// Return Energy of the SuperCluster Seed Divided by the magnitude |
178 |
< |
// of the track momentum at the vertex |
177 |
> |
// Return energy of the SuperCluster seed divided by the magnitude |
178 |
> |
// of the track momentum at the vertex. |
179 |
|
|
180 |
|
return SCluster()->Seed()->Energy() / PIn(); |
181 |
|
} |
182 |
|
|
183 |
|
//------------------------------------------------------------------------------------------------- |
184 |
< |
inline Double_t mithep::Electron::E() const |
192 |
< |
{ |
193 |
< |
// Return Energy of the SuperCluster if present |
194 |
< |
// or else return energy derived from the track |
195 |
< |
|
196 |
< |
const mithep::SuperCluster *sc = SCluster(); |
197 |
< |
if (sc) |
198 |
< |
return sc->Energy(); |
199 |
< |
else |
200 |
< |
return TMath::Sqrt(Trk()->P()*Trk()->P() + Mass()*Mass()); |
201 |
< |
} |
202 |
< |
|
203 |
< |
//------------------------------------------------------------------------------------------------- |
204 |
< |
inline Double_t mithep::Electron::P() const |
184 |
> |
inline void mithep::Electron::SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi) |
185 |
|
{ |
186 |
< |
// Return momentum derived from the SuperCluster if present |
207 |
< |
// or else return momentum from the track |
186 |
> |
// Set three-vector |
187 |
|
|
188 |
< |
const mithep::SuperCluster *sc = SCluster(); |
189 |
< |
if (sc) |
211 |
< |
return TMath::Sqrt(sc->Energy()*sc->Energy() - Mass()*Mass()); |
212 |
< |
else |
213 |
< |
return Trk()->P(); |
214 |
< |
} |
215 |
< |
|
216 |
< |
//------------------------------------------------------------------------------------------------- |
217 |
< |
inline Double_t mithep::Electron::Px() const |
218 |
< |
{ |
219 |
< |
return Pt()*TMath::Cos(Trk()->Phi()); |
220 |
< |
} |
221 |
< |
|
222 |
< |
//------------------------------------------------------------------------------------------------- |
223 |
< |
inline Double_t mithep::Electron::Py() const |
224 |
< |
{ |
225 |
< |
return Pt()*TMath::Sin(Trk()->Phi()); |
226 |
< |
} |
227 |
< |
|
228 |
< |
//------------------------------------------------------------------------------------------------- |
229 |
< |
inline Double_t mithep::Electron::Pz() const |
230 |
< |
{ |
231 |
< |
return P()*TMath::Sin(Trk()->Lambda()); |
232 |
< |
} |
233 |
< |
|
234 |
< |
//------------------------------------------------------------------------------------------------- |
235 |
< |
inline Double_t mithep::Electron::Pt() const |
236 |
< |
{ |
237 |
< |
return TMath::Abs(P()*TMath::Cos(Trk()->Lambda())); |
188 |
> |
fMom.Set(pt,eta,phi); |
189 |
> |
ClearMom(); |
190 |
|
} |
191 |
|
#endif |