ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Photon.h
Revision: 1.50
Committed: Thu Jun 7 14:43:24 2012 UTC (12 years, 11 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1
Changes since 1.49: +15 -4 lines
Log Message:
additional photon variables to allow for shower shape rescaling

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: Photon.h,v 1.49 2012/05/05 16:49:10 paus Exp $
3 //
4 // Photon
5 //
6 // This class holds the reconstructed photon quantities.
7 //
8 // Authors: J.Bendavid, C.Loizides, C.Paus
9 //--------------------------------------------------------------------------------------------------
10
11 #ifndef MITANA_DATATREE_PHOTON_H
12 #define MITANA_DATATREE_PHOTON_H
13
14 #include "MitCommon/DataFormats/interface/Vect4M.h"
15 #include "MitAna/DataTree/interface/Particle.h"
16 #include "MitAna/DataTree/interface/Conversion.h"
17 #include "MitAna/DataTree/interface/DecayParticle.h"
18 #include "MitAna/DataTree/interface/Vertex.h"
19 #include "MitAna/DataTree/interface/PFCandidate.h"
20 #include "MitAna/DataCont/interface/RefArray.h"
21
22 namespace mithep
23 {
24 class Photon : public Particle
25 {
26 public:
27 Photon() :
28 fR9(0),fHadOverEm(0),fHcalDepth1OverEcal(0),
29 fHcalDepth2OverEcal(0), fMaxEnergyXtal(0), fE15(0), fE25(0), fE33(0),
30 fE55(0), fCovEtaEta(0), fCoviEtaiEta(0),
31 fEcalRecHitIso(0),fHcalRecHitIso(0), fHcalTowerSumEtDr04(0),
32 fHcalDepth1TowerSumEtDr04(0), fHcalDepth2TowerSumEtDr04(0), fSolidConeTrkIso(0),
33 fHollowConeTrkIso(0),fSolidConeNTrk(0),fHollowConeNTrk(0), fEcalRecHitIsoDr03(0),
34 fHcalTowerSumEtDr03(0), fHcalDepth1TowerSumEtDr03(0), fHcalDepth2TowerSumEtDr03(0),
35 fSolidConeTrkIsoDr03(0), fHollowConeTrkIsoDr03(0),fSolidConeNTrkDr03(0),
36 fHollowConeNTrkDr03(0), fPFChargedHadronIso(0), fPFNeutralHadronIso(0), fPFPhotonIso(0),
37 fHasPixelSeed(0), fIsEB(0), fIsEE(0), fIsEBGap(0),
38 fIsEEGap(0),fIsEBEEGap(0), fIsLooseEM(0),fIsLoosePhoton(0), fIsTightPhoton(0),
39 fIsConverted(0), fEnergyErr(-99.), fEnergyErrSmeared(-99.), fEnergySmearing(0.),
40 fEnergyRegr(0.), fEnergyErrRegr(0.), fEnergyPhoFix(0.), fEnergyErrPhoFix(0.), fVtxProb(1.0),
41 fIdMva(-99.), fEtaWidth(-99.), fPhiWidth(-99.),
42 fHadOverEmTow(0), fHCalIsoTowDr03(0), fHCalIsoTowDr04(0),
43 fS4Ratio(-99.), fEffSigmaRR(-99.) {}
44 Photon(Double_t px, Double_t py, Double_t pz, Double_t e) :
45 fMom(FourVector(px,py,pz,e)),
46 fR9(0),fHadOverEm(0),fHcalDepth1OverEcal(0),
47 fHcalDepth2OverEcal(0), fMaxEnergyXtal(0), fE15(0), fE25(0), fE33(0),
48 fE55(0), fCovEtaEta(0), fCoviEtaiEta(0),
49 fEcalRecHitIso(0),fHcalRecHitIso(0), fHcalTowerSumEtDr04(0),
50 fHcalDepth1TowerSumEtDr04(0), fHcalDepth2TowerSumEtDr04(0), fSolidConeTrkIso(0),
51 fHollowConeTrkIso(0),fSolidConeNTrk(0),fHollowConeNTrk(0), fEcalRecHitIsoDr03(0),
52 fHcalTowerSumEtDr03(0), fHcalDepth1TowerSumEtDr03(0), fHcalDepth2TowerSumEtDr03(0),
53 fSolidConeTrkIsoDr03(0), fHollowConeTrkIsoDr03(0),fSolidConeNTrkDr03(0),
54 fHollowConeNTrkDr03(0), fPFChargedHadronIso(0), fPFNeutralHadronIso(0), fPFPhotonIso(0),
55 fHasPixelSeed(0), fIsEB(0), fIsEE(0), fIsEBGap(0),
56 fIsEEGap(0),fIsEBEEGap(0), fIsLooseEM(0),fIsLoosePhoton(0), fIsTightPhoton(0),
57 fIsConverted(0), fEnergyErr(-99.), fEnergyErrSmeared(-99.), fEnergySmearing(0.),
58 fEnergyRegr(0.), fEnergyErrRegr(0.), fEnergyPhoFix(0.), fEnergyErrPhoFix(0.), fVtxProb(1.0),
59 fIdMva(-99.), fEtaWidth(-99.), fPhiWidth(-99.),
60 fHadOverEmTow(0), fHCalIsoTowDr03(0), fHCalIsoTowDr04(0),
61 fS4Ratio(-99.), fEffSigmaRR(-99.) {}
62
63 // Contents of the Photons
64 const Conversion *ConvCand(UInt_t i) const { return fConversions.At(i); }
65 const DecayParticle *ConversionD(UInt_t i) const { return fConversionsD.At(i); }
66 const DecayParticle *ConversionS(UInt_t i) const { return fConversionsS.At(i); }
67 Double_t EcalRecHitIsoDr03() const { return fEcalRecHitIsoDr03; }
68 Double_t EcalRecHitIsoDr04() const { return fEcalRecHitIso; }
69 Double_t EnergyErr() const { return fEnergyErr; }
70 Double_t EnergyErrSmeared() const { return fEnergyErrSmeared; }
71 Double_t EnergySmearing() const { return fEnergySmearing; }
72 Double_t EnergyRegr() const { return fEnergyRegr; }
73 Double_t EnergyErrRegr() const { return fEnergyErrRegr; }
74 Double_t EnergyPhoFix() const { return fEnergyPhoFix; }
75 Double_t EnergyErrPhoFix() const { return fEnergyErrPhoFix; }
76 Double_t HadOverEm() const { return fHadOverEm; }
77 Double_t HcalDepth1OverEcal() const { return fHcalDepth1OverEcal; }
78 Double_t HcalDepth2OverEcal() const { return fHcalDepth2OverEcal; }
79 Double_t MaxEnergyXtal() const { return fMaxEnergyXtal; }
80 Double_t E15() const { return fE15; }
81 Double_t E25() const { return fE25; }
82 Double_t E33() const { return fE33; }
83 Double_t E55() const { return fE55; }
84 ThreeVectorC CaloPos() const;
85 Double_t CovEtaEta() const { return fCovEtaEta; }
86 Double_t CoviEtaiEta() const { return fCoviEtaiEta; }
87 Bool_t HasPixelSeed() const { return fHasPixelSeed; }
88 Double_t HcalDepth1TowerSumEtDr03() const { return fHcalDepth1TowerSumEtDr03; }
89 Double_t HcalDepth1TowerSumEtDr04() const { return fHcalDepth1TowerSumEtDr04; }
90 Double_t HcalDepth2TowerSumEtDr03() const { return fHcalDepth2TowerSumEtDr03; }
91 Double_t HcalDepth2TowerSumEtDr04() const { return fHcalDepth2TowerSumEtDr04; }
92 Double_t HcalRecHitIso() const { return fHcalRecHitIso; } //DEPR
93 Double_t HcalTowerSumEtDr03() const { return fHcalTowerSumEtDr03; }
94 Double_t HcalTowerSumEtDr04() const { return fHcalTowerSumEtDr04; }
95 UShort_t HollowConeNTrkDr03() const { return fHollowConeNTrkDr03; }
96 UShort_t HollowConeNTrkDr04() const { return fHollowConeNTrk; }
97 Double_t HollowConeTrkIsoDr03() const { return fHollowConeTrkIsoDr03; }
98 Double_t HollowConeTrkIsoDr04() const { return fHollowConeTrkIso; }
99 Double_t PFChargedHadronIso() const { return fPFChargedHadronIso; }
100 Double_t PFNeutralHadronIso() const { return fPFNeutralHadronIso; }
101 Double_t PFPhotonIso() const { return fPFPhotonIso; }
102 Bool_t IsEB() const { return fIsEB; }
103 Bool_t IsEE() const { return fIsEE; }
104 Bool_t IsEBGap() const { return fIsEBGap; }
105 Bool_t IsEEGap() const { return fIsEEGap; }
106 Bool_t IsEBEEGap() const { return fIsEBEEGap; }
107 Bool_t IsLooseEM() const { return fIsLooseEM; } //DEPR
108 Bool_t IsLoosePhoton() const { return fIsLoosePhoton; }
109 Bool_t IsTightPhoton() const { return fIsTightPhoton; }
110 Bool_t IsConverted() const { return fIsConverted; }
111 ThreeVector Mom3(const ThreeVector &v) const { return
112 E()*(ThreeVector(CaloPos())-v).Unit(); }
113 FourVectorM MomVtx(const ThreeVector &v) const;
114 UInt_t NConversions() const { return fConversions.Entries(); }
115 UInt_t NConversionsD() const { return fConversionsD.Entries(); }
116 UInt_t NConversionsS() const { return fConversionsS.Entries(); }
117 EObjType ObjType() const { return kPhoton; }
118 const SuperCluster *PFSCluster() const { return fPFSuperClusterRef.Obj(); }
119 Double_t R9() const { return fR9; }
120 const SuperCluster *SCluster() const { return fSuperClusterRef.Obj(); }
121 Double_t SolidConeTrkIsoDr03() const { return fSolidConeTrkIsoDr03; }
122 Double_t SolidConeTrkIsoDr04() const { return fSolidConeTrkIso; }
123 UShort_t SolidConeNTrkDr03() const { return fSolidConeNTrkDr03; }
124 UShort_t SolidConeNTrkDr04() const { return fSolidConeNTrk; }
125 Double_t EtaWidth() const { return fEtaWidth >= 0. ?
126 fEtaWidth : SCluster()->EtaWidth(); }
127 Double_t PhiWidth() const { return fPhiWidth >= 0. ?
128 fPhiWidth : SCluster()->PhiWidth(); }
129 Double_t HadOverEmTow() const { return fHadOverEmTow; }
130 Double_t HcalIsoTowDr03() const { return fHCalIsoTowDr03; }
131 Double_t HcalIsoTowDr04() const { return fHCalIsoTowDr04; }
132 UInt_t NPFPhotonsInMustache() const { return fPFPhotonsInMustache.Entries(); }
133 UInt_t NPFPhotonsOutOfMustache() const { return fPFPhotonsOutOfMustache.Entries(); }
134 const PFCandidate *PFPhotonInMustache(UInt_t i) const { return fPFPhotonsInMustache.At(i); }
135 const PFCandidate *PFPhotonOutOfMustache(UInt_t i) const { return fPFPhotonsOutOfMustache.At(i); }
136 Double_t S4Ratio() const { return fS4Ratio >= 0. ?
137 fS4Ratio : SCluster()->Seed()->E2x2()/SCluster()->Seed()->E5x5(); }
138 Double_t EffSigmaRR() const { return fEffSigmaRR >= 0. ?
139 fEffSigmaRR :
140 sqrt((SCluster()->PsEffWidthSigmaXX())*(SCluster()->PsEffWidthSigmaXX())+(SCluster()->PsEffWidthSigmaYY())*(SCluster()->PsEffWidthSigmaYY())); }
141
142 //void AddConversion(const Conversion *c) { fConversions.Add(c); } *DEPRECATED*
143 void AddConversionD(const DecayParticle *c) { fConversionsD.Add(c); }
144 void AddConversionS(const DecayParticle *c) { fConversionsS.Add(c); }
145 void AddPFPhotonInMustache(const PFCandidate *c) { fPFPhotonsInMustache.Add(c); }
146 void AddPFPhotonOutOfMustache(const PFCandidate *c) { fPFPhotonsOutOfMustache.Add(c); }
147 void SetEnergyErr(Double_t x) { fEnergyErr = x; }
148 void SetEnergyErrSmeared(Double_t x) { fEnergyErrSmeared = x; }
149 void SetEnergySmearing(Double_t x) { fEnergySmearing = x; }
150 void SetEnergyRegr(Double_t x) { fEnergyRegr = x; }
151 void SetEnergyErrRegr(Double_t x) { fEnergyErrRegr = x; }
152 void SetEnergyPhoFix(Double_t x) { fEnergyPhoFix = x; }
153 void SetEnergyErrPhoFix(Double_t x) { fEnergyErrPhoFix = x; }
154 void SetIsConverted(Bool_t b) { fIsConverted = b; }
155 void SetMom(Double_t px, Double_t py, Double_t pz, Double_t e);
156 void SetSuperCluster(const SuperCluster* s) { fSuperClusterRef = s; }
157 void SetR9(Double_t x) { fR9 = x; }
158 void SetHadOverEm(Double_t x) { fHadOverEm = x; }
159 void SetHcalDepth1OverEcal(Double_t x) { fHcalDepth1OverEcal = x; }
160 void SetHcalDepth2OverEcal(Double_t x) { fHcalDepth2OverEcal = x; }
161 void SetMaxEnergyXtal(Double_t x) { fMaxEnergyXtal = x; }
162 void SetE15(Double_t x) { fE15 = x; }
163 void SetE25(Double_t x) { fE25 = x; }
164 void SetE33(Double_t x) { fE33 = x; }
165 void SetE55(Double_t x) { fE55 = x; }
166 void SetCovEtaEta(Double_t x) { fCovEtaEta = x; }
167 void SetCoviEtaiEta(Double_t x) { fCoviEtaiEta = x; }
168 void SetHasPixelSeed(Bool_t x) { fHasPixelSeed = x; }
169 void SetEcalRecHitIsoDr04(Double_t x) { fEcalRecHitIso = x; }
170 void SetHcalTowerSumEtDr04(Double_t x) { fHcalTowerSumEtDr04 = x; }
171 void SetHcalDepth1TowerSumEtDr04(Double_t x) { fHcalDepth1TowerSumEtDr04= x; }
172 void SetHcalDepth2TowerSumEtDr04(Double_t x) { fHcalDepth2TowerSumEtDr04= x; }
173 void SetSolidConeTrkIsoDr04(Double_t x) { fSolidConeTrkIso = x; }
174 void SetHollowConeTrkIsoDr04(Double_t x) { fHollowConeTrkIso = x; }
175 void SetSolidConeNTrkDr04(UShort_t x) { fSolidConeNTrk = x; }
176 void SetHollowConeNTrkDr04(UShort_t x) { fHollowConeNTrk = x; }
177 void SetEcalRecHitIsoDr03(Double_t x) { fEcalRecHitIsoDr03 = x; }
178 void SetHcalTowerSumEtDr03(Double_t x) { fHcalTowerSumEtDr03 = x; }
179 void SetHcalDepth1TowerSumEtDr03(Double_t x) { fHcalDepth1TowerSumEtDr03= x; }
180 void SetHcalDepth2TowerSumEtDr03(Double_t x) { fHcalDepth2TowerSumEtDr03= x; }
181 void SetSolidConeTrkIsoDr03(Double_t x) { fSolidConeTrkIsoDr03 = x; }
182 void SetHollowConeTrkIsoDr03(Double_t x) { fHollowConeTrkIsoDr03 = x; }
183 void SetSolidConeNTrkDr03(UShort_t x) { fSolidConeNTrkDr03 = x; }
184 void SetHollowConeNTrkDr03(UShort_t x) { fHollowConeNTrkDr03 = x; }
185 void SetPFChargedHadronIso(Double_t x) { fPFChargedHadronIso = x; }
186 void SetPFNeutralHadronIso(Double_t x) { fPFNeutralHadronIso = x; }
187 void SetPFPhotonIso(Double_t x) { fPFPhotonIso = x; }
188 void SetIsEB(Bool_t x) { fIsEB = x; }
189 void SetIsEE(Bool_t x) { fIsEE = x; }
190 void SetIsEBGap(Bool_t x) { fIsEBGap = x; }
191 void SetIsEEGap(Bool_t x) { fIsEEGap = x; }
192 void SetIsEBEEGap(Bool_t x) { fIsEBEEGap = x; }
193 void SetIsLooseEM(Bool_t x) { fIsLooseEM = x; }
194 void SetIsLoosePhoton(Bool_t x) { fIsLoosePhoton = x; }
195 void SetIsTightPhoton(Bool_t x) { fIsTightPhoton = x; }
196 void SetCaloPosXYZ(Double_t x, Double_t y,
197 Double_t z) { fCaloPos.SetXYZ(x,y,z); }
198 void SetPV(const Vertex *v) { fPVRef = v; }
199 void SetPFSuperCluster(const SuperCluster *s) { fPFSuperClusterRef = s; }
200 void SetVtxProb(Double_t x) { fVtxProb = x; }
201 void SetIdMva(Double_t x) { fIdMva = x; }
202 void SetEtaWidth(Double_t x) { fEtaWidth = x; }
203 void SetPhiWidth(Double_t x) { fPhiWidth = x; }
204 void SetHadOverEmTow(Double_t x) { fHadOverEmTow = x; }
205 void SetHCalIsoTowDr03(Double_t x) { fHCalIsoTowDr03 = x; }
206 void SetHCalIsoTowDr04(Double_t x) { fHCalIsoTowDr04 = x; }
207 void SetS4Ratio(Double_t x) { fS4Ratio = x; }
208 void SetEffSigmaRR(Double_t x) { fEffSigmaRR = x; }
209
210 Bool_t HasPV() const { return fPVRef.IsValid(); }
211 const Vertex *PV() const { return fPVRef.Obj(); }
212 Double_t VtxProb() const { return fVtxProb; }
213 Double_t IdMva() const { return fIdMva; }
214
215 // Some structural tools
216 void Mark(UInt_t i=1) const;
217
218 protected:
219 void GetMom() const;
220
221 Vect4M fMom; //four momentum vector
222 Vect3C fCaloPos; //shower position
223 Double32_t fR9; //[0,0,14]r9=e3x3/etotal variable
224 Double32_t fHadOverEm; //[0,0,14]hadronic over em fraction
225 Double32_t fHcalDepth1OverEcal; //[0,0,14]hadronic over em fraction depth1
226 Double32_t fHcalDepth2OverEcal; //[0,0,14]hadronic over em fraction depth2
227 Double32_t fMaxEnergyXtal; //[0,0,14]maximum single crystal energy
228 Double32_t fE15; //[0,0,14]1x5 crystal energy
229 Double32_t fE25; //[0,0,14]2x5 crystal energy
230 Double32_t fE33; //[0,0,14]3x3 crystal energy
231 Double32_t fE55; //[0,0,14]5x5 crystal energy
232 Double32_t fCovEtaEta; //[0,0,14]variance eta-eta
233 Double32_t fCoviEtaiEta; //[0,0,14]covariance eta-eta (in crystals)
234 Double32_t fEcalRecHitIso; //[0,0,14]ecal rechit bsd isodR 0.4 *RENAME*
235 Double32_t fHcalRecHitIso; //[0,0,14]hcal rechit bsd isodR 0.4 *DEPR*
236 Double32_t fHcalTowerSumEtDr04; //[0,0,14]hcal tower bsd isodR 0.4
237 Double32_t fHcalDepth1TowerSumEtDr04; //[0,0,14]hcal dp1 tw bsd isodR 0.4
238 Double32_t fHcalDepth2TowerSumEtDr04; //[0,0,14]hcal dp2 tw bsd isodR 0.4
239 Double32_t fSolidConeTrkIso; //[0,0,14]sum track pT in cone dR 0.4 *RENAME*
240 Double32_t fHollowConeTrkIso; //[0,0,14]as above excl. core, dR 0.4 *RENAME*
241 UShort_t fSolidConeNTrk; //number of tracks in cone dR 0.4 *RENAME*
242 UShort_t fHollowConeNTrk; //as above excl. core, dR 0.4 *RENAME*
243 Double32_t fEcalRecHitIsoDr03; //[0,0,14]ecal rechit based iso dR 0.3
244 Double32_t fHcalTowerSumEtDr03; //[0,0,14] hcal tower based iso dR 0.3
245 Double32_t fHcalDepth1TowerSumEtDr03; //[0,0,14]hcal depth1 tower based iso dR 0.3
246 Double32_t fHcalDepth2TowerSumEtDr03; //[0,0,14]hcal depth2 tower based iso dR 0.3
247 Double32_t fSolidConeTrkIsoDr03; //[0,0,14]sum track pT in cone of dR 0.3
248 Double32_t fHollowConeTrkIsoDr03; //[0,0,14]as above excluding the core, dR 0.3
249 UShort_t fSolidConeNTrkDr03; //number of tracks in a cone of dR 0.3
250 UShort_t fHollowConeNTrkDr03; //as above excluding the core, dR 0.3
251 Double32_t fPFChargedHadronIso; //[0,0,14]pf iso, charged hadrons
252 Double32_t fPFNeutralHadronIso; //[0,0,14]pf iso, neutral hadrons
253 Double32_t fPFPhotonIso; //[0,0,14]pf iso, photons
254 Bool_t fHasPixelSeed; //if super cluster has matched seed
255 Bool_t fIsEB; //if photon is ECal barrel
256 Bool_t fIsEE; //if photon is ECAL endcap
257 Bool_t fIsEBGap; //photon is in ECAL barrel crystal gap
258 Bool_t fIsEEGap; //photon is in ECAL endcap crystal gap
259 Bool_t fIsEBEEGap; //photon is in boundary between EB/EE
260 Bool_t fIsLooseEM; //if loose em cuts are passed *DEPRECATED*
261 // LooseEM == to scluster preselection in 3_1_X
262 // so is now always true for photon objects
263 Bool_t fIsLoosePhoton; //if loose photon cuts are passed
264 Bool_t fIsTightPhoton; //if tight photon cuts are passed
265 Bool_t fIsConverted; //if photon converted
266 RefArray<Conversion> fConversions; //refs to associated conversion candidates *DEPRECATED*
267 Ref<SuperCluster> fSuperClusterRef; //ref to associated super cluster
268 Ref<Vertex> fPVRef; //ref to associated primary vertex
269 Double32_t fEnergyErr; //[0,0,14]ene uncer. from var. regr.
270 Double32_t fEnergyErrSmeared; //[0,0,14]ene uncer. from var. regr., smeared
271 Double32_t fEnergySmearing; //[0,0,14]addit. ene smearing applied wrt MC
272 Double32_t fEnergyRegr; //[0,0,14]regr. ene (filler time)
273 Double32_t fEnergyErrRegr; //[0,0,14]regr. ene uncertainty (filler time)
274 Double32_t fEnergyPhoFix; //[0,0,14]PhotonFix energy (filler time)
275 Double32_t fEnergyErrPhoFix; //[0,0,14]PhotonFix energy uncertainty (filler time)
276 Double32_t fVtxProb; //[0,0,14]Probability linked PV is correct
277 Double32_t fIdMva; //[0,0,14]output of photon id mva
278 Double32_t fEtaWidth; //[0,0,14]output of photon id mva
279 Double32_t fPhiWidth; //[0,0,14]output of photon id mva
280 Ref<SuperCluster> fPFSuperClusterRef; //ref to associated PF super cluster
281 Double32_t fHadOverEmTow; //[0,0,14]per-tower definition of hadronic/em energy fraction
282 Double32_t fHCalIsoTowDr03; //[0,0,14]hcal isolation matched to per tower h/e definition
283 Double32_t fHCalIsoTowDr04; //[0,0,14]hcal isolation matched to per tower h/e definition
284 RefArray<DecayParticle> fConversionsD; //refs to associated conversion candidates (using newer DecayParticle format)
285 RefArray<DecayParticle> fConversionsS; //refs to associated conversion candidates (using newer DecayParticle format) - single leg conversions
286 RefArray<PFCandidate> fPFPhotonsInMustache; //refs to photon-type PFCandidates inside of mustache region
287 RefArray<PFCandidate> fPFPhotonsOutOfMustache; //refs to photon-type PFCandidates outside of mustache region
288 Double32_t fS4Ratio; //[0,0,14]S4 ratio
289 Double32_t fEffSigmaRR; //[0,0,14]preshower width variable
290
291 ClassDef(Photon,17) // Photon class
292 };
293 }
294
295 //--------------------------------------------------------------------------------------------------
296 inline void mithep::Photon::Mark(UInt_t ib) const
297 {
298 // mark myself
299 mithep::DataObject::Mark(ib);
300 // mark my dependencies if they are there
301 if (fPVRef.IsValid())
302 fPVRef.Obj()->Mark(ib);
303 if (fSuperClusterRef.IsValid())
304 fSuperClusterRef.Obj()->Mark(ib);
305 fConversions.Mark(ib);
306 fConversionsD.Mark(ib);
307 fConversionsS.Mark(ib);
308 fPFPhotonsInMustache.Mark(ib);
309 fPFPhotonsOutOfMustache.Mark(ib);
310 }
311
312 //--------------------------------------------------------------------------------------------------
313 inline mithep::ThreeVectorC mithep::Photon::CaloPos() const
314 {
315 // Get caloposition
316 mithep::ThreeVectorC calopos = fCaloPos.V();
317 if (calopos.Rho()>1.0)
318 return calopos;
319 else
320 return SCluster()->Point();
321 }
322
323 //--------------------------------------------------------------------------------------------------
324 inline void mithep::Photon::GetMom() const
325 {
326 // Get momentum values from stored values.
327
328 fCachedMom.SetCoordinates(fMom.Pt(),fMom.Eta(),fMom.Phi(),fMom.M());
329 }
330
331 //--------------------------------------------------------------------------------------------------
332 inline void mithep::Photon::SetMom(Double_t px, Double_t py, Double_t pz, Double_t e)
333 {
334 // Set momentum vector.
335
336 fMom.SetXYZT(px, py, pz, e);
337 ClearMom();
338 }
339
340 //--------------------------------------------------------------------------------------------------
341 inline mithep::FourVectorM mithep::Photon::MomVtx(const ThreeVector &vtx) const
342 {
343 // Get momentum values from stored values.
344 ThreeVector momv = Mom3(vtx);
345 FourVectorM newmom;
346
347 newmom.SetCoordinates(momv.Rho(),momv.Eta(),momv.Phi(),0.);
348
349 return newmom;
350 }
351
352 #endif