GTruth.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file GTruth.h
3 /// \Class to hold the additional information needed to recreate a genie::EventRecord
4 /// \author nathan.mayer@tufts.edu
5 /// \importer chilgenb@umn.edu
6 ////////////////////////////////////////////////////////////////////////
7 
8 /// This class stores/retrieves the additional information needed
9 /// (and not in MCTruth) to recreate a genie::EventRecord
10 /// for genie based event reweighting.
11 /// Imported from LArSoft on 2021 Feb 09
12 
13 #ifndef GARANA_GTRUTH_H
14 #define GARANA_GTRUTH_H
15 
16 #include <iostream>
17 #include <TLorentzVector.h>
18 
19 namespace garana {
20 
21  class GTruth {
22 
23  public:
24  GTruth();
25 
26  int fVertexRegion; ///< region code where vertex is located
27 
28  // genie::GHepRecord info
29  // holds a genie::Interaction
30 
31  TLorentzVector fVertex;
32  double fweight; ///< event interaction weight (genie internal)
33  double fprobability; ///< interaction probability
34  double fXsec; ///< cross section of interaction
35  double fDiffXsec; ///< differential cross section of interaction
36  int fGPhaseSpace; ///< phase space system of DiffXSec
37 
38  // genie:::InitialState info (sub-object to genie::Interactions)
39  int fProbePDG;
40  TLorentzVector fProbeP4;
41  TLorentzVector fTgtP4;
42 
43  // genie::Target info (sub-object to genie::InitialState)
44  int ftgtZ;
45  int ftgtA;
46  int ftgtPDG; ///< PDG of Target Nucleus, nucleon only if free
47  int fHitNucPDG; ///< hit nucleon PDG code
48  int fHitQrkPDG; ///< hit quark PDG code
50  TLorentzVector fHitNucP4;
51  double fHitNucPos;
52 
53  // genie::ProcessInfo (sub-object to genie::Interactions)
54  int fGscatter; ///< neutrino scattering code
55  int fGint; ///< interaction code
56 
57  // genie::Kinematics info (sub-object to genie::Interactions)
58  ///< these are for the internal (on shell) genie kinematics
59  double fgQ2;
60  double fgq2;
61  double fgW;
62  double fgT;
63  double fgX;
64  double fgY;
65  TLorentzVector fFSleptonP4; ///< generated final state primary lepton (LAB frame) // added version 13
66  TLorentzVector fFShadSystP4; ///< generated final state hadronic system (LAB frame)
67 
68  // genie::XclsTag info (sub-object to genie::Interactions)
69  bool fIsCharm; ///< did the interaction produce a charmed hadron?
70  int fCharmHadronPdg; // added version 13
71  bool fIsStrange; ///< strange production // added version 13
72  int fStrangeHadronPdg; // added version 13
73  int fNumProton; ///< number of protons after reaction, before FSI
74  int fNumNeutron; ///< number of neutrons after reaction, before FSI
75  int fNumPi0; ///< number of pi0 after reaction, before FSI
76  int fNumPiPlus; ///< number of pi pluses after reaction, before FSI
77  int fNumPiMinus; ///< number of pi minuses after reaction, before FSI
78  int fResNum; ///< resonance number
79  int fDecayMode; // added version 13
80 
81  #ifndef __GCCXML__
82  // Flag for values that might not have been set
83  static constexpr double kUndefinedValue = -99999;
84 
85  friend std::ostream& operator<< (std::ostream& output, const garana::GTruth &gtruth);
86 
87  bool IsFilled();
88 
89  #endif
90  }; //class GTruth
91 } // end garana namespace
92 
93 #endif // GARANA_GTRUTH_H
bool fIsCharm
did the interaction produce a charmed hadron?
Definition: GTruth.h:69
double fgq2
Definition: GTruth.h:60
TLorentzVector fTgtP4
Definition: GTruth.h:41
int fCharmHadronPdg
Definition: GTruth.h:70
int fVertexRegion
region code where vertex is located
Definition: GTruth.h:26
int fStrangeHadronPdg
Definition: GTruth.h:72
int fNumPiMinus
number of pi minuses after reaction, before FSI
Definition: GTruth.h:77
double fweight
event interaction weight (genie internal)
Definition: GTruth.h:32
static constexpr double kUndefinedValue
Definition: GTruth.h:83
int fNumProton
number of protons after reaction, before FSI
Definition: GTruth.h:73
int fGscatter
neutrino scattering code
Definition: GTruth.h:54
double fgY
Definition: GTruth.h:64
TLorentzVector fFSleptonP4
generated final state primary lepton (LAB frame) // added version 13
Definition: GTruth.h:65
double fgT
Definition: GTruth.h:62
friend std::ostream & operator<<(std::ostream &output, const garana::GTruth &gtruth)
Definition: GTruth.cxx:138
int fNumNeutron
number of neutrons after reaction, before FSI
Definition: GTruth.h:74
int fResNum
resonance number
Definition: GTruth.h:78
TLorentzVector fVertex
Definition: GTruth.h:31
bool IsFilled()
Definition: GTruth.cxx:68
double fprobability
interaction probability
Definition: GTruth.h:33
double fgX
Definition: GTruth.h:63
int ftgtPDG
PDG of Target Nucleus, nucleon only if free.
Definition: GTruth.h:46
double fXsec
cross section of interaction
Definition: GTruth.h:34
TLorentzVector fProbeP4
Definition: GTruth.h:40
TLorentzVector fHitNucP4
Definition: GTruth.h:50
int fNumPi0
number of pi0 after reaction, before FSI
Definition: GTruth.h:75
int fDecayMode
Definition: GTruth.h:79
double fHitNucPos
Definition: GTruth.h:51
int fGPhaseSpace
phase space system of DiffXSec
Definition: GTruth.h:36
int fProbePDG
Definition: GTruth.h:39
double fgW
Definition: GTruth.h:61
double fDiffXsec
differential cross section of interaction
Definition: GTruth.h:35
int fNumPiPlus
number of pi pluses after reaction, before FSI
Definition: GTruth.h:76
int fHitNucPDG
hit nucleon PDG code
Definition: GTruth.h:47
int fGint
interaction code
Definition: GTruth.h:55
bool fIsSeaQuark
Definition: GTruth.h:49
int fHitQrkPDG
hit quark PDG code
Definition: GTruth.h:48
bool fIsStrange
strange production // added version 13
Definition: GTruth.h:71
TLorentzVector fFShadSystP4
generated final state hadronic system (LAB frame)
Definition: GTruth.h:66
double fgQ2
< these are for the internal (on shell) genie kinematics
Definition: GTruth.h:59