Namespaces | Functions
GTruth.cxx File Reference
#include "garana/DataProducts/GTruth.h"
#include <vector>
#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>

Go to the source code of this file.

Namespaces

 gtruthaux
 

Functions

std::string gtruthaux::stringifyTLorentzVector (const TLorentzVector &tv4)
 
std::ostream & operator<< (std::ostream &output, const garana::GTruth &gtruth)
 

Function Documentation

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

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)