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  ///< these are for the internal (on shell) genie kinematics
60  ///< this list might be an incomplete transcription of map<KineVar_t,double>
61  double fgQ2;
62  double fgq2;
63  double fgW;
64  double fgT;
65  double fgX;
66  double fgY;
67  TLorentzVector fFSleptonP4; ///< generated final state primary lepton (LAB frame) // added version 13
68  TLorentzVector fFShadSystP4; ///< generated final state hadronic system (LAB frame)
69 
70  // genie::XclsTag info (sub-object to genie::Interactions)
71  bool fIsCharm; ///< did the interaction produce a charmed hadron?
72  int fCharmHadronPdg; // added version 13
73  bool fIsStrange; ///< strange production // added version 13
74  int fStrangeHadronPdg; // added version 13
75  int fNumProton; ///< number of protons after reaction, before FSI
76  int fNumNeutron; ///< number of neutrons after reaction, before FSI
77  int fNumPi0; ///< number of pi0 after reaction, before FSI
78  int fNumPiPlus; ///< number of pi pluses after reaction, before FSI
79  int fNumPiMinus; ///< number of pi minuses after reaction, before FSI
80  int fResNum; ///< resonance number
81  int fDecayMode; // added version 13
82 
83  // genie::KPhaseSpace (sub-object to genie::Interactions)
84  // has no relevant private data
85 
86  // Flag for values that might not have been set
87  static constexpr double kUndefinedValue = -99999;
88 
89  public:
90  friend std::ostream& operator<< (std::ostream& output, const simb::GTruth &gtruth);
91 
92  };
93 
94 } // end simb namespace
95 
96 #endif // SIMB_GTRUTH_H
double fgW
Definition: GTruth.h:63
int fGint
interaction code
Definition: GTruth.h:56
ofstream output
double fgq2
Definition: GTruth.h:62
friend std::ostream & operator<<(std::ostream &output, const simb::GTruth &gtruth)
Definition: GTruth.cxx:81
double fgX
Definition: GTruth.h:65
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:76
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:78
int fNumPiMinus
number of pi minuses after reaction, before FSI
Definition: GTruth.h:79
bool fIsStrange
strange production // added version 13
Definition: GTruth.h:73
TLorentzVector fProbeP4
Definition: GTruth.h:41
int fResNum
resonance number
Definition: GTruth.h:80
int fNumProton
number of protons after reaction, before FSI
Definition: GTruth.h:75
int fDecayMode
Definition: GTruth.h:81
double fprobability
interaction probability
Definition: GTruth.h:29
int fProbePDG
Definition: GTruth.h:39
TLorentzVector fFSleptonP4
generated final state primary lepton (LAB frame) // added version 13
Definition: GTruth.h:67
int fGscatter
neutrino scattering code
Definition: GTruth.h:55
int fNumPi0
number of pi0 after reaction, before FSI
Definition: GTruth.h:77
int fCharmHadronPdg
Definition: GTruth.h:72
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:71
double fweight
event interaction weight (genie internal)
Definition: GTruth.h:28
TLorentzVector fHitNucP4
Definition: GTruth.h:51
This class describes a particle created in the detector Monte Carlo 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:61
TLorentzVector fFShadSystP4
generated final state hadronic system (LAB frame)
Definition: GTruth.h:68
TLorentzVector fTgtP4
Definition: GTruth.h:42
int fHitNucPDG
hit nucleon PDG code // added version 13
Definition: GTruth.h:48
double fgT
Definition: GTruth.h:64
bool fIsSeaQuark
Definition: GTruth.h:50
TLorentzVector fVertex
Definition: GTruth.h:26
double fgY
Definition: GTruth.h:66
double fDiffXsec
differential cross section of interaction
Definition: GTruth.h:31
static constexpr double kUndefinedValue
Definition: GTruth.h:87
int fStrangeHadronPdg
Definition: GTruth.h:74