PandaTree
Tau.h
1 #ifndef PandaTree_Objects_Tau_h
2 #define PandaTree_Objects_Tau_h
3 #include "Constants.h"
4 #include "ParticleM.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 "Vertex.h"
10 #include "GenParticleBase.h"
11 
12 namespace panda {
13 
14  class Tau : public ParticleM {
15  public:
16  struct datastore : public ParticleM::datastore {
18  ~datastore() { deallocate(); }
19 
20  Char_t* charge{0};
21  Bool_t* decayMode{0};
22  Bool_t* decayModeNew{0};
23  Bool_t* looseIsoMVA{0};
24  Bool_t* looseIsoMVAOld{0};
25  Float_t* iso{0};
26  Float_t* isoDeltaBetaCorr{0};
27  ContainerBase const* vertexContainer_{0};
28  Short_t* vertex_{0};
29  ContainerBase const* matchedGenContainer_{0};
30  Short_t* matchedGen_{0};
31 
32  void allocate(UInt_t n) override;
33  void deallocate() override;
34  void setStatus(TTree&, TString const&, utils::BranchList const&) override;
35  utils::BranchList getStatus(TTree&, TString const&) const override;
36  utils::BranchList getBranchNames(TString const& = "") const override;
37  void setAddress(TTree&, TString const&, utils::BranchList const& = {"*"}, Bool_t setStatus = kTRUE) override;
38  void book(TTree&, TString const&, utils::BranchList const& = {"*"}, Bool_t dynamic = kTRUE) override;
39  void releaseTree(TTree&, TString const&) override;
40  void resizeVectors_(UInt_t) override;
41  };
42 
43  typedef Array<Tau> array_type;
45 
46  typedef ParticleM base_type;
47 
48  Tau(char const* name = "");
49  Tau(Tau const&);
50  Tau(datastore&, UInt_t idx);
51  ~Tau();
52  Tau& operator=(Tau const&);
53 
54  static char const* typeName() { return "Tau"; }
55 
56  void print(std::ostream& = std::cout, UInt_t level = 1) const override;
57  void dump(std::ostream& = std::cout) const override;
58 
59  Char_t& charge;
60  Bool_t& decayMode;
61  Bool_t& decayModeNew;
62  Bool_t& looseIsoMVA;
63  Bool_t& looseIsoMVAOld;
64  Float_t& iso;
65  Float_t& isoDeltaBetaCorr;
66  Ref<Vertex> vertex;
67  Ref<GenParticleBase> matchedGen;
68 
69  /* BEGIN CUSTOM Tau.h.classdef */
70  /* END CUSTOM */
71 
72  static utils::BranchList getListOfBranches();
73 
74  void destructor(Bool_t recursive = kFALSE);
75 
76  protected:
77  Tau(ArrayBase*);
78 
79  void doBook_(TTree&, TString const&, utils::BranchList const& = {"*"}) override;
80  void doInit_() override;
81  };
82 
83  typedef Array<Tau> TauArray;
85  typedef Ref<Tau> TauRef;
87 
88  /* BEGIN CUSTOM Tau.h.global */
89  /* END CUSTOM */
90 
91 }
92 
93 #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
Template class for fixed-size container implementations. Inherits from base_type::array_type of the e...
Definition: Array.h:20
void print(std::ostream &=std::cout, UInt_t level=1) const override
Print the object content.
Definition: Tau.cc:281
List of branch names.
Definition: IOUtils.h:64
Base class for all containers.
Definition: ContainerBase.h:18
Definition: ParticleM.h:13
void dump(std::ostream &=std::cout) const override
Dump the object content.
Definition: Tau.cc:289
Definition: ParticleM.h:15
Definition: Tau.h:16
Definition: Tau.h:14
Base class for elements of containers.
Definition: Element.h:32
Definition: Array.h:11
A vector of references to elements in a container.
Definition: RefVector.h:18
void resizeVectors_(UInt_t) override
Override when there are vector members.
Definition: Tau.cc:139