1 |
loizides |
1.1 |
//--------------------------------------------------------------------------------------------------
|
2 |
bendavid |
1.34 |
// $Id: Photon.h,v 1.33 2010/09/19 23:46:27 bendavid Exp $
|
3 |
loizides |
1.1 |
//
|
4 |
|
|
// Photon
|
5 |
|
|
//
|
6 |
loizides |
1.24 |
// This class holds the reconstructed photon quantities.
|
7 |
loizides |
1.1 |
//
|
8 |
loizides |
1.2 |
// Authors: J.Bendavid, C.Loizides
|
9 |
loizides |
1.1 |
//--------------------------------------------------------------------------------------------------
|
10 |
|
|
|
11 |
loizides |
1.12 |
#ifndef MITANA_DATATREE_PHOTON_H
|
12 |
|
|
#define MITANA_DATATREE_PHOTON_H
|
13 |
loizides |
1.1 |
|
14 |
loizides |
1.24 |
#include "MitCommon/DataFormats/interface/Vect4M.h"
|
15 |
bendavid |
1.3 |
#include "MitAna/DataTree/interface/Particle.h"
|
16 |
|
|
#include "MitAna/DataTree/interface/Conversion.h"
|
17 |
loizides |
1.11 |
#include "MitAna/DataCont/interface/RefArray.h"
|
18 |
loizides |
1.1 |
|
19 |
|
|
namespace mithep
|
20 |
|
|
{
|
21 |
bendavid |
1.3 |
class Photon : public Particle
|
22 |
loizides |
1.1 |
{
|
23 |
|
|
public:
|
24 |
loizides |
1.29 |
Photon() :
|
25 |
bendavid |
1.33 |
fR9(0),fHadOverEm(0),fHcalDepth1OverEcal(0),
|
26 |
|
|
fHcalDepth2OverEcal(0), fMaxEnergyXtal(0), fE15(0), fE25(0), fE33(0),
|
27 |
|
|
fE55(0), fCovEtaEta(0), fCoviEtaiEta(0),
|
28 |
|
|
fEcalRecHitIso(0),fHcalRecHitIso(0), fHcalTowerSumEtDr04(0),
|
29 |
loizides |
1.29 |
fHcalDepth1TowerSumEtDr04(0), fHcalDepth2TowerSumEtDr04(0), fSolidConeTrkIso(0),
|
30 |
|
|
fHollowConeTrkIso(0),fSolidConeNTrk(0),fHollowConeNTrk(0), fEcalRecHitIsoDr03(0),
|
31 |
|
|
fHcalTowerSumEtDr03(0), fHcalDepth1TowerSumEtDr03(0), fHcalDepth2TowerSumEtDr03(0),
|
32 |
|
|
fSolidConeTrkIsoDr03(0), fHollowConeTrkIsoDr03(0),fSolidConeNTrkDr03(0),
|
33 |
|
|
fHollowConeNTrkDr03(0), fHasPixelSeed(0), fIsEB(0), fIsEE(0), fIsEBGap(0),
|
34 |
|
|
fIsEEGap(0),fIsEBEEGap(0), fIsLooseEM(0),fIsLoosePhoton(0), fIsTightPhoton(0),
|
35 |
|
|
fIsConverted(0) {}
|
36 |
loizides |
1.21 |
Photon(Double_t px, Double_t py, Double_t pz, Double_t e) :
|
37 |
loizides |
1.24 |
fMom(FourVector(px,py,pz,e)),
|
38 |
bendavid |
1.33 |
fR9(0),fHadOverEm(0),fHcalDepth1OverEcal(0),
|
39 |
|
|
fHcalDepth2OverEcal(0), fMaxEnergyXtal(0), fE15(0), fE25(0), fE33(0),
|
40 |
|
|
fE55(0), fCovEtaEta(0), fCoviEtaiEta(0),
|
41 |
|
|
fEcalRecHitIso(0),fHcalRecHitIso(0), fHcalTowerSumEtDr04(0),
|
42 |
bendavid |
1.25 |
fHcalDepth1TowerSumEtDr04(0), fHcalDepth2TowerSumEtDr04(0), fSolidConeTrkIso(0),
|
43 |
|
|
fHollowConeTrkIso(0),fSolidConeNTrk(0),fHollowConeNTrk(0), fEcalRecHitIsoDr03(0),
|
44 |
|
|
fHcalTowerSumEtDr03(0), fHcalDepth1TowerSumEtDr03(0), fHcalDepth2TowerSumEtDr03(0),
|
45 |
|
|
fSolidConeTrkIsoDr03(0), fHollowConeTrkIsoDr03(0),fSolidConeNTrkDr03(0),
|
46 |
bendavid |
1.26 |
fHollowConeNTrkDr03(0), fHasPixelSeed(0), fIsEB(0), fIsEE(0), fIsEBGap(0),
|
47 |
|
|
fIsEEGap(0),fIsEBEEGap(0), fIsLooseEM(0),fIsLoosePhoton(0), fIsTightPhoton(0),
|
48 |
|
|
fIsConverted(0) {}
|
49 |
loizides |
1.2 |
|
50 |
loizides |
1.29 |
const Conversion *ConvCand(UInt_t i) const { return fConversions.At(i); }
|
51 |
|
|
Double_t EcalRecHitIsoDr03() const { return fEcalRecHitIsoDr03; }
|
52 |
|
|
Double_t EcalRecHitIsoDr04() const { return fEcalRecHitIso; }
|
53 |
|
|
Double_t HadOverEm() const { return fHadOverEm; }
|
54 |
bendavid |
1.33 |
Double_t HcalDepth1OverEcal() const { return fHcalDepth1OverEcal; }
|
55 |
|
|
Double_t HcalDepth2OverEcal() const { return fHcalDepth2OverEcal; }
|
56 |
|
|
Double_t MaxEnergyXtal() const { return fMaxEnergyXtal; }
|
57 |
|
|
Double_t E15() const { return fE15; }
|
58 |
|
|
Double_t E25() const { return fE25; }
|
59 |
|
|
Double_t E33() const { return fE33; }
|
60 |
|
|
Double_t E55() const { return fE55; }
|
61 |
bendavid |
1.34 |
ThreeVectorC CaloPos() const { return fCaloPos.V(); }
|
62 |
bendavid |
1.33 |
Double_t CovEtaEta() const { return fCovEtaEta; }
|
63 |
|
|
Double_t CoviEtaiEta() const { return fCoviEtaiEta; }
|
64 |
loizides |
1.29 |
Bool_t HasPixelSeed() const { return fHasPixelSeed; }
|
65 |
|
|
Double_t HcalDepth1TowerSumEtDr03() const { return fHcalDepth1TowerSumEtDr03; }
|
66 |
|
|
Double_t HcalDepth1TowerSumEtDr04() const { return fHcalDepth1TowerSumEtDr04; }
|
67 |
|
|
Double_t HcalDepth2TowerSumEtDr03() const { return fHcalDepth2TowerSumEtDr03; }
|
68 |
bendavid |
1.32 |
Double_t HcalDepth2TowerSumEtDr04() const { return fHcalDepth2TowerSumEtDr04; }
|
69 |
ceballos |
1.31 |
Double_t HcalRecHitIso() const { return fHcalRecHitIso; } // *DEPRECATED*
|
70 |
loizides |
1.29 |
Double_t HcalTowerSumEtDr03() const { return fHcalTowerSumEtDr03; }
|
71 |
bendavid |
1.32 |
Double_t HcalTowerSumEtDr04() const { return fHcalTowerSumEtDr04; }
|
72 |
loizides |
1.29 |
UShort_t HollowConeNTrkDr03() const { return fHollowConeNTrkDr03; }
|
73 |
|
|
UShort_t HollowConeNTrkDr04() const { return fHollowConeNTrk; }
|
74 |
|
|
Double_t HollowConeTrkIsoDr03() const { return fHollowConeTrkIsoDr03; }
|
75 |
|
|
Double_t HollowConeTrkIsoDr04() const { return fHollowConeTrkIso; }
|
76 |
|
|
Bool_t IsEB() const { return fIsEB; }
|
77 |
|
|
Bool_t IsEE() const { return fIsEE; }
|
78 |
|
|
Bool_t IsEBGap() const { return fIsEBGap; }
|
79 |
|
|
Bool_t IsEEGap() const { return fIsEEGap; }
|
80 |
|
|
Bool_t IsEBEEGap() const { return fIsEBEEGap; }
|
81 |
ceballos |
1.31 |
Bool_t IsLooseEM() const { return fIsLooseEM; } // *DEPRECATED*
|
82 |
loizides |
1.29 |
Bool_t IsLoosePhoton() const { return fIsLoosePhoton; }
|
83 |
|
|
Bool_t IsTightPhoton() const { return fIsTightPhoton; }
|
84 |
|
|
Bool_t IsConverted() const { return fIsConverted; }
|
85 |
bendavid |
1.34 |
ThreeVector Mom3(const ThreeVector &vtx) const { return E()*(ThreeVector(CaloPos()) - vtx).Unit(); }
|
86 |
|
|
FourVectorM Mom(const ThreeVector &vtx) const;
|
87 |
loizides |
1.29 |
UInt_t NConversions() const { return fConversions.Entries(); }
|
88 |
|
|
EObjType ObjType() const { return kPhoton; }
|
89 |
|
|
Double_t R9() const { return fR9; }
|
90 |
|
|
const SuperCluster *SCluster() const { return fSuperClusterRef.Obj(); }
|
91 |
|
|
Double_t SolidConeTrkIsoDr03() const { return fSolidConeTrkIsoDr03; }
|
92 |
|
|
Double_t SolidConeTrkIsoDr04() const { return fSolidConeTrkIso; }
|
93 |
|
|
UShort_t SolidConeNTrkDr03() const { return fSolidConeNTrkDr03; }
|
94 |
|
|
UShort_t SolidConeNTrkDr04() const { return fSolidConeNTrk; }
|
95 |
|
|
void AddConversion(const Conversion *c) { fConversions.Add(c); }
|
96 |
|
|
void SetIsConverted(Bool_t isConv) { fIsConverted = isConv; }
|
97 |
|
|
void SetMom(Double_t px, Double_t py, Double_t pz, Double_t e);
|
98 |
|
|
void SetSuperCluster(const SuperCluster* sc) { fSuperClusterRef = sc; }
|
99 |
|
|
void SetR9(Double_t x) { fR9 = x; }
|
100 |
|
|
void SetHadOverEm(Double_t x) { fHadOverEm = x; }
|
101 |
bendavid |
1.33 |
void SetHcalDepth1OverEcal(Double_t x) { fHcalDepth1OverEcal = x; }
|
102 |
|
|
void SetHcalDepth2OverEcal(Double_t x) { fHcalDepth2OverEcal = x; }
|
103 |
|
|
void SetMaxEnergyXtal(Double_t x) { fMaxEnergyXtal = x; }
|
104 |
|
|
void SetE15(Double_t x) { fE15 = x; }
|
105 |
|
|
void SetE25(Double_t x) { fE25 = x; }
|
106 |
|
|
void SetE33(Double_t x) { fE33 = x; }
|
107 |
|
|
void SetE55(Double_t x) { fE55 = x; }
|
108 |
|
|
void SetCovEtaEta(Double_t CovEtaEta) { fCovEtaEta = CovEtaEta; }
|
109 |
|
|
void SetCoviEtaiEta(Double_t CoviEtaiEta) { fCoviEtaiEta = CoviEtaiEta; }
|
110 |
loizides |
1.29 |
void SetHasPixelSeed(Bool_t x) { fHasPixelSeed = x; }
|
111 |
|
|
void SetEcalRecHitIsoDr04(Double_t x) { fEcalRecHitIso = x; }
|
112 |
|
|
void SetHcalTowerSumEtDr04(Double_t x) { fHcalTowerSumEtDr04 = x; }
|
113 |
|
|
void SetHcalDepth1TowerSumEtDr04(Double_t x) { fHcalDepth1TowerSumEtDr04 = x; }
|
114 |
|
|
void SetHcalDepth2TowerSumEtDr04(Double_t x) { fHcalDepth2TowerSumEtDr04 = x; }
|
115 |
|
|
void SetSolidConeTrkIsoDr04(Double_t x) { fSolidConeTrkIso = x; }
|
116 |
|
|
void SetHollowConeTrkIsoDr04(Double_t x) { fHollowConeTrkIso = x; }
|
117 |
|
|
void SetSolidConeNTrkDr04(UShort_t x) { fSolidConeNTrk = x; }
|
118 |
|
|
void SetHollowConeNTrkDr04(UShort_t x) { fHollowConeNTrk = x; }
|
119 |
|
|
void SetEcalRecHitIsoDr03(Double_t x) { fEcalRecHitIsoDr03 = x; }
|
120 |
|
|
void SetHcalTowerSumEtDr03(Double_t x) { fHcalTowerSumEtDr03 = x; }
|
121 |
|
|
void SetHcalDepth1TowerSumEtDr03(Double_t x) { fHcalDepth1TowerSumEtDr03 = x; }
|
122 |
|
|
void SetHcalDepth2TowerSumEtDr03(Double_t x) { fHcalDepth2TowerSumEtDr03 = x; }
|
123 |
|
|
void SetSolidConeTrkIsoDr03(Double_t x) { fSolidConeTrkIsoDr03 = x; }
|
124 |
|
|
void SetHollowConeTrkIsoDr03(Double_t x) { fHollowConeTrkIsoDr03 = x; }
|
125 |
|
|
void SetSolidConeNTrkDr03(UShort_t x) { fSolidConeNTrkDr03 = x; }
|
126 |
|
|
void SetHollowConeNTrkDr03(UShort_t x) { fHollowConeNTrkDr03 = x; }
|
127 |
|
|
void SetIsEB(Bool_t x) { fIsEB = x; }
|
128 |
|
|
void SetIsEE(Bool_t x) { fIsEE = x; }
|
129 |
|
|
void SetIsEBGap(Bool_t x) { fIsEBGap = x; }
|
130 |
|
|
void SetIsEEGap(Bool_t x) { fIsEEGap = x; }
|
131 |
|
|
void SetIsEBEEGap(Bool_t x) { fIsEBEEGap = x; }
|
132 |
|
|
void SetIsLooseEM(Bool_t x) { fIsLooseEM = x; }
|
133 |
|
|
void SetIsLoosePhoton(Bool_t x) { fIsLoosePhoton = x; }
|
134 |
|
|
void SetIsTightPhoton(Bool_t x) { fIsTightPhoton = x; }
|
135 |
bendavid |
1.34 |
void SetCaloPosXYZ(Double_t x, Double_t y, Double_t z) { fCaloPos.SetXYZ(x,y,z); }
|
136 |
|
|
|
137 |
sixie |
1.16 |
|
138 |
loizides |
1.1 |
protected:
|
139 |
loizides |
1.29 |
void GetMom() const;
|
140 |
loizides |
1.21 |
|
141 |
loizides |
1.29 |
Vect4M fMom; //four momentum vector
|
142 |
bendavid |
1.34 |
Vect3C fCaloPos; //shower position
|
143 |
loizides |
1.29 |
Double32_t fR9; //[0,0,14]r9=e3x3/etotal variable
|
144 |
|
|
Double32_t fHadOverEm; //[0,0,14]hadronic over em fraction
|
145 |
bendavid |
1.33 |
Double32_t fHcalDepth1OverEcal; //[0,0,14]hadronic over em fraction depth1
|
146 |
|
|
Double32_t fHcalDepth2OverEcal; //[0,0,14]hadronic over em fraction depth2
|
147 |
|
|
Double32_t fMaxEnergyXtal; //[0,0,14]maximum single crystal energy
|
148 |
|
|
Double32_t fE15; //[0,0,14]1x5 crystal energy
|
149 |
|
|
Double32_t fE25; //[0,0,14]2x5 crystal energy
|
150 |
|
|
Double32_t fE33; //[0,0,14]3x3 crystal energy
|
151 |
|
|
Double32_t fE55; //[0,0,14]5x5 crystal energy
|
152 |
|
|
Double32_t fCovEtaEta; //[0,0,14]variance eta-eta
|
153 |
|
|
Double32_t fCoviEtaiEta; //[0,0,14]covariance eta-eta (in crystals)
|
154 |
loizides |
1.29 |
Double32_t fEcalRecHitIso; //[0,0,14]ecal rechit based isolation dR 0.4 *RENAMING*
|
155 |
|
|
Double32_t fHcalRecHitIso; //[0,0,14]hcal rechit based isolation dR 0.4 - *DEPRECATED*
|
156 |
|
|
Double32_t fHcalTowerSumEtDr04; //[0,0,14]hcal tower based isolation dR 0.4
|
157 |
|
|
Double32_t fHcalDepth1TowerSumEtDr04; //[0,0,14]hcal depth1 tower based isolation dR 0.4
|
158 |
|
|
Double32_t fHcalDepth2TowerSumEtDr04; //[0,0,14]hcal depth2 tower based isolation dR 0.4
|
159 |
|
|
Double32_t fSolidConeTrkIso; //[0,0,14]sum track pT in cone of dR 0.4 *RENAMING*
|
160 |
|
|
Double32_t fHollowConeTrkIso; //[0,0,14]as above excluding the core, dR 0.4 *RENAMING*
|
161 |
|
|
UShort_t fSolidConeNTrk; //number of tracks in a cone of dR 0.4 *RENAMING*
|
162 |
|
|
UShort_t fHollowConeNTrk; //as above excluding the core, dR 0.4 *RENAMING*
|
163 |
|
|
Double32_t fEcalRecHitIsoDr03; //[0,0,14]ecal rechit based isolation dR 0.3
|
164 |
|
|
Double32_t fHcalTowerSumEtDr03; //[0,0,14] hcal tower based isolation dR 0.3
|
165 |
|
|
Double32_t fHcalDepth1TowerSumEtDr03; //[0,0,14]hcal depth1 tower based isolation dR 0.3
|
166 |
|
|
Double32_t fHcalDepth2TowerSumEtDr03; //[0,0,14]hcal depth2 tower based isolation dR 0.3
|
167 |
|
|
Double32_t fSolidConeTrkIsoDr03; //[0,0,14]sum track pT in cone of dR 0.3
|
168 |
|
|
Double32_t fHollowConeTrkIsoDr03; //[0,0,14]as above excluding the core, dR 0.3
|
169 |
|
|
UShort_t fSolidConeNTrkDr03; //number of tracks in a cone of dR 0.3
|
170 |
|
|
UShort_t fHollowConeNTrkDr03; //as above excluding the core, dR 0.3
|
171 |
|
|
Bool_t fHasPixelSeed; //=true if super cluster has matched seed
|
172 |
|
|
Bool_t fIsEB; //=true if photon is ECal barrel
|
173 |
|
|
Bool_t fIsEE; //=true if photon is ECAL endcap
|
174 |
|
|
Bool_t fIsEBGap; //=true photon is in ECAL barrel crystal gap
|
175 |
|
|
Bool_t fIsEEGap; //=true photon is in ECAL endcap crystal gap
|
176 |
|
|
Bool_t fIsEBEEGap; //=true photon is in boundary between EB/EE
|
177 |
|
|
Bool_t fIsLooseEM; //=true if loose em cuts are passed *DEPRECATED*
|
178 |
|
|
// LooseEM corresponds to supercluster preselection in 3_1_X
|
179 |
|
|
//so this variable is now always true for photon objects
|
180 |
|
|
Bool_t fIsLoosePhoton; //=true if loose photon cuts are passed
|
181 |
|
|
Bool_t fIsTightPhoton; //=true if tight photon cuts are passed
|
182 |
|
|
Bool_t fIsConverted; //=true if photon converted
|
183 |
|
|
RefArray<Conversion> fConversions; //refs to associated conversion candidates
|
184 |
|
|
Ref<SuperCluster> fSuperClusterRef; //ref to associated super cluster
|
185 |
loizides |
1.1 |
|
186 |
bendavid |
1.34 |
ClassDef(Photon,4) // Photon class
|
187 |
loizides |
1.1 |
};
|
188 |
|
|
}
|
189 |
loizides |
1.2 |
|
190 |
|
|
//--------------------------------------------------------------------------------------------------
|
191 |
loizides |
1.21 |
inline void mithep::Photon::GetMom() const
|
192 |
|
|
{
|
193 |
|
|
// Get momentum values from stored values.
|
194 |
|
|
|
195 |
loizides |
1.24 |
fCachedMom.SetCoordinates(fMom.Pt(),fMom.Eta(),fMom.Phi(),fMom.M());
|
196 |
loizides |
1.21 |
}
|
197 |
|
|
|
198 |
|
|
//--------------------------------------------------------------------------------------------------
|
199 |
loizides |
1.2 |
inline void mithep::Photon::SetMom(Double_t px, Double_t py, Double_t pz, Double_t e)
|
200 |
|
|
{
|
201 |
loizides |
1.21 |
// Set momentum vector.
|
202 |
loizides |
1.2 |
|
203 |
loizides |
1.21 |
fMom.SetXYZT(px, py, pz, e);
|
204 |
bendavid |
1.22 |
ClearMom();
|
205 |
loizides |
1.2 |
}
|
206 |
bendavid |
1.34 |
|
207 |
|
|
//--------------------------------------------------------------------------------------------------
|
208 |
|
|
inline mithep::FourVectorM mithep::Photon::Mom(const ThreeVector &vtx) const
|
209 |
|
|
{
|
210 |
|
|
// Get momentum values from stored values.
|
211 |
|
|
ThreeVector momv = Mom3(vtx);
|
212 |
|
|
FourVectorM newmom;
|
213 |
|
|
|
214 |
|
|
newmom.SetCoordinates(momv.Rho(),momv.Eta(),momv.Phi(),0.);
|
215 |
|
|
|
216 |
|
|
return newmom;
|
217 |
|
|
}
|
218 |
|
|
|
219 |
loizides |
1.1 |
#endif
|