LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
simb Namespace Reference

ART objects. More...

Namespaces

 gtruthaux
 

Classes

class  GTruth
 
class  MCFlux
 
struct  MCGeneratorInfo
 
class  MCNeutrino
 Event generator information. More...
 
class  MCParticle
 
class  MCTrajectory
 
class  MCTruth
 Event generator information. More...
 

Typedefs

typedef enum simb::_ev_generator Generator_t
 generator used to produce event, if applicable More...
 
typedef enum simb::_ev_origin Origin_t
 event origin types More...
 

Enumerations

enum  flux_code_ {
  kHistPlusFocus = +1, kHistMinusFocus = -1, kGenerator = 0, kNtuple = 2,
  kSimple_Flux = 3, kDk2Nu = 4
}
 Which flux was used to generate this event? More...
 
enum  _ev_generator {
  kUnknown, _ev_generator::kGENIE, _ev_generator::kCRY, _ev_generator::kGIBUU,
  _ev_generator::kNuWro, _ev_generator::kMARLEY, _ev_generator::kNEUT, _ev_generator::kCORSIKA,
  _ev_generator::kGEANT, _ev_generator::kNumGenerators
}
 generator used to produce event, if applicable More...
 
enum  curr_type_ { kCC, kNC }
 Neutrino interaction categories. More...
 
enum  int_type_ {
  kUnknownInteraction = -1, kQE = 0, kRes = 1, kDIS = 2,
  kCoh = 3, kCohElastic = 4, kElectronScattering = 5, kIMDAnnihilation = 6,
  kInverseBetaDecay = 7, kGlashowResonance = 8, kAMNuGamma = 9, kMEC = 10,
  kDiffractive = 11, kEM = 12, kWeakMix = 13, kNuanceOffset = 1000,
  kCCQE = kNuanceOffset + 1, kNCQE = kNuanceOffset + 2, kResCCNuProtonPiPlus = kNuanceOffset + 3, kResCCNuNeutronPi0 = kNuanceOffset + 4,
  kResCCNuNeutronPiPlus = kNuanceOffset + 5, kResNCNuProtonPi0 = kNuanceOffset + 6, kResNCNuProtonPiPlus = kNuanceOffset + 7, kResNCNuNeutronPi0 = kNuanceOffset + 8,
  kResNCNuNeutronPiMinus = kNuanceOffset + 9, kResCCNuBarNeutronPiMinus = kNuanceOffset + 10, kResCCNuBarProtonPi0 = kNuanceOffset + 11, kResCCNuBarProtonPiMinus = kNuanceOffset + 12,
  kResNCNuBarProtonPi0 = kNuanceOffset + 13, kResNCNuBarProtonPiPlus = kNuanceOffset + 14, kResNCNuBarNeutronPi0 = kNuanceOffset + 15, kResNCNuBarNeutronPiMinus = kNuanceOffset + 16,
  kResCCNuDeltaPlusPiPlus = kNuanceOffset + 17, kResCCNuDelta2PlusPiMinus = kNuanceOffset + 21, kResCCNuBarDelta0PiMinus = kNuanceOffset + 28, kResCCNuBarDeltaMinusPiPlus = kNuanceOffset + 32,
  kResCCNuProtonRhoPlus = kNuanceOffset + 39, kResCCNuNeutronRhoPlus = kNuanceOffset + 41, kResCCNuBarNeutronRhoMinus = kNuanceOffset + 46, kResCCNuBarNeutronRho0 = kNuanceOffset + 48,
  kResCCNuSigmaPlusKaonPlus = kNuanceOffset + 53, kResCCNuSigmaPlusKaon0 = kNuanceOffset + 55, kResCCNuBarSigmaMinusKaon0 = kNuanceOffset + 60, kResCCNuBarSigma0Kaon0 = kNuanceOffset + 62,
  kResCCNuProtonEta = kNuanceOffset + 67, kResCCNuBarNeutronEta = kNuanceOffset + 70, kResCCNuKaonPlusLambda0 = kNuanceOffset + 73, kResCCNuBarKaon0Lambda0 = kNuanceOffset + 76,
  kResCCNuProtonPiPlusPiMinus = kNuanceOffset + 79, kResCCNuProtonPi0Pi0 = kNuanceOffset + 80, kResCCNuBarNeutronPiPlusPiMinus = kNuanceOffset + 85, kResCCNuBarNeutronPi0Pi0 = kNuanceOffset + 86,
  kResCCNuBarProtonPi0Pi0 = kNuanceOffset + 90, kCCDIS = kNuanceOffset + 91, kNCDIS = kNuanceOffset + 92, kUnUsed1 = kNuanceOffset + 93,
  kUnUsed2 = kNuanceOffset + 94, kCCQEHyperon = kNuanceOffset + 95, kNCCOH = kNuanceOffset + 96, kCCCOH = kNuanceOffset + 97,
  kNuElectronElastic = kNuanceOffset + 98, kInverseMuDecay = kNuanceOffset + 99, kMEC2p2h = kNuanceOffset + 100
}
 Neutrino interaction categories. More...
 
enum  _ev_origin {
  kUnknown, kUnknown, kBeamNeutrino, kCosmicRay,
  kSuperNovaNeutrino, kSingleParticle
}
 event origin types More...
 

Functions

std::ostream & operator<< (std::ostream &output, const simb::GTruth &gtruth)
 
std::ostream & operator<< (std::ostream &output, const simb::MCFlux &mcflux)
 
std::ostream & operator<< (std::ostream &output, const simb::MCNeutrino &mcnu)
 
std::ostream & operator<< (std::ostream &output, const MCParticle &particle)
 
std::ostream & operator<< (std::ostream &output, const MCTrajectory &list)
 
std::ostream & operator<< (std::ostream &o, simb::MCTruth const &a)
 

Generated particle index

This type represents the position of a specific generated particle in the generator truth record, simb::MCTruth. The particle itself can be accessed from that record via simb::MCTruth::GetParticle().

using GeneratedParticleIndex_t = std::size_t
 Type of particle index in the generator truth record (simb::MCTruth). More...
 
constexpr GeneratedParticleIndex_t NoGeneratedParticleIndex = std::numeric_limits<GeneratedParticleIndex_t>::max()
 Constant representing the absence of generator truth information. More...
 
bool isGeneratedParticleIndex (GeneratedParticleIndex_t index)
 Returns whether the specified one is an acceptable generator index. More...
 

Detailed Description

ART objects.

Base utilities and modules for event generation and detector simulation.

Version
Id
PrimaryParticleInformation.h,v 1.7 2012-09-20 21:47:05 greenc Exp
Author
selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu, brebe.nosp@m.l@fn.nosp@m.al.go.nosp@m.v

PrimaryParticleInformation 10-Sep-2007 Bill Seligman

11-Feb-2009 selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu Revised for LArSoft

Purpose: This class is "attached" to the G4PrimaryParticle. It's used to save the MCTruth object associated with the event.

Background: Read this carefully, because this class probably doesn't do what you think it does.

Geant4 has various "truth" classes: G4Event, G4Track, G4PrimaryVertex, G4PrimaryParticle, etc. For all of these classes, Geant4 provides a facility for the user to include additional information that's "attached" to the class in question.

In this case, this class defines additional information to included with the G4PrimaryParticle class. In particular, it stores the pointer to the simb::MCTruth object that was the source of the G4PrimaryParticle information.

The reason why this class is necessary for the G4Base application is that it allows the ParticleListAction class access to the MCTruth pointer during Geant4's tracking.

Version
Id
ReweightAna.h,v 1.2 2012-09-19 18:12:09 nsmayer Exp
Author
nsmay.nosp@m.er@f.nosp@m.nal.g.nosp@m.ov

This class stores/retrieves the additional information needed (and not in MCTruth) to recreate a genie::EventRecord for genie based event reweighting.

This class describes a particle created in the detector Monte Carlo simulation.

This class describes the trajectory of a particle created in the Monte Carlo simulation. It generally behaves like a vector< pair<TLorentzVector,TLorentzVector> >, where the first TLorentzVector is the position and the seoond is the momentum, with the following additions: - Methods Position(int) and Momentum(int) for those who are unfamiliar with the concept of "first" and "second" as used with STL pairs: sim::Trajectory* trajectory = simb::MCParticle.Trajectory(); int numberOfPonts = trajectory->size(); for (int i=0; i<numberOfPoints; ++i) { TLorentzVector position = trajectory->Position(i); TLorentzVector momentum = trajectory->Momentum(i); } The STL equivalent to the above statements (more efficient): sim::Trajectory* trajectory = simb::MCParticle.Trajectory(); for ( sim::Trajectory::const_iterator i = trajectory->begin(); i != trajectory->end(); ++i ) { const TLorentzVector& position = (*i).first; const TLorentzVector& momentum = (*i).second; } - As above, but for each position or momentum component; e.g., trajectory->X(i). - In addition to push_back(pair< TLorentzVector, TLorentzVector>), there's also push_back(TLorentzVector,TLorentzVector) and Add(TLorentzVector,TLorentzVector). They all do the same thing: add another point to the trajectory. - Print() and operator<< methods for ROOT display and ease of debugging. There are no units defined in this class. If it's used with Geant4, the units will be (mm,ns,GeV), but this class does not enforce this.

Typedef Documentation

using simb::GeneratedParticleIndex_t = typedef std::size_t

Type of particle index in the generator truth record (simb::MCTruth).

Definition at line 30 of file simb.h.

generator used to produce event, if applicable

event origin types

Enumeration Type Documentation

enum simb::_ev_generator
strong

generator used to produce event, if applicable

Enumerator
kUnknown 
kGENIE 
kCRY 
kGIBUU 
kNuWro 
kMARLEY 
kNEUT 
kCORSIKA 
kGEANT 
kNumGenerators 

Definition at line 18 of file MCGeneratorInfo.h.

event origin types

Enumerator
kUnknown 

???

kUnknown 
kBeamNeutrino 

Beam neutrinos.

kCosmicRay 

Cosmic rays.

kSuperNovaNeutrino 

Supernova neutrinos.

kSingleParticle 

single particles thrown at the detector

Definition at line 21 of file MCTruth.h.

21  {
22  kUnknown,
24  kCosmicRay,
27  } Origin_t;
enum simb::_ev_origin Origin_t
event origin types
single particles thrown at the detector
Definition: MCTruth.h:26
Supernova neutrinos.
Definition: MCTruth.h:25
Cosmic rays.
Definition: MCTruth.h:24
Beam neutrinos.
Definition: MCTruth.h:23

Neutrino interaction categories.

Enumerator
kCC 
kNC 

Definition at line 73 of file MCNeutrino.h.

73  {
74  kCC,
75  kNC
76  };

Which flux was used to generate this event?

Enumerator
kHistPlusFocus 

Flux for positive horn focus.

kHistMinusFocus 

Flux for negative horn focus.

kGenerator 

A bogus flux assumed by the generator.

kNtuple 

Full flux simulation ntuple.

kSimple_Flux 

A simplified flux ntuple for quick running.

kDk2Nu 

Unified ntuple flux format (replaces 2)

Definition at line 17 of file MCFlux.h.

17  {
18  kHistPlusFocus = +1,
19  kHistMinusFocus = -1,
20  kGenerator = 0,
21  kNtuple = 2,
22  kSimple_Flux = 3,
23  kDk2Nu = 4
24  };
Unified ntuple flux format (replaces 2)
Definition: MCFlux.h:23
Full flux simulation ntuple.
Definition: MCFlux.h:21
Flux for negative horn focus.
Definition: MCFlux.h:19
A bogus flux assumed by the generator.
Definition: MCFlux.h:20
Flux for positive horn focus.
Definition: MCFlux.h:18
A simplified flux ntuple for quick running.
Definition: MCFlux.h:22

Neutrino interaction categories.

Enumerator
kUnknownInteraction 

n.b.: this group is similar but not quite, entirely unlike GENIE ScatteringType convention

kQE 
kRes 
kDIS 
kCoh 
kCohElastic 
kElectronScattering 
kIMDAnnihilation 
kInverseBetaDecay 
kGlashowResonance 
kAMNuGamma 
kMEC 
kDiffractive 
kEM 
kWeakMix 
kNuanceOffset 

offset to account for adding in Nuance codes to this enum

kCCQE 

charged current quasi-elastic

kNCQE 

neutral current quasi-elastic

kResCCNuProtonPiPlus 

resonant charged current, nu p -> l- p pi+

kResCCNuNeutronPi0 

resonant charged current, nu n -> l- p pi0

kResCCNuNeutronPiPlus 

resonant charged current, nu n -> l- n pi+

kResNCNuProtonPi0 

resonant neutral current, nu p -> nu p pi0

kResNCNuProtonPiPlus 

resonant neutral current, nu p -> nu p pi+

kResNCNuNeutronPi0 

resonant neutral current, nu n -> nu n pi0

kResNCNuNeutronPiMinus 

resonant neutral current, nu n -> nu p pi-

kResCCNuBarNeutronPiMinus 

resonant charged current, nubar n -> l+ n pi-

kResCCNuBarProtonPi0 

resonant charged current, nubar p -> l+ n pi0

kResCCNuBarProtonPiMinus 

resonant charged current, nubar p -> l+ p pi-

kResNCNuBarProtonPi0 

resonant charged current, nubar p -> nubar p pi0

kResNCNuBarProtonPiPlus 

resonant charged current, nubar p -> nubar n pi+

kResNCNuBarNeutronPi0 

resonant charged current, nubar n -> nubar n pi0

kResNCNuBarNeutronPiMinus 

resonant charged current, nubar n -> nubar p pi-

kResCCNuDeltaPlusPiPlus 
kResCCNuDelta2PlusPiMinus 
kResCCNuBarDelta0PiMinus 
kResCCNuBarDeltaMinusPiPlus 
kResCCNuProtonRhoPlus 
kResCCNuNeutronRhoPlus 
kResCCNuBarNeutronRhoMinus 
kResCCNuBarNeutronRho0 
kResCCNuSigmaPlusKaonPlus 
kResCCNuSigmaPlusKaon0 
kResCCNuBarSigmaMinusKaon0 
kResCCNuBarSigma0Kaon0 
kResCCNuProtonEta 
kResCCNuBarNeutronEta 
kResCCNuKaonPlusLambda0 
kResCCNuBarKaon0Lambda0 
kResCCNuProtonPiPlusPiMinus 
kResCCNuProtonPi0Pi0 
kResCCNuBarNeutronPiPlusPiMinus 
kResCCNuBarNeutronPi0Pi0 
kResCCNuBarProtonPi0Pi0 
kCCDIS 

charged current deep inelastic scatter

kNCDIS 

charged current deep inelastic scatter

kUnUsed1 
kUnUsed2 
kCCQEHyperon 
kNCCOH 
kCCCOH 

charged current coherent pion

kNuElectronElastic 

neutrino electron elastic scatter

kInverseMuDecay 

inverse muon decay

kMEC2p2h 

extension of nuance encoding for MEC / 2p2h

Definition at line 79 of file MCNeutrino.h.

79  {
80  kUnknownInteraction = -1,
81  kQE = 0,
82  kRes = 1,
83  kDIS = 2,
84  kCoh = 3,
85  kCohElastic = 4,
87  kIMDAnnihilation = 6,
90  kAMNuGamma = 9,
91  kMEC = 10,
92  kDiffractive = 11,
93  kEM = 12,
94  kWeakMix = 13,
95  kNuanceOffset = 1000,
96  kCCQE = kNuanceOffset + 1,
97  kNCQE = kNuanceOffset + 2,
133  kCCDIS = kNuanceOffset + 91,
134  kNCDIS = kNuanceOffset + 92,
135  kUnUsed1 = kNuanceOffset + 93,
136  kUnUsed2 = kNuanceOffset + 94,
138  kNCCOH = kNuanceOffset + 96,
139  kCCCOH = kNuanceOffset + 97,
142  kMEC2p2h = kNuanceOffset + 100
143  };
neutral current quasi-elastic
Definition: MCNeutrino.h:97
resonant charged current, nubar p -> nubar n pi+
Definition: MCNeutrino.h:109
resonant neutral current, nu p -> nu p pi0
Definition: MCNeutrino.h:101
charged current deep inelastic scatter
Definition: MCNeutrino.h:134
resonant charged current, nubar p -> l+ p pi-
Definition: MCNeutrino.h:107
neutrino electron elastic scatter
Definition: MCNeutrino.h:140
resonant charged current, nubar p -> l+ n pi0
Definition: MCNeutrino.h:106
offset to account for adding in Nuance codes to this enum
Definition: MCNeutrino.h:95
charged current quasi-elastic
Definition: MCNeutrino.h:96
resonant charged current, nubar p -> nubar p pi0
Definition: MCNeutrino.h:108
resonant charged current, nu n -> l- p pi0
Definition: MCNeutrino.h:99
resonant neutral current, nu n -> nu n pi0
Definition: MCNeutrino.h:103
resonant charged current, nu n -> l- n pi+
Definition: MCNeutrino.h:100
extension of nuance encoding for MEC / 2p2h
Definition: MCNeutrino.h:142
resonant charged current, nubar n -> nubar p pi-
Definition: MCNeutrino.h:111
charged current deep inelastic scatter
Definition: MCNeutrino.h:133
resonant charged current, nu p -> l- p pi+
Definition: MCNeutrino.h:98
n.b.: this group is similar but not quite, entirely unlike GENIE ScatteringType convention ...
Definition: MCNeutrino.h:80
charged current coherent pion
Definition: MCNeutrino.h:139
resonant neutral current, nu n -> nu p pi-
Definition: MCNeutrino.h:104
inverse muon decay
Definition: MCNeutrino.h:141
resonant charged current, nubar n -> l+ n pi-
Definition: MCNeutrino.h:105
resonant charged current, nubar n -> nubar n pi0
Definition: MCNeutrino.h:110
resonant neutral current, nu p -> nu p pi+
Definition: MCNeutrino.h:102

Function Documentation

bool simb::isGeneratedParticleIndex ( GeneratedParticleIndex_t  index)
inline

Returns whether the specified one is an acceptable generator index.

Definition at line 37 of file simb.h.

References NoGeneratedParticleIndex.

Referenced by sim::GeneratedParticleInfo::hasGeneratedParticleIndex(), larg4::ParticleListAction::ParticleInfo_t::isPrimary(), and larg4::ParticleListActionService::ParticleInfo_t::isPrimary().

38  { return index != NoGeneratedParticleIndex; }
constexpr GeneratedParticleIndex_t NoGeneratedParticleIndex
Constant representing the absence of generator truth information.
Definition: simb.h:34
std::ostream& simb::operator<< ( std::ostream &  output,
const MCTrajectory list 
)

Definition at line 67 of file MCTrajectory.cxx.

References simb::MCTrajectory::begin(), simb::MCTrajectory::end(), and simb::MCTrajectory::size().

68  {
69  // Determine a field width for the voxel number.
70  MCTrajectory::size_type numberOfTrajectories = list.size();
71  int numberOfDigits = (int) std::log10( (double) numberOfTrajectories ) + 1;
72 
73  // A simple header.
74  output.width( numberOfDigits );
75  output << "#" << ": < position (x,y,z,t), momentum (Px,Py,Pz,E) >" << std::endl;
76 
77  // Write each trajectory point on a separate line.
78  MCTrajectory::size_type nTrajectory = 0;
79  for ( MCTrajectory::const_iterator trajectory = list.begin(); trajectory != list.end(); ++trajectory, ++nTrajectory ){
80  output.width( numberOfDigits );
81  output << nTrajectory << ": "
82  << "< (" << (*trajectory).first.X()
83  << "," << (*trajectory).first.Y()
84  << "," << (*trajectory).first.Z()
85  << "," << (*trajectory).first.T()
86  << ") , (" << (*trajectory).second.Px()
87  << "," << (*trajectory).second.Py()
88  << "," << (*trajectory).second.Pz()
89  << "," << (*trajectory).second.E()
90  << ") >" << std::endl;
91  }
92 
93  return output;
94  }
intermediate_table::const_iterator const_iterator
std::ostream& simb::operator<< ( std::ostream &  o,
simb::MCTruth const &  a 
)

Definition at line 70 of file MCTruth.cxx.

References simb::MCTruth::GetNeutrino(), simb::MCTruth::GetParticle(), kBeamNeutrino, kCosmicRay, kSuperNovaNeutrino, simb::MCTruth::NParticles(), and simb::MCTruth::Origin().

71  {
72  if(a.Origin() == kCosmicRay)
73  o << "This is a cosmic ray event" << std::endl;
74  else if(a.Origin() == kBeamNeutrino){
75  o << "This is a beam neutrino event" << std::endl;
76  o << a.GetNeutrino();
77  }
78  else if(a.Origin() == kSuperNovaNeutrino){
79  o << "This is a supernova neutrino event" << std::endl;
80  o << a.GetNeutrino();
81  }
82 
83  for (int i = 0; i < a.NParticles(); ++i)
84  o << i << " " << a.GetParticle(i) << std::endl;
85 
86  return o;
87  }
Supernova neutrinos.
Definition: MCTruth.h:25
Cosmic rays.
Definition: MCTruth.h:24
Beam neutrinos.
Definition: MCTruth.h:23
std::ostream& simb::operator<< ( std::ostream &  output,
const simb::MCNeutrino mcnu 
)

Definition at line 80 of file MCNeutrino.cxx.

References simb::MCNeutrino::CCNC(), simb::MCParticle::E(), simb::MCNeutrino::HitNuc(), simb::MCNeutrino::HitQuark(), simb::MCNeutrino::InteractionType(), simb::MCNeutrino::Mode(), simb::MCNeutrino::Nu(), simb::MCParticle::PdgCode(), simb::MCNeutrino::QSqr(), simb::MCNeutrino::Target(), simb::MCNeutrino::W(), simb::MCNeutrino::X(), and simb::MCNeutrino::Y().

81  {
82  output << " neutrino = " << mcnu.Nu().PdgCode() << std::endl
83  << " neutrino energy = " << mcnu.Nu().E() << std::endl
84  << " CCNC = " << mcnu.CCNC() << std::endl
85  << " mode = " << mcnu.Mode() << std::endl
86  << " interaction type = " << mcnu.InteractionType() << std::endl
87  << " target = " << mcnu.Target() << std::endl
88  << " nucleon = " << mcnu.HitNuc() << std::endl
89  << " quark = " << mcnu.HitQuark() << std::endl
90  << " W = " << mcnu.W() << std::endl
91  << " X = " << mcnu.X() << std::endl
92  << " Y = " << mcnu.Y() << std::endl
93  << " Q^2 = " << mcnu.QSqr() << std::endl;
94 
95  return output;
96  }
double E(const int i=0) const
Definition: MCParticle.h:234
int PdgCode() const
Definition: MCParticle.h:213
int CCNC() const
Definition: MCNeutrino.h:148
double QSqr() const
Definition: MCNeutrino.h:157
int HitQuark() const
Definition: MCNeutrino.h:153
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:146
int HitNuc() const
Definition: MCNeutrino.h:152
int InteractionType() const
Definition: MCNeutrino.h:150
double W() const
Definition: MCNeutrino.h:154
double Y() const
Definition: MCNeutrino.h:156
double X() const
Definition: MCNeutrino.h:155
int Target() const
Definition: MCNeutrino.h:151
int Mode() const
Definition: MCNeutrino.h:149
std::ostream& simb::operator<< ( std::ostream &  output,
const simb::GTruth gtruth 
)

Definition at line 89 of file GTruth.cxx.

References simb::GTruth::fCharmHadronPdg, simb::GTruth::fDecayMode, simb::GTruth::fDiffXsec, simb::GTruth::fFinalLeptonPdg, simb::GTruth::fFinalQuarkPdg, simb::GTruth::fFShadSystP4, simb::GTruth::fFSleptonP4, simb::GTruth::fGint, simb::GTruth::fGPhaseSpace, simb::GTruth::fgQ2, simb::GTruth::fgq2, simb::GTruth::fGscatter, simb::GTruth::fgT, simb::GTruth::fgW, simb::GTruth::fgWrun, simb::GTruth::fgX, simb::GTruth::fgY, simb::GTruth::fHitNucP4, simb::GTruth::fHitNucPDG, simb::GTruth::fHitNucPos, simb::GTruth::fHitQrkPDG, simb::GTruth::fIsCharm, simb::GTruth::fIsSeaQuark, simb::GTruth::fIsStrange, simb::GTruth::fNumNeutron, simb::GTruth::fNumPi0, simb::GTruth::fNumPiMinus, simb::GTruth::fNumPiPlus, simb::GTruth::fNumProton, simb::GTruth::fNumRho0, simb::GTruth::fNumRhoMinus, simb::GTruth::fNumRhoPlus, simb::GTruth::fNumSingleGammas, simb::GTruth::fprobability, simb::GTruth::fProbeP4, simb::GTruth::fProbePDG, simb::GTruth::fResNum, simb::GTruth::fStrangeHadronPdg, simb::GTruth::ftgtA, simb::GTruth::fTgtP4, simb::GTruth::ftgtPDG, simb::GTruth::ftgtZ, simb::GTruth::fVertex, simb::GTruth::fweight, simb::GTruth::fXsec, and simb::gtruthaux::stringifyTLorentzVector().

90  {
91  output
92  << "GTruth:" << std::endl
93  // 123456789012
94  << " Vertex " << gtruthaux::stringifyTLorentzVector(gtruth.fVertex) << std::endl
95  << " weight " << std::setw(11) << gtruth.fweight << " "
96  << " prob " << std::setw(11) << gtruth.fprobability << std::endl
97  << " Xsec " << std::setw(11) << gtruth.fXsec << " "
98  << " DiffXsec " << std::setw(11) << gtruth.fDiffXsec << " "
99  << " GPhaseSpace " << std::setw(9) << gtruth.fGPhaseSpace << std::endl
100 
101  << " probe " << std::setw(11) << gtruth.fProbePDG << std::endl
102  << " ProbeP4 " << gtruthaux::stringifyTLorentzVector(gtruth.fProbeP4) << std::endl
103  << " TgtP4 " << gtruthaux::stringifyTLorentzVector(gtruth.fTgtP4) << std::endl
104 
105  << " Z A PDG (nuc,qrk) " << std::setw(4) << gtruth.ftgtZ << " "
106  << std::setw(4) << gtruth.ftgtA << " "
107  << std::setw(11) << gtruth.ftgtPDG << " ("
108  << std::setw(11) << gtruth.fHitNucPDG << " "
109  << std::setw(11) << gtruth.fHitQrkPDG << ") "
110  << " IsSeaQuark " << std::setw(4) << ((gtruth.fIsSeaQuark)?"yes":"no") << std::endl
111  << " HitNucP4 " << gtruthaux::stringifyTLorentzVector(gtruth.fHitNucP4) << " "
112  << " HitNucPos " << std::setw(11) << gtruth.fHitNucPos << std::endl
113 
114  << " Gscatter " << std::setw(11) << gtruth.fGscatter << " "
115  << " Gint " << std::setw(11) << gtruth.fGint << std::endl
116 
117  << " Q2 q2 " << std::setw(11) << gtruth.fgQ2 << " "
118  << std::setw(11) << gtruth.fgq2 << std::endl
119  << " W T " << std::setw(11) << gtruth.fgW << " "
120  << std::setw(11) << gtruth.fgT << std::endl
121  << " X Y " << std::setw(11) << gtruth.fgX << " "
122  << std::setw(11) << gtruth.fgY << std::endl
123  << " Wrun " << std::setw(11) << gtruth.fgWrun << std::endl
124  << " FSlepton " << gtruthaux::stringifyTLorentzVector(gtruth.fFSleptonP4) << std::endl
125  << " FShadSyst " << gtruthaux::stringifyTLorentzVector(gtruth.fFShadSystP4) << std::endl
126 
127  << " IsCharm " << std::setw(4) << ((gtruth.fIsCharm)?"yes":"no") << " "
128  << " CharmPDG " << std::setw(6) << gtruth.fCharmHadronPdg << " "
129  << " IsStrange " << std::setw(4) << ((gtruth.fIsStrange)?"yes":"no") << " "
130  << " StrangePDG " << std::setw(6) << gtruth.fStrangeHadronPdg << std::endl
131  << " Np Nn " << std::setw(4) << gtruth.fNumProton << " "
132  << std::setw(4) << gtruth.fNumNeutron << " "
133  << " Npi(0,+,-) " << std::setw(4) << gtruth.fNumPi0 << " "
134  << std::setw(4) << gtruth.fNumPiPlus << " "
135  << std::setw(4) << gtruth.fNumPiMinus << std::endl
136  << " NSingleGammas " << std::setw(4) << gtruth.fNumSingleGammas
137  << " NRho(0,+,-) " << std::setw(4) << gtruth.fNumRho0 << " "
138  << std::setw(4) << gtruth.fNumRhoPlus << " "
139  << std::setw(4) << gtruth.fNumRhoMinus << std::endl
140  << " ResNum " << std::setw(4) << gtruth.fResNum << " "
141  << " DecayMode " << std::setw(4) << gtruth.fDecayMode << std::endl
142  << " FinalQuarkPdg " << std::setw(4) << gtruth.fFinalQuarkPdg << " "
143  << " FinalLeptonPdg " << std::setw(4) << gtruth.fFinalLeptonPdg
144 
145  << std::endl ;
146 
147  return output;
148  }
double fgW
Definition: GTruth.h:64
int fGint
interaction code
Definition: GTruth.h:56
double fgq2
Definition: GTruth.h:63
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
std::string stringifyTLorentzVector(const TLorentzVector &tv4)
Definition: GTruth.cxx:78
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
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
int fStrangeHadronPdg
Definition: GTruth.h:79
std::ostream& simb::operator<< ( std::ostream &  output,
const MCParticle particle 
)

Definition at line 157 of file MCParticle.cxx.

References simb::MCParticle::E(), simb::MCParticle::Mass(), simb::MCParticle::Mother(), simb::MCParticle::NumberTrajectoryPoints(), simb::MCParticle::PdgCode(), simb::MCParticle::Process(), simb::MCParticle::Px(), simb::MCParticle::Py(), simb::MCParticle::Pz(), simb::MCParticle::StatusCode(), simb::MCParticle::T(), simb::MCParticle::TrackId(), simb::MCParticle::Vx(), simb::MCParticle::Vy(), and simb::MCParticle::Vz().

158  {
159  output << "ID=" << particle.TrackId() << ", ";
160  int pdg = particle.PdgCode();
161 
162  // Try to translate the PDG code into text.
163  const TDatabasePDG* databasePDG = TDatabasePDG::Instance();
164  const TParticlePDG* definition = databasePDG->GetParticle( pdg );
165  // Check that the particle is known to ROOT. If not, this is
166  // not a major error; Geant4 has an internal particle coding
167  // scheme for nuclei that ROOT doesn't recognize.
168  if ( definition != 0 ) output << definition->GetName();
169  else output << "PDG=" << pdg;
170 
171  output << ", mass=" << particle.Mass()
172  << ", Mother ID=" << particle.Mother()
173  << ", Process=" << particle.Process()
174  << ", Status=" << particle.StatusCode()
175  << "\nthere are " << particle.NumberTrajectoryPoints() << " trajectory points";
176 
177  if(particle.NumberTrajectoryPoints() > 0 )
178  output << "\nInitial vtx (x,y,z,t)=(" << particle.Vx()
179  << "," << particle.Vy()
180  << "," << particle.Vz()
181  << "," << particle.T()
182  << "),\n Initial mom (Px,Py,Pz,E)=(" << particle.Px()
183  << "," << particle.Py()
184  << "," << particle.Pz()
185  << "," << particle.E()
186  << ")" << std::endl;
187  else
188  output << std::endl;
189 
190  return output;
191  }
std::ostream& simb::operator<< ( std::ostream &  output,
const simb::MCFlux mcflux 
)

Definition at line 384 of file MCFlux.cxx.

References simb::MCFlux::fdk2gen, simb::MCFlux::fevtno, simb::MCFlux::fmupare, simb::MCFlux::fmuparpx, simb::MCFlux::fmuparpy, simb::MCFlux::fmuparpz, simb::MCFlux::fndecay, simb::MCFlux::fnecm, simb::MCFlux::fnenergyf, simb::MCFlux::fnenergyn, simb::MCFlux::fnimpwt, simb::MCFlux::fntype, simb::MCFlux::fnwtfar, simb::MCFlux::fnwtnear, simb::MCFlux::fpdpx, simb::MCFlux::fpdpy, simb::MCFlux::fpdpz, simb::MCFlux::fppdxdz, simb::MCFlux::fppdydz, simb::MCFlux::fppmedium, simb::MCFlux::fpppz, simb::MCFlux::fptype, simb::MCFlux::frun, simb::MCFlux::ftptype, simb::MCFlux::ftpx, simb::MCFlux::ftpy, simb::MCFlux::ftpz, simb::MCFlux::fvx, simb::MCFlux::fvy, and simb::MCFlux::fvz.

385  {
386  output
387  << "MCFlux:" << std::endl
388  // 123456789012
389  << " flux job " << std::setw(11) << mcflux.frun << " "
390  << " pot # " << std::setw(11) << mcflux.fevtno << std::endl
391  << " ntype " << std::setw(11) << mcflux.fntype << " "
392  << " ptype " << std::setw(11) << mcflux.fptype << " "
393  << " impwt " << std::setw(11) << mcflux.fnimpwt << std::endl
394  << " ndecay " << std::setw(11) << mcflux.fndecay << " "
395  << " ppmedium " << std::setw(11) << mcflux.fppmedium << " "
396  << " tptype " << std::setw(11) << mcflux.ftptype << std::endl
397  << " vxyz " << std::setw(11) << mcflux.fvx << " "
398  << std::setw(11) << mcflux.fvy << " "
399  << std::setw(11) << mcflux.fvz << std::endl
400  << " pdpxyz " << std::setw(11) << mcflux.fpdpx << " "
401  << std::setw(11) << mcflux.fpdpy << " "
402  << std::setw(11) << mcflux.fpdpz << std::endl
403  << " tpxyz " << std::setw(11) << mcflux.ftpx << " "
404  << std::setw(11) << mcflux.ftpy << " "
405  << std::setw(11) << mcflux.ftpz << std::endl
406  << " ppd[xy]dz " << std::setw(11) << mcflux.fppdxdz << " "
407  << std::setw(11) << mcflux.fppdydz << std::endl
408  << " pppxyz " << std::setw(11) << mcflux.fppdxdz*mcflux.fpppz << " "
409  << std::setw(11) << mcflux.fppdydz*mcflux.fpppz << " "
410  << std::setw(11) << mcflux.fpppz << std::endl
411  << " muparpxyz " << std::setw(11) << mcflux.fmuparpx << " "
412  << std::setw(11) << mcflux.fmuparpy << " "
413  << std::setw(11) << mcflux.fmuparpz << " "
414  << " mupare " << std::setw(11) << mcflux.fmupare << std::endl
415  << " necm " << std::setw(11) << mcflux.fnecm << " "
416  << " dk2gen " << std::setw(11) << mcflux.fdk2gen << std::endl
417  << " near E " << std::setw(11) << mcflux.fnenergyn << " "
418  << " wgt " << std::setw(11) << mcflux.fnwtnear << std::endl
419  << " far E " << std::setw(11) << mcflux.fnenergyf << " "
420  << " wgt " << std::setw(11) << mcflux.fnwtfar << std::endl;
421  return output;
422  }
int frun
Definition: MCFlux.h:35
double fpdpx
Definition: MCFlux.h:55
double ftpx
Definition: MCFlux.h:79
int fppmedium
Definition: MCFlux.h:62
int ftptype
Definition: MCFlux.h:82
double fvx
Definition: MCFlux.h:52
double fnwtfar
Definition: MCFlux.h:48
double fppdxdz
Definition: MCFlux.h:58
double fdk2gen
distance from decay to ray origin
Definition: MCFlux.h:103
double fnenergyf
Definition: MCFlux.h:47
double fnwtnear
Definition: MCFlux.h:44
int fptype
Definition: MCFlux.h:63
int fndecay
Definition: MCFlux.h:50
double fpdpz
Definition: MCFlux.h:57
double fmuparpz
Definition: MCFlux.h:69
int fevtno
Definition: MCFlux.h:36
double fppdydz
Definition: MCFlux.h:59
double ftpz
Definition: MCFlux.h:81
double fpdpy
Definition: MCFlux.h:56
double fvy
Definition: MCFlux.h:53
double fmupare
Definition: MCFlux.h:70
int fntype
Definition: MCFlux.h:51
double fnecm
Definition: MCFlux.h:71
double fmuparpy
Definition: MCFlux.h:68
double fpppz
Definition: MCFlux.h:60
double ftpy
Definition: MCFlux.h:80
double fvz
Definition: MCFlux.h:54
double fmuparpx
Definition: MCFlux.h:67
double fnenergyn
Definition: MCFlux.h:43
double fnimpwt
Definition: MCFlux.h:72

Variable Documentation