ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Photon.h
Revision: 1.24
Committed: Wed Mar 18 15:44:32 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_009c, Mit_009b, Mit_009a, Mit_009, Mit_008
Changes since 1.23: +39 -37 lines
Log Message:
Introduced Double32_t [0,0,14] consistently. Updated class descriptions.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.24 // $Id: Photon.h,v 1.23 2009/03/03 18:03:06 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 loizides 1.4 #include "MitAna/DataTree/interface/Types.h"
16 bendavid 1.3 #include "MitAna/DataTree/interface/Particle.h"
17     #include "MitAna/DataTree/interface/Conversion.h"
18 loizides 1.11 #include "MitAna/DataCont/interface/RefArray.h"
19 loizides 1.1
20     namespace mithep
21     {
22 bendavid 1.3 class Photon : public Particle
23 loizides 1.1 {
24     public:
25 loizides 1.24 Photon() : fR9(0),fHadOverEm(0),fEcalRecHitIso(0),fHcalRecHitIso(0),fSolidConeTrkIso(0),
26     fHollowConeTrkIso(0),fSolidConeNTrk(0),fHollowConeNTrk(0),fHasPixelSeed(0),
27     fIsEBGap(0),fIsEEGap(0),fIsEBEEGap(0),fIsLooseEM(0),fIsLoosePhoton(0),
28     fIsTightPhoton(0),fIsConverted(0) {}
29 loizides 1.21 Photon(Double_t px, Double_t py, Double_t pz, Double_t e) :
30 loizides 1.24 fMom(FourVector(px,py,pz,e)),
31     fR9(0),fHadOverEm(0),fEcalRecHitIso(0),fHcalRecHitIso(0),fSolidConeTrkIso(0),
32     fHollowConeTrkIso(0),fSolidConeNTrk(0),fHollowConeNTrk(0),fHasPixelSeed(0),
33     fIsEBGap(0),fIsEEGap(0),fIsEBEEGap(0),fIsLooseEM(0),fIsLoosePhoton(0),
34     fIsTightPhoton(0),fIsConverted(0) {}
35 loizides 1.2
36 loizides 1.19 const Conversion *ConvCand(UInt_t i) const { return fConversions.At(i); }
37     Double_t EcalRecHitIso() const { return fEcalRecHitIso; }
38 sixie 1.16 Double_t HadOverEm() const { return fHadOverEm; }
39 loizides 1.24 Bool_t HasPixelSeed() const { return fHasPixelSeed; }
40 sixie 1.16 Double_t HcalRecHitIso() const { return fHcalRecHitIso; }
41 loizides 1.24 UShort_t HollowConeNTrk() const { return fHollowConeNTrk; }
42 sixie 1.16 Double_t HollowConeTrkIso() const { return fHollowConeTrkIso; }
43     Bool_t IsEBGap() const { return fIsEBGap; }
44     Bool_t IsEEGap() const { return fIsEEGap; }
45     Bool_t IsEBEEGap() const { return fIsEBEEGap; }
46     Bool_t IsLooseEM() const { return fIsLooseEM; }
47     Bool_t IsLoosePhoton() const { return fIsLoosePhoton; }
48     Bool_t IsTightPhoton() const { return fIsTightPhoton; }
49     Bool_t IsConverted() const { return fIsConverted; }
50 loizides 1.21 UInt_t NConversions() const { return fConversions.Entries(); }
51     EObjType ObjType() const { return kPhoton; }
52     Double_t R9() const { return fR9; }
53     const SuperCluster *SCluster() const { return fSuperClusterRef.Obj(); }
54     Double_t SolidConeTrkIso() const { return fSolidConeTrkIso; }
55 loizides 1.24 UShort_t SolidConeNTrk() const { return fSolidConeNTrk; }
56     void AddConversion(const Conversion *c) { fConversions.Add(c); }
57 loizides 1.21 void SetIsConverted(Bool_t isConv) { fIsConverted = isConv; }
58 loizides 1.2 void SetMom(Double_t px, Double_t py, Double_t pz, Double_t e);
59 bendavid 1.20 void SetSuperCluster(const SuperCluster* sc) { fSuperClusterRef = sc; }
60 sixie 1.16 void SetR9(Double_t x) { fR9 = x; }
61     void SetHadOverEm(Double_t x) { fHadOverEm = x; }
62 loizides 1.24 void SetHasPixelSeed(Bool_t x) { fHasPixelSeed = x; }
63 sixie 1.16 void SetEcalRecHitIso(Double_t x) { fEcalRecHitIso = x; }
64     void SetHcalRecHitIso(Double_t x) { fHcalRecHitIso = x; }
65     void SetSolidConeTrkIso(Double_t x) { fSolidConeTrkIso = x; }
66     void SetHollowConeTrkIso(Double_t x) { fHollowConeTrkIso = x; }
67 loizides 1.24 void SetSolidConeNTrk(UShort_t x) { fSolidConeNTrk = x; }
68     void SetHollowConeNTrk(UShort_t x) { fHollowConeNTrk = x; }
69 sixie 1.16 void SetIsEBGap(Bool_t x) { fIsEBGap = x; }
70     void SetIsEEGap(Bool_t x) { fIsEEGap = x; }
71     void SetIsEBEEGap(Bool_t x) { fIsEBEEGap = x; }
72     void SetIsLooseEM(Bool_t x) { fIsLooseEM = x; }
73     void SetIsLoosePhoton(Bool_t x) { fIsLoosePhoton = x; }
74     void SetIsTightPhoton(Bool_t x) { fIsTightPhoton = x; }
75    
76 loizides 1.1 protected:
77 loizides 1.21 void GetMom() const;
78    
79 loizides 1.24 Vect4M fMom; //four momentum vector
80     Double32_t fR9; //[0,0,14]r9=e3x3/etotal variable
81     Double32_t fHadOverEm; //[0,0,14]hadronic over em fraction
82     Double32_t fEcalRecHitIso; //[0,0,14]ecal rechit based isolation
83     Double32_t fHcalRecHitIso; //[0,0,14]hcal rechit based isolation
84     Double32_t fSolidConeTrkIso; //[0,0,14]sum track pT in cone of dR
85     Double32_t fHollowConeTrkIso; //[0,0,14]as above excluding the core
86     UShort_t fSolidConeNTrk; //number of tracks in a cone of dR
87     UShort_t fHollowConeNTrk; //as above excluding the core
88     Bool_t fHasPixelSeed; //=true if super cluster has matched seed
89     Bool_t fIsEBGap; //=true photon is in ECAL barrel
90     Bool_t fIsEEGap; //=true photon is in ECAL endcap
91     Bool_t fIsEBEEGap; //=true photon is in boundary between EB/EE
92     Bool_t fIsLooseEM; //=true if loose em cuts are passed
93     Bool_t fIsLoosePhoton; //=true if loose photon cuts are passed
94     Bool_t fIsTightPhoton; //=true if tight photon cuts are passed
95     Bool_t fIsConverted; //=true if photon converted
96     RefArray<Conversion> fConversions; //refs to associated conversion candidates
97     Ref<SuperCluster> fSuperClusterRef; //ref to associated super cluster
98 loizides 1.1
99 loizides 1.2 ClassDef(Photon,1) // Photon class
100 loizides 1.1 };
101     }
102 loizides 1.2
103     //--------------------------------------------------------------------------------------------------
104 loizides 1.21 inline void mithep::Photon::GetMom() const
105     {
106     // Get momentum values from stored values.
107    
108 loizides 1.24 fCachedMom.SetCoordinates(fMom.Pt(),fMom.Eta(),fMom.Phi(),fMom.M());
109 loizides 1.21 }
110    
111     //--------------------------------------------------------------------------------------------------
112 loizides 1.2 inline void mithep::Photon::SetMom(Double_t px, Double_t py, Double_t pz, Double_t e)
113     {
114 loizides 1.21 // Set momentum vector.
115 loizides 1.2
116 loizides 1.21 fMom.SetXYZT(px, py, pz, e);
117 bendavid 1.22 ClearMom();
118 loizides 1.2 }
119 loizides 1.1 #endif