ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Photon.h
Revision: 1.17
Committed: Fri Nov 14 14:46:35 2008 UTC (16 years, 5 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006
Changes since 1.16: +4 -4 lines
Log Message:
Convert more things to Double32

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.17 // $Id: Photon.h,v 1.16 2008/11/06 17:20:45 sixie Exp $
3 loizides 1.1 //
4     // Photon
5     //
6     // Details to be worked out...
7     //
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.4 #include "MitAna/DataTree/interface/Types.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.10 Photon() {}
25 loizides 1.6 Photon(Double_t px, Double_t py, Double_t pz, Double_t e) :
26 bendavid 1.17 fFourVector(FourVector(px,py,pz,e)) {}
27 loizides 1.1 ~Photon() {}
28 loizides 1.2
29 sixie 1.16 void AddConversion(Conversion *c) { fConversions.Add(c); }
30     Double_t Charge() const { return 0; }
31     Double_t R9() const { return fR9; }
32     Double_t R19() const { return fR19; }
33     Double_t E5x5() const { return fE5x5; }
34     Double_t HadOverEm() const { return fHadOverEm; }
35     Double_t HasPixelSeed() const { return fHasPixelSeed; }
36     Double_t EcalRecHitIso() const { return fEcalRecHitIso; }
37     Double_t HcalRecHitIso() const { return fHcalRecHitIso; }
38     Double_t SolidConeTrkIso() const { return fSolidConeTrkIso; }
39     Double_t HollowConeTrkIso() const { return fHollowConeTrkIso; }
40     Int_t SolidConeNTrk() const { return fSolidConeNTrk; }
41     Int_t HollowConeNTrk() const { return fHollowConeNTrk; }
42     Bool_t IsEBGap() const { return fIsEBGap; }
43     Bool_t IsEEGap() const { return fIsEEGap; }
44     Bool_t IsEBEEGap() const { return fIsEBEEGap; }
45     Bool_t IsLooseEM() const { return fIsLooseEM; }
46     Bool_t IsLoosePhoton() const { return fIsLoosePhoton; }
47     Bool_t IsTightPhoton() const { return fIsTightPhoton; }
48     Bool_t IsConverted() const { return fIsConverted; }
49 loizides 1.8 const Conversion *ConvCand(UInt_t i) const { return fConversions.At(i); }
50     UInt_t NConversions() const { return fConversions.GetEntries(); }
51 bendavid 1.14 const SuperCluster *SCluster() const;
52 bendavid 1.17 FourVector Mom() const { return FourVector(fFourVector); }
53 sixie 1.16 void Clear(Option_t *opt="") { fConversions.Clear(opt); }
54 bendavid 1.13 void SetIsConverted(Bool_t isConv) { fIsConverted = isConv; }
55 loizides 1.2 void SetMom(Double_t px, Double_t py, Double_t pz, Double_t e);
56 bendavid 1.14 void SetSuperCluster(SuperCluster* sc) { fSuperClusterRef = sc; }
57 sixie 1.16 void SetR9(Double_t x) { fR9 = x; }
58     void SetR19(Double_t x) { fR19 = x; }
59     void SetE5x5(Double_t x) { fE5x5 = x; }
60     void SetHadOverEm(Double_t x) { fHadOverEm = x; }
61     void SetHasPixelSeed(Double_t x) { fHasPixelSeed = x; }
62     void SetEcalRecHitIso(Double_t x) { fEcalRecHitIso = x; }
63     void SetHcalRecHitIso(Double_t x) { fHcalRecHitIso = x; }
64     void SetSolidConeTrkIso(Double_t x) { fSolidConeTrkIso = x; }
65     void SetHollowConeTrkIso(Double_t x) { fHollowConeTrkIso = x; }
66     void SetSolidConeNTrk(Int_t x) { fSolidConeNTrk = x; }
67     void SetHollowConeNTrk(Int_t x) { fHollowConeNTrk = x; }
68     void SetIsEBGap(Bool_t x) { fIsEBGap = x; }
69     void SetIsEEGap(Bool_t x) { fIsEEGap = x; }
70     void SetIsEBEEGap(Bool_t x) { fIsEBEEGap = x; }
71     void SetIsLooseEM(Bool_t x) { fIsLooseEM = x; }
72     void SetIsLoosePhoton(Bool_t x) { fIsLoosePhoton = x; }
73     void SetIsTightPhoton(Bool_t x) { fIsTightPhoton = x; }
74    
75 loizides 1.1 protected:
76 bendavid 1.17 FourVectorM32 fFourVector; //four momentum vector
77 sixie 1.16 Double32_t fR9;
78     Double32_t fR19;
79     Double32_t fE5x5;
80     Double32_t fHadOverEm;
81     Double32_t fHasPixelSeed;
82     Double32_t fEcalRecHitIso;
83     Double32_t fHcalRecHitIso;
84     Double32_t fSolidConeTrkIso;
85     Double32_t fHollowConeTrkIso;
86     Int_t fSolidConeNTrk;
87     Int_t fHollowConeNTrk;
88     Bool_t fIsEBGap;
89     Bool_t fIsEEGap;
90     Bool_t fIsEBEEGap;
91     Bool_t fIsLooseEM;
92     Bool_t fIsLoosePhoton;
93     Bool_t fIsTightPhoton;
94 bendavid 1.15 RefArray<Conversion,128> fConversions; //references to associated conversion candidates
95 bendavid 1.13 Bool_t fIsConverted; //conversion flag
96 bendavid 1.14 TRef fSuperClusterRef; //superCluster
97 loizides 1.1
98 loizides 1.2 ClassDef(Photon,1) // Photon class
99 loizides 1.1 };
100     }
101 loizides 1.2
102     //--------------------------------------------------------------------------------------------------
103     inline void mithep::Photon::SetMom(Double_t px, Double_t py, Double_t pz, Double_t e)
104     {
105     // Set four vector.
106    
107     fFourVector.SetXYZT(px, py, pz, e);
108     }
109 bendavid 1.14
110     //--------------------------------------------------------------------------------------------------
111     inline const mithep::SuperCluster *mithep::Photon::SCluster() const
112     {
113     // Return Super cluster
114    
115     return static_cast<const SuperCluster*>(fSuperClusterRef.GetObject());
116     }
117 loizides 1.1 #endif