GenTree.h
Go to the documentation of this file.
1 #ifndef GARANA_GENTREE_H
2 #define GARANA_GENTREE_H
3 
5 
6 namespace garana{
7 
8  class GenTree : public TreeReader {
9 
10  public: // TODO: make everything protected?
11 
12  virtual ~GenTree() {};
13 
14  // generator agnostic
15  virtual const UInt_t NGen() const = 0;
16  virtual const UInt_t NFSParticles(const UInt_t& igen ) const = 0;
17  virtual const Bool_t IsGenie(const UInt_t& igen ) const = 0;
18  virtual const Float_t FSTotEnergy(const UInt_t& igen) const = 0;
19  virtual const Float_t FSEnergy(const UInt_t& igen, const UInt_t& ifsp) const = 0;
20  virtual const Float_t FSPDG(const UInt_t& igen, const UInt_t& ifsp) const = 0;
21  virtual const Int_t FSTrackId(const UInt_t& igen, const UInt_t& ifsp) const = 0;
22 
23  ///< GENIE specific
24  ///< neutrino info
25  virtual const int NuRegion(const UInt_t& igen ) const = 0; ///< region code where the vertex is located
26  virtual const Int_t NuPDG(const UInt_t& igen ) const = 0; ///< neutrino PDG code
27  virtual const TLorentzVector* NuP(const UInt_t& igen) = 0; ///< initial neutrino 4-momentum
28  virtual const TLorentzVector* NuVertex(const UInt_t& igen) = 0; ///< 4-position of neutrino vertex
29  virtual const Bool_t IsCC(const UInt_t& igen ) const = 0; ///< whether interaction is CC or not
30  virtual const int ScatterCode(const UInt_t& igen) const = 0; ///< GENIE neutrino scattering code
31  virtual const int InteractCode(const UInt_t& igen)const = 0; ///< GENIE interaction code
32 
33  ///< target info
34  virtual const Int_t TgtPDG(const UInt_t& igen ) const = 0; ///< PDG of Target Nucleus, nucleon only if free
35  virtual const TLorentzVector* TgtP4(const UInt_t& igen) const = 0; ///< target 4-momentum
36  virtual const int TgtZ(const UInt_t& igen ) const = 0; ///< target Z
37  virtual const int TgtA(const UInt_t& igen ) const = 0; ///< target A
38  virtual const int HitNucPDG(const UInt_t& igen ) const = 0; ///< hit nucleon PDG code
39  virtual const TLorentzVector* HitNucP4(const UInt_t& igen ) const = 0; ///< hit nucleon (initial) 4-momentum
40 
41  ///< kinematics
42  virtual const double Q2(const UInt_t& igen ) const = 0;
43  virtual const double q2(const UInt_t& igen ) const = 0;
44  virtual const double W(const UInt_t& igen ) const = 0;
45  virtual const double T(const UInt_t& igen ) const = 0;
46  virtual const double X(const UInt_t& igen ) const = 0;
47  virtual const double Y(const UInt_t& igen ) const = 0;
48  virtual const TLorentzVector* FSLeptonP4(const UInt_t& igen ) const = 0; ///< final state primary lepton 4-momentum (LAB frame)
49  virtual const TLorentzVector* FSHadSystP4(const UInt_t& igen ) const = 0; ///< final state hadronic system 4-momentum(LAB frame)
50 
51  ///< particle multiplicities (before FSI)
52  virtual const int NumNuProton(const UInt_t& igen) const = 0; ///< number of protons after reaction, before FSI
53  virtual const int NumNuNeutron(const UInt_t& igen) const = 0; ///< number of neutrons after reaction, before FSI
54  virtual const int NumNuPi0(const UInt_t& igen) const = 0; ///< number of pi0 after reaction, before FSI
55  virtual const int NumNuPiPlus(const UInt_t& igen) const = 0; ///< number of pi pluses after reaction, before FSI
56  virtual const int NumNuPiMinus(const UInt_t& igen) const = 0; ///< number of pi minuses after reaction, before FSI
57 
58  const std::vector<Int_t>* GetGIndex() const; ///< whether or not subentry is GENIE interaction, index of GENIE interaction
59 
60  bool NuInAV(const UInt_t& igen) const;
61  bool NuInIV(const UInt_t& igen) const;
62  bool NuInCalo(const UInt_t& igen) const;
63 
64  protected:
65 
66  const std::vector<Int_t>* fGIndex = nullptr;
67  TBranch* b_GIndex = nullptr;
68 
69  }; //class
70 } //namespace
71 
72 #endif //GenTree
virtual const double X(const UInt_t &igen) const =0
const std::vector< Int_t > * GetGIndex() const
whether or not subentry is GENIE interaction, index of GENIE interaction
Definition: GenTree.cxx:7
virtual const int NumNuPiMinus(const UInt_t &igen) const =0
number of pi minuses after reaction, before FSI
virtual const int HitNucPDG(const UInt_t &igen) const =0
hit nucleon PDG code
virtual const int ScatterCode(const UInt_t &igen) const =0
GENIE neutrino scattering code.
virtual const Float_t FSEnergy(const UInt_t &igen, const UInt_t &ifsp) const =0
virtual const TLorentzVector * FSHadSystP4(const UInt_t &igen) const =0
final state hadronic system 4-momentum(LAB frame)
virtual const Int_t TgtPDG(const UInt_t &igen) const =0
PDG of Target Nucleus, nucleon only if free.
virtual const UInt_t NGen() const =0
virtual const double Q2(const UInt_t &igen) const =0
virtual ~GenTree()
Definition: GenTree.h:12
virtual const int NumNuPi0(const UInt_t &igen) const =0
number of pi0 after reaction, before FSI
virtual const double T(const UInt_t &igen) const =0
bool NuInIV(const UInt_t &igen) const
Definition: GenTree.cxx:17
virtual const UInt_t NFSParticles(const UInt_t &igen) const =0
virtual const int NumNuNeutron(const UInt_t &igen) const =0
number of neutrons after reaction, before FSI
virtual const int TgtA(const UInt_t &igen) const =0
target A
virtual const TLorentzVector * NuVertex(const UInt_t &igen)=0
4-position of neutrino vertex
virtual const TLorentzVector * HitNucP4(const UInt_t &igen) const =0
hit nucleon (initial) 4-momentum
virtual const int InteractCode(const UInt_t &igen) const =0
GENIE interaction code.
virtual const TLorentzVector * NuP(const UInt_t &igen)=0
initial neutrino 4-momentum
virtual const Bool_t IsCC(const UInt_t &igen) const =0
whether interaction is CC or not
virtual const double q2(const UInt_t &igen) const =0
bool NuInAV(const UInt_t &igen) const
Definition: GenTree.cxx:11
bool NuInCalo(const UInt_t &igen) const
Definition: GenTree.cxx:23
virtual const Int_t NuPDG(const UInt_t &igen) const =0
neutrino PDG code
virtual const double Y(const UInt_t &igen) const =0
virtual const TLorentzVector * FSLeptonP4(const UInt_t &igen) const =0
final state primary lepton 4-momentum (LAB frame)
virtual const int TgtZ(const UInt_t &igen) const =0
target Z
virtual const Int_t FSTrackId(const UInt_t &igen, const UInt_t &ifsp) const =0
virtual const Float_t FSTotEnergy(const UInt_t &igen) const =0
virtual const int NumNuPiPlus(const UInt_t &igen) const =0
number of pi pluses after reaction, before FSI
virtual const int NuRegion(const UInt_t &igen) const =0
region code where the vertex is located
virtual const int NumNuProton(const UInt_t &igen) const =0
number of protons after reaction, before FSI
const std::vector< Int_t > * fGIndex
Definition: GenTree.h:66
virtual const Float_t FSPDG(const UInt_t &igen, const UInt_t &ifsp) const =0
virtual const TLorentzVector * TgtP4(const UInt_t &igen) const =0
target 4-momentum
TBranch * b_GIndex
Definition: GenTree.h:67
virtual const double W(const UInt_t &igen) const =0
virtual const Bool_t IsGenie(const UInt_t &igen) const =0