Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
garana::GTruth Class Reference

#include <GTruth.h>

Public Member Functions

 GTruth ()
 
bool IsFilled ()
 

Public Attributes

int fVertexRegion
 region code where vertex is located More...
 
TLorentzVector fVertex
 
double fweight
 event interaction weight (genie internal) More...
 
double fprobability
 interaction probability More...
 
double fXsec
 cross section of interaction More...
 
double fDiffXsec
 differential cross section of interaction More...
 
int fGPhaseSpace
 phase space system of DiffXSec More...
 
int fProbePDG
 
TLorentzVector fProbeP4
 
TLorentzVector fTgtP4
 
int ftgtZ
 
int ftgtA
 
int ftgtPDG
 PDG of Target Nucleus, nucleon only if free. More...
 
int fHitNucPDG
 hit nucleon PDG code More...
 
int fHitQrkPDG
 hit quark PDG code More...
 
bool fIsSeaQuark
 
TLorentzVector fHitNucP4
 
double fHitNucPos
 
int fGscatter
 neutrino scattering code More...
 
int fGint
 interaction code More...
 
double fgQ2
 < these are for the internal (on shell) genie kinematics More...
 
double fgq2
 
double fgW
 
double fgT
 
double fgX
 
double fgY
 
TLorentzVector fFSleptonP4
 generated final state primary lepton (LAB frame) // added version 13 More...
 
TLorentzVector fFShadSystP4
 generated final state hadronic system (LAB frame) More...
 
bool fIsCharm
 did the interaction produce a charmed hadron? More...
 
int fCharmHadronPdg
 
bool fIsStrange
 strange production // added version 13 More...
 
int fStrangeHadronPdg
 
int fNumProton
 number of protons after reaction, before FSI More...
 
int fNumNeutron
 number of neutrons after reaction, before FSI More...
 
int fNumPi0
 number of pi0 after reaction, before FSI More...
 
int fNumPiPlus
 number of pi pluses after reaction, before FSI More...
 
int fNumPiMinus
 number of pi minuses after reaction, before FSI More...
 
int fResNum
 resonance number More...
 
int fDecayMode
 

Static Public Attributes

static constexpr double kUndefinedValue = -99999
 

Friends

std::ostream & operator<< (std::ostream &output, const garana::GTruth &gtruth)
 

Detailed Description

Definition at line 21 of file GTruth.h.

Constructor & Destructor Documentation

GTruth::GTruth ( )

Definition at line 21 of file GTruth.cxx.

22  : fVertexRegion(-1)
23  , fVertex(0, 0, 0, 0)
24  , fweight(0)
25  , fprobability(0)
26  , fXsec(0)
27  , fDiffXsec(0)
28  , fGPhaseSpace(-1)
29 
30  , fProbePDG(-1)
31  , fProbeP4(0, 0, 0, 0)
32  , fTgtP4(0, 0, 0, 0)
33 
34  , ftgtZ(0)
35  , ftgtA(0)
36  , ftgtPDG(0)
39  , fIsSeaQuark(false)
40  , fHitNucP4(0, 0, 0, 0)
41  , fHitNucPos(0)
42 
43  , fGscatter(-1)
44  , fGint(-1)
45 
52  , fFSleptonP4(0, 0, 0, 0)
53  , fFShadSystP4(0, 0, 0, 0)
54 
55  , fIsCharm(false)
56  , fCharmHadronPdg(0)
57  , fIsStrange(false)
59  , fNumProton(-1)
60  , fNumNeutron(-1)
61  , fNumPi0(-1)
62  , fNumPiPlus(-1)
63  , fNumPiMinus(-1)
64  , fResNum(-1)
65  , fDecayMode(-1)
66  {}
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
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
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

Member Function Documentation

bool GTruth::IsFilled ( )

Definition at line 68 of file GTruth.cxx.

68  {
69 
70  //check if all data members still initialized from default constructor
71  // note some might retain initial values so check
72  // check if all have init values
73 
74  const TLorentzVector emptyVec(0,0,0,0); //initializes to (0,0,0,0)
75 
76  if(
77  fVertex == emptyVec
78  && fweight == 0
79  && fprobability == 0
80  && fXsec == 0
81  && fDiffXsec == 0
82  && fGPhaseSpace == -1
83  && fProbePDG == -1
84  && fProbeP4 == emptyVec
85  && fTgtP4 == emptyVec
86 
87  && ftgtZ == 0
88  && ftgtA == 0
89  && ftgtPDG == 0
92  && !fIsSeaQuark
93  && fHitNucP4 == emptyVec
94  && fHitNucPos == 0
95 
96  && fGscatter == -1
97  && fGint == -1
98 
99  && fgQ2 == kUndefinedValue
100  && fgq2 == kUndefinedValue
101  && fgW == kUndefinedValue
102  && fgT == kUndefinedValue
103  && fgX == kUndefinedValue
104  && fgY == kUndefinedValue
105  && fFSleptonP4 == emptyVec
106  && fFShadSystP4 == emptyVec
107 
108  && !fIsCharm
109  && fCharmHadronPdg == 0
110  && !fIsStrange
111  && fStrangeHadronPdg == 0
112  && fNumProton == -1
113  && fNumNeutron == -1
114  && fNumPi0 == -1
115  && fNumPiPlus == -1
116  && fNumPiMinus == -1
117  && fResNum == -1
118  && fDecayMode == -1
119  ) {
120  return false;
121  }
122 
123  return true;
124  }
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 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
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
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

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  output,
const garana::GTruth gtruth 
)
friend

Definition at line 138 of file GTruth.cxx.

139  {
140  output
141  << "GTruth:" << std::endl
142  // 123456789012
143  << " Vertex " << gtruthaux::stringifyTLorentzVector(gtruth.fVertex) << std::endl
144  << " weight " << std::setw(11) << gtruth.fweight << " "
145  << " prob " << std::setw(11) << gtruth.fprobability << std::endl
146  << " Xsec " << std::setw(11) << gtruth.fXsec << " "
147  << " DiffXsec " << std::setw(11) << gtruth.fDiffXsec << " "
148  << " GPhaseSpace " << std::setw(9) << gtruth.fGPhaseSpace << std::endl
149 
150  << " probe " << std::setw(11) << gtruth.fProbePDG << std::endl
151  << " ProbeP4 " << gtruthaux::stringifyTLorentzVector(gtruth.fProbeP4) << std::endl
152  << " TgtP4 " << gtruthaux::stringifyTLorentzVector(gtruth.fTgtP4) << std::endl
153 
154  << " Z A PDG (nuc,qrk) " << std::setw(4) << gtruth.ftgtZ << " "
155  << std::setw(4) << gtruth.ftgtA << " "
156  << std::setw(11) << gtruth.ftgtPDG << " ("
157  << std::setw(11) << gtruth.fHitNucPDG << " "
158  << std::setw(11) << gtruth.fHitQrkPDG << ") "
159  << " IsSeaQuark " << std::setw(4) << ((gtruth.fIsSeaQuark)?"yes":"no") << std::endl
160  << " HitNucP4 " << gtruthaux::stringifyTLorentzVector(gtruth.fHitNucP4) << " "
161  << " HitNucPos " << std::setw(11) << gtruth.fHitNucPos << std::endl
162 
163  << " Gscatter " << std::setw(11) << gtruth.fGscatter << " "
164  << " Gint " << std::setw(11) << gtruth.fGint << std::endl
165 
166  << " Q2 q2 " << std::setw(11) << gtruth.fgQ2 << " "
167  << std::setw(11) << gtruth.fgq2 << std::endl
168  << " W T " << std::setw(11) << gtruth.fgW << " "
169  << std::setw(11) << gtruth.fgT << std::endl
170  << " X Y " << std::setw(11) << gtruth.fgX << " "
171  << std::setw(11) << gtruth.fgY << std::endl
172  << " FSlepton " << gtruthaux::stringifyTLorentzVector(gtruth.fFSleptonP4) << std::endl
173  << " FShadSyst " << gtruthaux::stringifyTLorentzVector(gtruth.fFShadSystP4) << std::endl
174 
175  << " IsCharm " << std::setw(4) << ((gtruth.fIsCharm)?"yes":"no") << " "
176  << " CharmPDG " << std::setw(6) << gtruth.fCharmHadronPdg << " "
177  << " IsStrange " << std::setw(4) << ((gtruth.fIsStrange)?"yes":"no") << " "
178  << " StrangePDG " << std::setw(6) << gtruth.fStrangeHadronPdg << std::endl
179  << " Np Nn " << std::setw(4) << gtruth.fNumProton << " "
180  << std::setw(4) << gtruth.fNumNeutron << " "
181  << " Npi(0,+,-) " << std::setw(4) << gtruth.fNumPi0 << " "
182  << std::setw(4) << gtruth.fNumPiPlus << " "
183  << std::setw(4) << gtruth.fNumPiMinus << std::endl
184  << " ResNum " << std::setw(4) << gtruth.fResNum << " "
185  << " DecayMode " << std::setw(4) << gtruth.fDecayMode << std::endl
186 
187  << std::endl ;
188 
189  return output;
190  }
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 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
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
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
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
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
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
std::string stringifyTLorentzVector(const TLorentzVector &tv4)
Definition: GTruth.cxx:127
double fgQ2
< these are for the internal (on shell) genie kinematics
Definition: GTruth.h:59
QTextStream & endl(QTextStream &s)

Member Data Documentation

int garana::GTruth::fCharmHadronPdg

Definition at line 70 of file GTruth.h.

int garana::GTruth::fDecayMode

Definition at line 79 of file GTruth.h.

double garana::GTruth::fDiffXsec

differential cross section of interaction

Definition at line 35 of file GTruth.h.

TLorentzVector garana::GTruth::fFShadSystP4

generated final state hadronic system (LAB frame)

Definition at line 66 of file GTruth.h.

TLorentzVector garana::GTruth::fFSleptonP4

generated final state primary lepton (LAB frame) // added version 13

Definition at line 65 of file GTruth.h.

int garana::GTruth::fGint

interaction code

Definition at line 55 of file GTruth.h.

int garana::GTruth::fGPhaseSpace

phase space system of DiffXSec

Definition at line 36 of file GTruth.h.

double garana::GTruth::fgQ2

< these are for the internal (on shell) genie kinematics

Definition at line 59 of file GTruth.h.

double garana::GTruth::fgq2

Definition at line 60 of file GTruth.h.

int garana::GTruth::fGscatter

neutrino scattering code

Definition at line 54 of file GTruth.h.

double garana::GTruth::fgT

Definition at line 62 of file GTruth.h.

double garana::GTruth::fgW

Definition at line 61 of file GTruth.h.

double garana::GTruth::fgX

Definition at line 63 of file GTruth.h.

double garana::GTruth::fgY

Definition at line 64 of file GTruth.h.

TLorentzVector garana::GTruth::fHitNucP4

Definition at line 50 of file GTruth.h.

int garana::GTruth::fHitNucPDG

hit nucleon PDG code

Definition at line 47 of file GTruth.h.

double garana::GTruth::fHitNucPos

Definition at line 51 of file GTruth.h.

int garana::GTruth::fHitQrkPDG

hit quark PDG code

Definition at line 48 of file GTruth.h.

bool garana::GTruth::fIsCharm

did the interaction produce a charmed hadron?

Definition at line 69 of file GTruth.h.

bool garana::GTruth::fIsSeaQuark

Definition at line 49 of file GTruth.h.

bool garana::GTruth::fIsStrange

strange production // added version 13

Definition at line 71 of file GTruth.h.

int garana::GTruth::fNumNeutron

number of neutrons after reaction, before FSI

Definition at line 74 of file GTruth.h.

int garana::GTruth::fNumPi0

number of pi0 after reaction, before FSI

Definition at line 75 of file GTruth.h.

int garana::GTruth::fNumPiMinus

number of pi minuses after reaction, before FSI

Definition at line 77 of file GTruth.h.

int garana::GTruth::fNumPiPlus

number of pi pluses after reaction, before FSI

Definition at line 76 of file GTruth.h.

int garana::GTruth::fNumProton

number of protons after reaction, before FSI

Definition at line 73 of file GTruth.h.

double garana::GTruth::fprobability

interaction probability

Definition at line 33 of file GTruth.h.

TLorentzVector garana::GTruth::fProbeP4

Definition at line 40 of file GTruth.h.

int garana::GTruth::fProbePDG

Definition at line 39 of file GTruth.h.

int garana::GTruth::fResNum

resonance number

Definition at line 78 of file GTruth.h.

int garana::GTruth::fStrangeHadronPdg

Definition at line 72 of file GTruth.h.

int garana::GTruth::ftgtA

Definition at line 45 of file GTruth.h.

TLorentzVector garana::GTruth::fTgtP4

Definition at line 41 of file GTruth.h.

int garana::GTruth::ftgtPDG

PDG of Target Nucleus, nucleon only if free.

Definition at line 46 of file GTruth.h.

int garana::GTruth::ftgtZ

Definition at line 44 of file GTruth.h.

TLorentzVector garana::GTruth::fVertex

Definition at line 31 of file GTruth.h.

int garana::GTruth::fVertexRegion

region code where vertex is located

Definition at line 26 of file GTruth.h.

double garana::GTruth::fweight

event interaction weight (genie internal)

Definition at line 32 of file GTruth.h.

double garana::GTruth::fXsec

cross section of interaction

Definition at line 34 of file GTruth.h.

constexpr double garana::GTruth::kUndefinedValue = -99999
static

Definition at line 83 of file GTruth.h.


The documentation for this class was generated from the following files: