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 ////////////////////////////////////////////////////////////////////////
6 
7 /// This class stores/retrieves the additional information needed
8 /// (and not in MCTruth) to recreate a genie::EventRecord
9 /// for genie based event reweighting.
10 
11 #ifndef SIMB_GTRUTH_H
12 #define SIMB_GTRUTH_H
13 
14 #include <iostream>
15 #include <TLorentzVector.h>
16 
17 namespace simb {
18 
19  class GTruth {
20 
21  public:
22  GTruth();
23 
24  // genie::GHepRecord info
25  // holds a genie::Interaction
26  TLorentzVector fVertex;
27  // skipping TBits data members EventFlags and EventMask
28  double fweight; ///< event interaction weight (genie internal)
29  double fprobability; ///< interaction probability
30  double fXsec; ///< cross section of interaction
31  double fDiffXsec; ///< differential cross section of interaction
32  int fGPhaseSpace; ///< phase space system of DiffXSec
33 
34  // genie::Interaction
35  // container for InitialState, ProcessInfo, XclsTag, Kinematics, KPhaseSpace)
36  // holds no fundamental type info
37 
38  // genie:::InitialState info (sub-object to genie::Interactions)
39  int fProbePDG;
40  // holds a genie::Target
41  TLorentzVector fProbeP4;
42  TLorentzVector fTgtP4; // added version 13
43 
44  // genie::Target info (sub-object to genie::InitialState)
45  int ftgtZ;
46  int ftgtA;
47  int ftgtPDG; ///< PDG of Target Nucleus, nucleon only if free
48  int fHitNucPDG; ///< hit nucleon PDG code // added version 13
49  int fHitQrkPDG; ///< hit quark PDG code // added version 13
51  TLorentzVector fHitNucP4;
52  double fHitNucPos; // added version 12
53 
54  // genie::ProcessInfo (sub-object to genie::Interactions)
55  int fGscatter; ///< neutrino scattering code
56  int fGint; ///< interaction code
57 
58  // genie::Kinematics info (sub-object to genie::Interactions)
59 
60  ///< these are for the internal (on shell) genie kinematics
61  ///< this list might be an incomplete transcription of map<KineVar_t,double>
62  double fgQ2;
63  double fgq2;
64  double fgW;
65  double fgT;
66  double fgX;
67  double fgY;
68 
69  ///< a common running variable to be recorded
70  double fgWrun;
71 
72  TLorentzVector fFSleptonP4; ///< generated final state primary lepton (LAB frame) // added version 13
73  TLorentzVector fFShadSystP4; ///< generated final state hadronic system (LAB frame)
74 
75  // genie::XclsTag info (sub-object to genie::Interactions)
76  bool fIsCharm; ///< did the interaction produce a charmed hadron?
77  int fCharmHadronPdg; // added version 13
78  bool fIsStrange; ///< strange production // added version 13
79  int fStrangeHadronPdg; // added version 13
80  int fNumProton; ///< number of protons after reaction, before FSI
81  int fNumNeutron; ///< number of neutrons after reaction, before FSI
82  int fNumPi0; ///< number of pi0 after reaction, before FSI
83  int fNumPiPlus; ///< number of pi pluses after reaction, before FSI
84  int fNumPiMinus; ///< number of pi minuses after reaction, before FSI
85  int fNumSingleGammas; ///< number of gammas after reaction, before FSI
86  int fNumRho0; ///< number of pi0 after reaction, before FSI
87  int fNumRhoPlus; ///< number of pi pluses after reaction, before FSI
88  int fNumRhoMinus; ///< number of pi minuses after reaction, before FSI
89  int fResNum; ///< resonance number
90  int fDecayMode; // added version 13
91 
94 
95 
96  // genie::KPhaseSpace (sub-object to genie::Interactions)
97  // has no relevant private data
98 
99  // Flag for values that might not have been set
100  static constexpr double kUndefinedValue = -99999;
101 
102  public:
103  friend std::ostream& operator<< (std::ostream& output, const simb::GTruth &gtruth);
104 
105  };
106 
107 } // end simb namespace
108 
109 #endif // SIMB_GTRUTH_H
double fgW
Definition: GTruth.h:64
int fGint
interaction code
Definition: GTruth.h:56
double fgq2
Definition: GTruth.h:63
friend std::ostream & operator<<(std::ostream &output, const simb::GTruth &gtruth)
Definition: GTruth.cxx:89
double fgX
Definition: GTruth.h:66
int ftgtA
Definition: GTruth.h:46
int fGPhaseSpace
phase space system of DiffXSec
Definition: GTruth.h:32
int fNumNeutron
number of neutrons after reaction, before FSI
Definition: GTruth.h:81
double fgWrun
Definition: GTruth.h:70
int fNumRhoPlus
number of pi pluses after reaction, before FSI
Definition: GTruth.h:87
int ftgtZ
Definition: GTruth.h:45
double fXsec
cross section of interaction
Definition: GTruth.h:30
int fNumPiPlus
number of pi pluses after reaction, before FSI
Definition: GTruth.h:83
int fNumSingleGammas
number of gammas after reaction, before FSI
Definition: GTruth.h:85
int fNumPiMinus
number of pi minuses after reaction, before FSI
Definition: GTruth.h:84
bool fIsStrange
strange production // added version 13
Definition: GTruth.h:78
TLorentzVector fProbeP4
Definition: GTruth.h:41
int fResNum
resonance number
Definition: GTruth.h:89
int fNumProton
number of protons after reaction, before FSI
Definition: GTruth.h:80
int fDecayMode
Definition: GTruth.h:90
double fprobability
interaction probability
Definition: GTruth.h:29
int fFinalLeptonPdg
Definition: GTruth.h:93
int fProbePDG
Definition: GTruth.h:39
TLorentzVector fFSleptonP4
generated final state primary lepton (LAB frame) // added version 13
Definition: GTruth.h:72
int fGscatter
neutrino scattering code
Definition: GTruth.h:55
int fNumRhoMinus
number of pi minuses after reaction, before FSI
Definition: GTruth.h:88
int fNumPi0
number of pi0 after reaction, before FSI
Definition: GTruth.h:82
int fCharmHadronPdg
Definition: GTruth.h:77
int fHitQrkPDG
hit quark PDG code // added version 13
Definition: GTruth.h:49
bool fIsCharm
did the interaction produce a charmed hadron?
Definition: GTruth.h:76
double fweight
event interaction weight (genie internal)
Definition: GTruth.h:28
TLorentzVector fHitNucP4
Definition: GTruth.h:51
Base utilities and modules for event generation and detector simulation.
double fHitNucPos
Definition: GTruth.h:52
int ftgtPDG
PDG of Target Nucleus, nucleon only if free.
Definition: GTruth.h:47
double fgQ2
Definition: GTruth.h:62
int fNumRho0
number of pi0 after reaction, before FSI
Definition: GTruth.h:86
TLorentzVector fFShadSystP4
generated final state hadronic system (LAB frame)
Definition: GTruth.h:73
TLorentzVector fTgtP4
Definition: GTruth.h:42
int fHitNucPDG
hit nucleon PDG code // added version 13
Definition: GTruth.h:48
int fFinalQuarkPdg
Definition: GTruth.h:92
double fgT
Definition: GTruth.h:65
bool fIsSeaQuark
Definition: GTruth.h:50
TLorentzVector fVertex
Definition: GTruth.h:26
double fgY
a common running variable to be recorded
Definition: GTruth.h:67
double fDiffXsec
differential cross section of interaction
Definition: GTruth.h:31
static constexpr double kUndefinedValue
Definition: GTruth.h:100
int fStrangeHadronPdg
Definition: GTruth.h:79