PandaTree
Photon.h
1 #ifndef PandaTree_Objects_Photon_h
2 #define PandaTree_Objects_Photon_h
3 #include "Constants.h"
4 #include "ParticleP.h"
5 #include "../../Framework/interface/Array.h"
6 #include "../../Framework/interface/Collection.h"
7 #include "../../Framework/interface/Ref.h"
8 #include "../../Framework/interface/RefVector.h"
9 #include "SuperCluster.h"
10 #include "PFCandBase.h"
11 #include "GenParticleBase.h"
12 
13 namespace panda {
14 
15  class Photon : public ParticleP {
16  public:
17  struct datastore : public ParticleP::datastore {
19  ~datastore() { deallocate(); }
20 
21  Float_t* pfPt{0};
22  Float_t* chIso{0};
23  Float_t* chIsoMax{0};
24  Float_t* nhIso{0};
25  Float_t* phIso{0};
26  Float_t* sieie{0};
27  Float_t* sipip{0};
28  Float_t* hOverE{0};
29  Float_t* mipEnergy{0};
30  Float_t* emax{0};
31  Float_t* e2nd{0};
32  Float_t* eleft{0};
33  Float_t* eright{0};
34  Float_t* etop{0};
35  Float_t* ebottom{0};
36  Float_t* r9{0};
37  Float_t* etaWidth{0};
38  Float_t* phiWidth{0};
39  Float_t* time{0};
40  Float_t* timeSpan{0};
41  Float_t* alphaSeed{0};
42  Float_t* betaSeed{0};
43  Float_t* t0Seed{0};
44  Float_t* ampSeed{0};
45  Float_t* regPt{0};
46  Float_t* smearedPt{0};
47  UShort_t* ix{0};
48  UShort_t* iy{0};
49  Bool_t* loose{0};
50  Bool_t* medium{0};
51  Bool_t* tight{0};
52  Bool_t* highpt{0};
53  Bool_t* pixelVeto{0};
54  Bool_t* csafeVeto{0};
55  Bool_t* pfchVeto{0};
56  ContainerBase const* superClusterContainer_{0};
57  Short_t* superCluster_{0};
58  ContainerBase const* matchedPFContainer_{0};
59  Short_t* matchedPF_{0};
60  ContainerBase const* matchedGenContainer_{0};
61  Short_t* matchedGen_{0};
62 
63  void allocate(UInt_t n) override;
64  void deallocate() override;
65  void setStatus(TTree&, TString const&, utils::BranchList const&) override;
66  utils::BranchList getStatus(TTree&, TString const&) const override;
67  utils::BranchList getBranchNames(TString const& = "") const override;
68  void setAddress(TTree&, TString const&, utils::BranchList const& = {"*"}, Bool_t setStatus = kTRUE) override;
69  void book(TTree&, TString const&, utils::BranchList const& = {"*"}, Bool_t dynamic = kTRUE) override;
70  void releaseTree(TTree&, TString const&) override;
71  void resizeVectors_(UInt_t) override;
72  };
73 
74  typedef Array<Photon> array_type;
76 
77  typedef ParticleP base_type;
78 
79  Photon(char const* name = "");
80  Photon(Photon const&);
81  Photon(datastore&, UInt_t idx);
82  ~Photon();
83  Photon& operator=(Photon const&);
84 
85  static char const* typeName() { return "Photon"; }
86 
87  void print(std::ostream& = std::cout, UInt_t level = 1) const override;
88  void dump(std::ostream& = std::cout) const override;
89 
90  Float_t& pfPt;
91  Float_t& chIso;
92  Float_t& chIsoMax;
93  Float_t& nhIso;
94  Float_t& phIso;
95  Float_t& sieie;
96  Float_t& sipip;
97  Float_t& hOverE;
98  Float_t& mipEnergy;
99  Float_t& emax;
100  Float_t& e2nd;
101  Float_t& eleft;
102  Float_t& eright;
103  Float_t& etop;
104  Float_t& ebottom;
105  Float_t& r9;
106  Float_t& etaWidth;
107  Float_t& phiWidth;
108  Float_t& time;
109  Float_t& timeSpan;
110  Float_t& alphaSeed;
111  Float_t& betaSeed;
112  Float_t& t0Seed;
113  Float_t& ampSeed;
114  Float_t& regPt;
115  Float_t& smearedPt;
116  UShort_t& ix;
117  UShort_t& iy;
118  Bool_t& loose;
119  Bool_t& medium;
120  Bool_t& tight;
121  Bool_t& highpt;
122  Bool_t& pixelVeto;
123  Bool_t& csafeVeto;
124  Bool_t& pfchVeto;
125  Ref<SuperCluster> superCluster;
126  Ref<PFCandBase> matchedPF;
127  Ref<GenParticleBase> matchedGen;
128 
129  /* BEGIN CUSTOM Photon.h.classdef */
130  /* END CUSTOM */
131 
132  static utils::BranchList getListOfBranches();
133 
134  void destructor(Bool_t recursive = kFALSE);
135 
136  protected:
137  Photon(ArrayBase*);
138 
139  void doBook_(TTree&, TString const&, utils::BranchList const& = {"*"}) override;
140  void doInit_() override;
141  };
142 
143  typedef Array<Photon> PhotonArray;
145  typedef Ref<Photon> PhotonRef;
147 
148  /* BEGIN CUSTOM Photon.h.global */
149  /* END CUSTOM */
150 
151 }
152 
153 #endif
Definition: ParticleP.h:15
Base class for fixed-size containers.
Definition: ArrayBase.h:13
A reference to an element in a container.
Definition: Ref.h:20
Base class for dynamic-size containers.
Definition: CollectionBase.h:16
Template class for fixed-size container implementations. Inherits from base_type::array_type of the e...
Definition: Array.h:20
Definition: Photon.h:17
List of branch names.
Definition: IOUtils.h:64
Float_t & pfPt
Pt of the dR-closest PF candidate.
Definition: Photon.h:90
Definition: ParticleP.h:13
void print(std::ostream &=std::cout, UInt_t level=1) const override
Print the object content.
Definition: Photon.cc:716
Base class for all containers.
Definition: ContainerBase.h:18
void resizeVectors_(UInt_t) override
Override when there are vector members.
Definition: Photon.cc:371
Definition: Photon.h:15
Base class for elements of containers.
Definition: Element.h:32
void dump(std::ostream &=std::cout) const override
Dump the object content.
Definition: Photon.cc:745
Definition: Array.h:11
A vector of references to elements in a container.
Definition: RefVector.h:18