PandaTree
Muon.h
1 #ifndef PandaTree_Objects_Muon_h
2 #define PandaTree_Objects_Muon_h
3 #include "Constants.h"
4 #include "Lepton.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 
10 namespace panda {
11 
12  class Muon : public Lepton {
13  public:
14  struct datastore : public Lepton::datastore {
16  ~datastore() { deallocate(); }
17 
18  /* Lepton
19  Float_t* pfPt{0};
20  Char_t* charge{0};
21  Bool_t* loose{0};
22  Bool_t* medium{0};
23  Bool_t* tight{0};
24  Bool_t* hltsafe{0};
25  Float_t* chIso{0};
26  Float_t* nhIso{0};
27  Float_t* phIso{0};
28  Float_t* puIso{0};
29  Float_t* dxy{0};
30  Float_t* dz{0};
31  ContainerBase const* matchedPFContainer_{0};
32  Short_t* matchedPF_{0};
33  ContainerBase const* matchedGenContainer_{0};
34  Short_t* matchedGen_{0};
35  ContainerBase const* vertexContainer_{0};
36  Short_t* vertex_{0};
37  */
38  Bool_t* mediumPrompt{0};
39  Bool_t* globalHighPt{0};
40  Bool_t* trkHighPt{0};
41  Bool_t* soft{0};
42  Bool_t* softMVA{0};
43  Bool_t* mvaLoose{0};
44  Bool_t* mvaMedium{0};
45  Bool_t* mvaTight{0};
46  Bool_t* pfIsoVeryLoose{0};
47  Bool_t* pfIsoLoose{0};
48  Bool_t* pfIsoMedium{0};
49  Bool_t* pfIsoTight{0};
50  Bool_t* pfIsoVeryTight{0};
51  Bool_t* tkIsoLoose{0};
52  Bool_t* tkIsoTight{0};
53  Bool_t* miniIsoLoose{0};
54  Bool_t* miniIsoMedium{0};
55  Bool_t* miniIsoTight{0};
56  Bool_t* miniIsoVeryTight{0};
57  Bool_t* global{0};
58  Bool_t* pf{0};
59  Bool_t* tracker{0};
60  Bool_t* standalone{0};
61  Bool_t* calo{0};
62  Bool_t* rpc{0};
63  Bool_t* gem{0};
64  Bool_t* me0{0};
65  Float_t* validFraction{0};
66  UShort_t* nValidMuon{0};
67  UShort_t* nValidPixel{0};
68  UShort_t* trkLayersWithMmt{0};
69  UShort_t* pixLayersWithMmt{0};
70  UShort_t* nMatched{0};
71  Float_t* normChi2{0};
72  UShort_t* chi2LocalPosition{0};
73  UShort_t* trkKink{0};
74  Float_t* segmentCompatibility{0};
75  Float_t* r03Iso{0};
76  Float_t* rochCorr{0};
77  Float_t* rochCorrErr{0};
78 
79  void allocate(UInt_t n) override;
80  void deallocate() override;
81  void setStatus(TTree&, TString const&, utils::BranchList const&) override;
82  utils::BranchList getStatus(TTree&, TString const&) const override;
83  utils::BranchList getBranchNames(TString const& = "") const override;
84  void setAddress(TTree&, TString const&, utils::BranchList const& = {"*"}, Bool_t setStatus = kTRUE) override;
85  void book(TTree&, TString const&, utils::BranchList const& = {"*"}, Bool_t dynamic = kTRUE) override;
86  void releaseTree(TTree&, TString const&) override;
87  void resizeVectors_(UInt_t) override;
88  };
89 
90  typedef Array<Muon> array_type;
92 
93  typedef Lepton base_type;
94 
95  Muon(char const* name = "");
96  Muon(Muon const&);
97  Muon(datastore&, UInt_t idx);
98  ~Muon();
99  Muon& operator=(Muon const&);
100 
101  static char const* typeName() { return "Muon"; }
102 
103  void print(std::ostream& = std::cout, UInt_t level = 1) const override;
104  void dump(std::ostream& = std::cout) const override;
105 
106  double m() const override { return 1.05658e-1; }
107  double combIso() const override { return chIso + std::max(nhIso + phIso - 0.5 * puIso, 0.); }
108 
109  /* Lepton
110  Float_t& pfPt; ///< for E: Pt of the dR-closest PF candidate; for Mu: pfP4().pt()
111  Char_t& charge;
112  Bool_t& loose;
113  Bool_t& medium;
114  Bool_t& tight;
115  Bool_t& hltsafe;
116  Float_t& chIso;
117  Float_t& nhIso;
118  Float_t& phIso;
119  Float_t& puIso;
120  Float_t& dxy;
121  Float_t& dz;
122  Ref<PFCandBase> matchedPF;
123  Ref<GenParticleBase> matchedGen;
124  Ref<Vertex> vertex;
125  */
126  Bool_t& mediumPrompt;
127  Bool_t& globalHighPt;
128  Bool_t& trkHighPt;
129  Bool_t& soft;
130  Bool_t& softMVA;
131  Bool_t& mvaLoose;
132  Bool_t& mvaMedium;
133  Bool_t& mvaTight;
134  Bool_t& pfIsoVeryLoose;
135  Bool_t& pfIsoLoose;
136  Bool_t& pfIsoMedium;
137  Bool_t& pfIsoTight;
138  Bool_t& pfIsoVeryTight;
139  Bool_t& tkIsoLoose;
140  Bool_t& tkIsoTight;
141  Bool_t& miniIsoLoose;
142  Bool_t& miniIsoMedium;
143  Bool_t& miniIsoTight;
144  Bool_t& miniIsoVeryTight;
145  Bool_t& global;
146  Bool_t& pf;
147  Bool_t& tracker;
148  Bool_t& standalone;
149  Bool_t& calo;
150  Bool_t& rpc;
151  Bool_t& gem;
152  Bool_t& me0;
153  Float_t& validFraction;
154  UShort_t& nValidMuon;
155  UShort_t& nValidPixel;
156  UShort_t& trkLayersWithMmt;
157  UShort_t& pixLayersWithMmt;
158  UShort_t& nMatched;
159  Float_t& normChi2;
160  UShort_t& chi2LocalPosition;
161  UShort_t& trkKink;
162  Float_t& segmentCompatibility;
163  Float_t& r03Iso;
164  Float_t& rochCorr;
165  Float_t& rochCorrErr;
166 
167  /* BEGIN CUSTOM Muon.h.classdef */
168  /* END CUSTOM */
169 
170  static utils::BranchList getListOfBranches();
171 
172  void destructor(Bool_t recursive = kFALSE);
173 
174  protected:
175  Muon(ArrayBase*);
176 
177  void doBook_(TTree&, TString const&, utils::BranchList const& = {"*"}) override;
178  void doInit_() override;
179  };
180 
181  typedef Array<Muon> MuonArray;
183  typedef Ref<Muon> MuonRef;
185 
186  /* BEGIN CUSTOM Muon.h.global */
187  /* END CUSTOM */
188 
189 }
190 
191 #endif
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
void dump(std::ostream &=std::cout) const override
Dump the object content.
Definition: Muon.cc:767
Template class for fixed-size container implementations. Inherits from base_type::array_type of the e...
Definition: Array.h:20
List of branch names.
Definition: IOUtils.h:64
Definition: Muon.h:12
Definition: Lepton.h:15
Definition: ParticleP.h:13
Definition: Muon.h:14
void resizeVectors_(UInt_t) override
Override when there are vector members.
Definition: Muon.cc:387
Definition: Array.h:11
A vector of references to elements in a container.
Definition: RefVector.h:18
Definition: Lepton.h:17
void print(std::ostream &=std::cout, UInt_t level=1) const override
Print the object content.
Definition: Muon.cc:746