1 |
//--------------------------------------------------------------------------------------------------
|
2 |
// $Id: Photon.h,v 1.30 2009/07/21 16:34:46 bendavid Exp $
|
3 |
//
|
4 |
// Photon
|
5 |
//
|
6 |
// This class holds the reconstructed photon quantities.
|
7 |
//
|
8 |
// Authors: J.Bendavid, C.Loizides
|
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/DataCont/interface/RefArray.h"
|
18 |
|
19 |
namespace mithep
|
20 |
{
|
21 |
class Photon : public Particle
|
22 |
{
|
23 |
public:
|
24 |
Photon() :
|
25 |
fR9(0),fHadOverEm(0),fEcalRecHitIso(0),fHcalRecHitIso(0), fHcalTowerSumEtDr04(0),
|
26 |
fHcalDepth1TowerSumEtDr04(0), fHcalDepth2TowerSumEtDr04(0), fSolidConeTrkIso(0),
|
27 |
fHollowConeTrkIso(0),fSolidConeNTrk(0),fHollowConeNTrk(0), fEcalRecHitIsoDr03(0),
|
28 |
fHcalTowerSumEtDr03(0), fHcalDepth1TowerSumEtDr03(0), fHcalDepth2TowerSumEtDr03(0),
|
29 |
fSolidConeTrkIsoDr03(0), fHollowConeTrkIsoDr03(0),fSolidConeNTrkDr03(0),
|
30 |
fHollowConeNTrkDr03(0), fHasPixelSeed(0), fIsEB(0), fIsEE(0), fIsEBGap(0),
|
31 |
fIsEEGap(0),fIsEBEEGap(0), fIsLooseEM(0),fIsLoosePhoton(0), fIsTightPhoton(0),
|
32 |
fIsConverted(0) {}
|
33 |
Photon(Double_t px, Double_t py, Double_t pz, Double_t e) :
|
34 |
fMom(FourVector(px,py,pz,e)),
|
35 |
fR9(0),fHadOverEm(0),fEcalRecHitIso(0),fHcalRecHitIso(0), fHcalTowerSumEtDr04(0),
|
36 |
fHcalDepth1TowerSumEtDr04(0), fHcalDepth2TowerSumEtDr04(0), fSolidConeTrkIso(0),
|
37 |
fHollowConeTrkIso(0),fSolidConeNTrk(0),fHollowConeNTrk(0), fEcalRecHitIsoDr03(0),
|
38 |
fHcalTowerSumEtDr03(0), fHcalDepth1TowerSumEtDr03(0), fHcalDepth2TowerSumEtDr03(0),
|
39 |
fSolidConeTrkIsoDr03(0), fHollowConeTrkIsoDr03(0),fSolidConeNTrkDr03(0),
|
40 |
fHollowConeNTrkDr03(0), fHasPixelSeed(0), fIsEB(0), fIsEE(0), fIsEBGap(0),
|
41 |
fIsEEGap(0),fIsEBEEGap(0), fIsLooseEM(0),fIsLoosePhoton(0), fIsTightPhoton(0),
|
42 |
fIsConverted(0) {}
|
43 |
|
44 |
const Conversion *ConvCand(UInt_t i) const { return fConversions.At(i); }
|
45 |
Double_t EcalRecHitIsoDr03() const { return fEcalRecHitIsoDr03; }
|
46 |
Double_t EcalRecHitIsoDr04() const { return fEcalRecHitIso; }
|
47 |
Double_t HadOverEm() const { return fHadOverEm; }
|
48 |
Bool_t HasPixelSeed() const { return fHasPixelSeed; }
|
49 |
Double_t HcalDepth1TowerSumEtDr03() const { return fHcalDepth1TowerSumEtDr03; }
|
50 |
Double_t HcalDepth1TowerSumEtDr04() const { return fHcalDepth1TowerSumEtDr04; }
|
51 |
Double_t HcalDepth2TowerSumEtDr03() const { return fHcalDepth2TowerSumEtDr03; }
|
52 |
Double_t HcalDepth2TowerSumEtDr04() const { return fHcalDepth2TowerSumEtDr03; }
|
53 |
Double_t HcalRecHitIso() const { return fHcalRecHitIso; } // *DEPRECATED*
|
54 |
Double_t HcalTowerSumEtDr03() const { return fHcalTowerSumEtDr03; }
|
55 |
Double_t HcalTowerSumEtDr04() const { return fHcalTowerSumEtDr03; }
|
56 |
UShort_t HollowConeNTrkDr03() const { return fHollowConeNTrkDr03; }
|
57 |
UShort_t HollowConeNTrkDr04() const { return fHollowConeNTrk; }
|
58 |
Double_t HollowConeTrkIsoDr03() const { return fHollowConeTrkIsoDr03; }
|
59 |
Double_t HollowConeTrkIsoDr04() const { return fHollowConeTrkIso; }
|
60 |
Bool_t IsEB() const { return fIsEB; }
|
61 |
Bool_t IsEE() const { return fIsEE; }
|
62 |
Bool_t IsEBGap() const { return fIsEBGap; }
|
63 |
Bool_t IsEEGap() const { return fIsEEGap; }
|
64 |
Bool_t IsEBEEGap() const { return fIsEBEEGap; }
|
65 |
Bool_t IsLooseEM() const { return fIsLooseEM; } // *DEPRECATED*
|
66 |
Bool_t IsLoosePhoton() const { return fIsLoosePhoton; }
|
67 |
Bool_t IsTightPhoton() const { return fIsTightPhoton; }
|
68 |
Bool_t IsConverted() const { return fIsConverted; }
|
69 |
UInt_t NConversions() const { return fConversions.Entries(); }
|
70 |
EObjType ObjType() const { return kPhoton; }
|
71 |
Double_t R9() const { return fR9; }
|
72 |
const SuperCluster *SCluster() const { return fSuperClusterRef.Obj(); }
|
73 |
Double_t SolidConeTrkIsoDr03() const { return fSolidConeTrkIsoDr03; }
|
74 |
Double_t SolidConeTrkIsoDr04() const { return fSolidConeTrkIso; }
|
75 |
UShort_t SolidConeNTrkDr03() const { return fSolidConeNTrkDr03; }
|
76 |
UShort_t SolidConeNTrkDr04() const { return fSolidConeNTrk; }
|
77 |
void AddConversion(const Conversion *c) { fConversions.Add(c); }
|
78 |
void SetIsConverted(Bool_t isConv) { fIsConverted = isConv; }
|
79 |
void SetMom(Double_t px, Double_t py, Double_t pz, Double_t e);
|
80 |
void SetSuperCluster(const SuperCluster* sc) { fSuperClusterRef = sc; }
|
81 |
void SetR9(Double_t x) { fR9 = x; }
|
82 |
void SetHadOverEm(Double_t x) { fHadOverEm = x; }
|
83 |
void SetHasPixelSeed(Bool_t x) { fHasPixelSeed = x; }
|
84 |
void SetEcalRecHitIsoDr04(Double_t x) { fEcalRecHitIso = x; }
|
85 |
void SetHcalTowerSumEtDr04(Double_t x) { fHcalTowerSumEtDr04 = x; }
|
86 |
void SetHcalDepth1TowerSumEtDr04(Double_t x) { fHcalDepth1TowerSumEtDr04 = x; }
|
87 |
void SetHcalDepth2TowerSumEtDr04(Double_t x) { fHcalDepth2TowerSumEtDr04 = x; }
|
88 |
void SetSolidConeTrkIsoDr04(Double_t x) { fSolidConeTrkIso = x; }
|
89 |
void SetHollowConeTrkIsoDr04(Double_t x) { fHollowConeTrkIso = x; }
|
90 |
void SetSolidConeNTrkDr04(UShort_t x) { fSolidConeNTrk = x; }
|
91 |
void SetHollowConeNTrkDr04(UShort_t x) { fHollowConeNTrk = x; }
|
92 |
void SetEcalRecHitIsoDr03(Double_t x) { fEcalRecHitIsoDr03 = x; }
|
93 |
void SetHcalTowerSumEtDr03(Double_t x) { fHcalTowerSumEtDr03 = x; }
|
94 |
void SetHcalDepth1TowerSumEtDr03(Double_t x) { fHcalDepth1TowerSumEtDr03 = x; }
|
95 |
void SetHcalDepth2TowerSumEtDr03(Double_t x) { fHcalDepth2TowerSumEtDr03 = x; }
|
96 |
void SetSolidConeTrkIsoDr03(Double_t x) { fSolidConeTrkIsoDr03 = x; }
|
97 |
void SetHollowConeTrkIsoDr03(Double_t x) { fHollowConeTrkIsoDr03 = x; }
|
98 |
void SetSolidConeNTrkDr03(UShort_t x) { fSolidConeNTrkDr03 = x; }
|
99 |
void SetHollowConeNTrkDr03(UShort_t x) { fHollowConeNTrkDr03 = x; }
|
100 |
void SetIsEB(Bool_t x) { fIsEB = x; }
|
101 |
void SetIsEE(Bool_t x) { fIsEE = x; }
|
102 |
void SetIsEBGap(Bool_t x) { fIsEBGap = x; }
|
103 |
void SetIsEEGap(Bool_t x) { fIsEEGap = x; }
|
104 |
void SetIsEBEEGap(Bool_t x) { fIsEBEEGap = x; }
|
105 |
void SetIsLooseEM(Bool_t x) { fIsLooseEM = x; }
|
106 |
void SetIsLoosePhoton(Bool_t x) { fIsLoosePhoton = x; }
|
107 |
void SetIsTightPhoton(Bool_t x) { fIsTightPhoton = x; }
|
108 |
|
109 |
protected:
|
110 |
void GetMom() const;
|
111 |
|
112 |
Vect4M fMom; //four momentum vector
|
113 |
Double32_t fR9; //[0,0,14]r9=e3x3/etotal variable
|
114 |
Double32_t fHadOverEm; //[0,0,14]hadronic over em fraction
|
115 |
Double32_t fEcalRecHitIso; //[0,0,14]ecal rechit based isolation dR 0.4 *RENAMING*
|
116 |
Double32_t fHcalRecHitIso; //[0,0,14]hcal rechit based isolation dR 0.4 - *DEPRECATED*
|
117 |
Double32_t fHcalTowerSumEtDr04; //[0,0,14]hcal tower based isolation dR 0.4
|
118 |
Double32_t fHcalDepth1TowerSumEtDr04; //[0,0,14]hcal depth1 tower based isolation dR 0.4
|
119 |
Double32_t fHcalDepth2TowerSumEtDr04; //[0,0,14]hcal depth2 tower based isolation dR 0.4
|
120 |
Double32_t fSolidConeTrkIso; //[0,0,14]sum track pT in cone of dR 0.4 *RENAMING*
|
121 |
Double32_t fHollowConeTrkIso; //[0,0,14]as above excluding the core, dR 0.4 *RENAMING*
|
122 |
UShort_t fSolidConeNTrk; //number of tracks in a cone of dR 0.4 *RENAMING*
|
123 |
UShort_t fHollowConeNTrk; //as above excluding the core, dR 0.4 *RENAMING*
|
124 |
Double32_t fEcalRecHitIsoDr03; //[0,0,14]ecal rechit based isolation dR 0.3
|
125 |
Double32_t fHcalTowerSumEtDr03; //[0,0,14] hcal tower based isolation dR 0.3
|
126 |
Double32_t fHcalDepth1TowerSumEtDr03; //[0,0,14]hcal depth1 tower based isolation dR 0.3
|
127 |
Double32_t fHcalDepth2TowerSumEtDr03; //[0,0,14]hcal depth2 tower based isolation dR 0.3
|
128 |
Double32_t fSolidConeTrkIsoDr03; //[0,0,14]sum track pT in cone of dR 0.3
|
129 |
Double32_t fHollowConeTrkIsoDr03; //[0,0,14]as above excluding the core, dR 0.3
|
130 |
UShort_t fSolidConeNTrkDr03; //number of tracks in a cone of dR 0.3
|
131 |
UShort_t fHollowConeNTrkDr03; //as above excluding the core, dR 0.3
|
132 |
Bool_t fHasPixelSeed; //=true if super cluster has matched seed
|
133 |
Bool_t fIsEB; //=true if photon is ECal barrel
|
134 |
Bool_t fIsEE; //=true if photon is ECAL endcap
|
135 |
Bool_t fIsEBGap; //=true photon is in ECAL barrel crystal gap
|
136 |
Bool_t fIsEEGap; //=true photon is in ECAL endcap crystal gap
|
137 |
Bool_t fIsEBEEGap; //=true photon is in boundary between EB/EE
|
138 |
Bool_t fIsLooseEM; //=true if loose em cuts are passed *DEPRECATED*
|
139 |
// LooseEM corresponds to supercluster preselection in 3_1_X
|
140 |
//so this variable is now always true for photon objects
|
141 |
Bool_t fIsLoosePhoton; //=true if loose photon cuts are passed
|
142 |
Bool_t fIsTightPhoton; //=true if tight photon cuts are passed
|
143 |
Bool_t fIsConverted; //=true if photon converted
|
144 |
RefArray<Conversion> fConversions; //refs to associated conversion candidates
|
145 |
Ref<SuperCluster> fSuperClusterRef; //ref to associated super cluster
|
146 |
|
147 |
ClassDef(Photon,2) // Photon class
|
148 |
};
|
149 |
}
|
150 |
|
151 |
//--------------------------------------------------------------------------------------------------
|
152 |
inline void mithep::Photon::GetMom() const
|
153 |
{
|
154 |
// Get momentum values from stored values.
|
155 |
|
156 |
fCachedMom.SetCoordinates(fMom.Pt(),fMom.Eta(),fMom.Phi(),fMom.M());
|
157 |
}
|
158 |
|
159 |
//--------------------------------------------------------------------------------------------------
|
160 |
inline void mithep::Photon::SetMom(Double_t px, Double_t py, Double_t pz, Double_t e)
|
161 |
{
|
162 |
// Set momentum vector.
|
163 |
|
164 |
fMom.SetXYZT(px, py, pz, e);
|
165 |
ClearMom();
|
166 |
}
|
167 |
#endif
|