StructuredRecoTree.h
Go to the documentation of this file.
1 /*
2  * StructuredRecoTree.h
3  *
4  * Created on: Feb 18, 2021
5  * Author: chilgenb
6  */
7 
8 #ifndef GARANA_STRUCTUREDRECOTREE_H_
9 #define GARANA_STRUCTUREDRECOTREE_H_
10 
11 #include "garana/Base/RecoTree.h"
12 
13 //using std::vector;
14 using namespace std;
15 
16 namespace garana {
17 
18  class StructuredRecoTree : public RecoTree {
19 
20  public:
21 
22  //StructuredRecoTree() {}
23  StructuredRecoTree(TTree* tree=0);
24 
25  // sizes
26  const size_t NTrack() const override;
27  const size_t NVertex() const override;
28  const size_t NVee() const override;
29  const size_t NCalCluster() const override;
30 
31  // track
32  const TLorentzVector* TrackVertex(const size_t& itrack) const override;
33  const TLorentzVector* TrackEnd(const size_t& itrack) const override;
34  const size_t NTrackHit(const size_t& itrack) const override;
35  const TVector3* TrackMomBeg(const size_t& itrack) const override;
36  const TVector3* TrackMomEnd(const size_t& itrack) const override;
37  const float TrackVtxDirectionX(const size_t& itrack) const override;
38  const float TrackVtxDirectionY(const size_t& itrack) const override;
39  const float TrackVtxDirectionZ(const size_t& itrack) const override;
40  const float TrackEndDirectionX(const size_t& itrack) const override;
41  const float TrackEndDirectionY(const size_t& itrack) const override;
42  const float TrackEndDirectionZ(const size_t& itrack) const override;
43  const float TrackLenFwd(const size_t& itrack) const override;
44  const float TrackLenBkd(const size_t& itrack) const override;
45  const float TrackIonizFwd(const size_t& itrack) const override;
46  const float TrackIonizBkd(const size_t& itrack) const override;
47  const int TrackChiSqrFwd(const size_t& itrack) const override;
48  const int TrackChiSqrBkd(const size_t& itrack) const override;
49  const int TrackChgFwd(const size_t& itrack) const override;
50  const int TrackChgBkd(const size_t& itrack) const override;
51  void TrackParBeg(const size_t& itrack, float pars[5]) const override;
52  void TrackParEnd(const size_t& itrack, float pars[5]) const override;
53  void TrackCovarBeg(const size_t& itrack, float pars[15]) const override;
54  void TrackCovarEnd(const size_t& itrack, float pars[15]) const override;
55  const TLorentzVector* TrackTruePosBeg(const size_t& itrack) const override;
56  const TLorentzVector* TrackTruePosEnd(const size_t& itrack) const override;
57  const TLorentzVector* TrackTrueMomBeg(const size_t& itrack) const override;
58  const TLorentzVector* TrackTrueMomEnd(const size_t& itrack) const override;
59  const float TrackTrueEnergy(const size_t& icluster) const override;
60  const size_t TrackNTrueTrack(const size_t& icluster) const override;
61  const int TrackTrkIdMaxDeposit(const size_t& icluster)const override;
62  const float TrackMaxDeposit(const size_t& icluster) const override;
63  const pair<int,float>* TrackTrueDeposit(const size_t& itrack, size_t& itrue) const override;
64  const vector<pair<int,float>>* TrackTrueDeposits(const size_t& itrack) const override;
65 
66  //vertex
67  const TLorentzVector* GetVertex(const size_t& ivertex) const override;
68  void VertexCovariance(const size_t& ivertex, float covar[][3]) const override;
69 
70  //vee
71  const TLorentzVector* VeeVertex(const size_t& ivee) const override;
72  void VeeCovariance(const size_t& ivee, float covar[][3]) const override;
73  const vector<TLorentzVector>* VeeMomentumPerHypothesis(const size_t& ivee) const override;
74  const float VeeChiSquared(const size_t& ivee) const override;
75 
76  //ECal cluster
77  const CaloCluster* GetCalCluster(const size_t& icluster) const;
78  const TLorentzVector* CalClustPosition(const size_t& icluster) const override;
79  const float CalClustEnergy(const size_t& icluster) const override;
80  const float CalClustEnergyError(const size_t& icluster) const override;
81  const float CalClustTrueEnergy(const size_t& icluster) const override;
82  const size_t CalClustNTrueTrack(const size_t& icluster) const override;
83  const int CalClustTrkIdMaxDeposit(const size_t& icluster)const override;
84  const float CalClustMaxDeposit(const size_t& icluster) const override;
85  const std::pair<int,float>* CalClustTrueDeposit(const size_t& icluster, const size_t& itrack) const override;
86  const float CalClustTimeDifference(const size_t& icluster) const override;
87  const float* CalClustShape(const size_t& icluster) const override;
88  const float CalClustTheta(const size_t& icluster) const override;
89  const float CalClustPhi(const size_t& icluster) const override;
90  const vector<TVector3>* CalClustEigenVecs(const size_t& icluster) const override;
91 
92  private:
93 
94  //pure virtual function from TreeReader
95  bool SetBranchAddresses() override;
96 
97  //leaves and branches
98  vector<Track>* fTracks = nullptr;
99  vector<Vee>* fVees = nullptr;
100  vector<Vertex>* fVertices = nullptr;
101  vector<CaloCluster>* fCalClusters = nullptr;
102 
103  vector<vector<Int_t>>* fVertTrackEnds = nullptr;
104  vector<vector<Int_t>>* fVeeTrackEnds = nullptr;
105 
106  TBranch* b_Tracks = nullptr;
107  TBranch* b_Vees = nullptr;
108  TBranch* b_Vertices = nullptr;
109  TBranch* b_CalClusters = nullptr;
110 
111  TBranch* b_VertTrackEnds = nullptr;
112  TBranch* b_VeeTrackEnds = nullptr;
113 
114  };//class
115 }//namespace
116 #endif /* GARANA_STRUCTUREDRECOTREE_H_ */
int TrackEnd
Definition: Track.h:32
STL namespace.