StructuredGenTree.h
Go to the documentation of this file.
1 #ifndef GARANA_STRUCTURED_GENTREE_H
2 #define GARANA_STRUCTURED_GENTREE_H
3 
4 //garana includes
5 #include "garana/Base/GenTree.h"
8 
9 using std::vector;
10 
11 namespace garana {
12 
13  class StructuredGenTree : public GenTree {
14 
15  public:
16 
18  StructuredGenTree(TTree* tree);
19  //let compile provide destructor
20 
21  ///< inherited from TreeReader
22  bool SetBranchAddresses() override;
23 
24  ///< accessors inherited from GenTree (see garana/Base/GenTree.h for method descriptions)
25  const UInt_t NGen() const override;
26  const UInt_t NFSParticles(const UInt_t& igen ) const override;
27  const Bool_t IsGenie(const UInt_t& igen ) const override;
28 
29  const int NuRegion(const UInt_t& igen ) const override;
30  const Int_t NuPDG(const UInt_t& igen ) const override;
31  const TLorentzVector* NuP(const UInt_t& igen) override;
32  const TLorentzVector* NuVertex(const UInt_t& igen) override;
33  const Bool_t IsCC(const UInt_t& igen ) const override;
34  const int ScatterCode(const UInt_t& igen) const override;
35  const int InteractCode(const UInt_t& igen) const override;
36 
37  const Int_t TgtPDG(const UInt_t& igen ) const override;
38  const TLorentzVector* TgtP4(const UInt_t& igen) const override;
39  const int TgtZ(const UInt_t& igen ) const override;
40  const int TgtA(const UInt_t& igen ) const override;
41  const int HitNucPDG(const UInt_t& igen ) const override;
42  const TLorentzVector* HitNucP4(const UInt_t& igen ) const override;
43 
44  const double Q2(const UInt_t& igen ) const override;
45  const double q2(const UInt_t& igen ) const override;
46  const double W(const UInt_t& igen ) const override;
47  const double T(const UInt_t& igen ) const override;
48  const double X(const UInt_t& igen ) const override;
49  const double Y(const UInt_t& igen ) const override;
50  const TLorentzVector* FSLeptonP4(const UInt_t& igen ) const override;
51  const TLorentzVector* FSHadSystP4(const UInt_t& igen ) const override;
52 
53  const int NumNuProton(const UInt_t& igen) const override;
54  const int NumNuNeutron(const UInt_t& igen) const override;
55  const int NumNuPi0(const UInt_t& igen) const override;
56  const int NumNuPiPlus(const UInt_t& igen) const override;
57  const int NumNuPiMinus(const UInt_t& igen) const override;
58 
59  const Float_t FSTotEnergy(const UInt_t& igen) const override;
60  const Float_t FSEnergy(const UInt_t& igen, const UInt_t& ifsp) const override;
61  const Float_t FSPDG(const UInt_t& igen, const UInt_t& ifsp) const override;
62  const Int_t FSTrackId(const UInt_t& igen, const UInt_t& ifsp) const override;
63 
64  const GTruth* GetGTruth(const UInt_t& igen) const;
65  const vector<FSParticle>* GetParticles(const UInt_t& igen) const;
66 
67 
68  private:
69 
70  // Declaration of leaf types
71 
72  vector<vector<FSParticle>>* fFSParticles = nullptr;
73  vector<GTruth>* fGTruth = nullptr;
74 
75  //branches
76  TBranch* b_GTruth = nullptr;
77  TBranch* b_FSParticles = nullptr;
78 
79  //StucturedGenTree specific
80  const Bool_t CheckFSRange(const UInt_t& igen) const;
81 
82  };//class
83 }//namespace
84 
85 #endif
const Float_t FSTotEnergy(const UInt_t &igen) const override
const GTruth * GetGTruth(const UInt_t &igen) const
const TLorentzVector * FSLeptonP4(const UInt_t &igen) const override
final state primary lepton 4-momentum (LAB frame)
const Bool_t CheckFSRange(const UInt_t &igen) const
const Float_t FSPDG(const UInt_t &igen, const UInt_t &ifsp) const override
const TLorentzVector * HitNucP4(const UInt_t &igen) const override
hit nucleon (initial) 4-momentum
const int NumNuPiPlus(const UInt_t &igen) const override
number of pi pluses after reaction, before FSI
const int InteractCode(const UInt_t &igen) const override
GENIE interaction code.
struct vector vector
const double W(const UInt_t &igen) const override
const TLorentzVector * NuVertex(const UInt_t &igen) override
4-position of neutrino vertex
const int NumNuPi0(const UInt_t &igen) const override
number of pi0 after reaction, before FSI
const Int_t FSTrackId(const UInt_t &igen, const UInt_t &ifsp) const override
const Int_t NuPDG(const UInt_t &igen) const override
neutrino PDG code
const TLorentzVector * NuP(const UInt_t &igen) override
initial neutrino 4-momentum
const vector< FSParticle > * GetParticles(const UInt_t &igen) const
const int TgtZ(const UInt_t &igen) const override
target Z
const double X(const UInt_t &igen) const override
const double q2(const UInt_t &igen) const override
const double Y(const UInt_t &igen) const override
const int TgtA(const UInt_t &igen) const override
target A
const int NumNuPiMinus(const UInt_t &igen) const override
number of pi minuses after reaction, before FSI
const double Q2(const UInt_t &igen) const override
vector< vector< FSParticle > > * fFSParticles
const Bool_t IsGenie(const UInt_t &igen) const override
const int NumNuProton(const UInt_t &igen) const override
number of protons after reaction, before FSI
const TLorentzVector * FSHadSystP4(const UInt_t &igen) const override
final state hadronic system 4-momentum(LAB frame)
const double T(const UInt_t &igen) const override
const int NuRegion(const UInt_t &igen) const override
region code where the vertex is located
const Bool_t IsCC(const UInt_t &igen) const override
whether interaction is CC or not
const TLorentzVector * TgtP4(const UInt_t &igen) const override
target 4-momentum
const int NumNuNeutron(const UInt_t &igen) const override
number of neutrons after reaction, before FSI
const int ScatterCode(const UInt_t &igen) const override
GENIE neutrino scattering code.
const Float_t FSEnergy(const UInt_t &igen, const UInt_t &ifsp) const override
bool SetBranchAddresses() override
< inherited from TreeReader
const int HitNucPDG(const UInt_t &igen) const override
hit nucleon PDG code
const Int_t TgtPDG(const UInt_t &igen) const override
PDG of Target Nucleus, nucleon only if free.
vector< GTruth > * fGTruth
const UInt_t NGen() const override
const UInt_t NFSParticles(const UInt_t &igen) const override