LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
simb Namespace Reference

Framework includes. More...

Namespaces

 gtruthaux
 

Classes

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

Typedefs

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  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, 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

Framework includes.

Base utilities and modules for event generation and detector simulation.

ART objects.

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.

event origin types

Enumeration Type Documentation

event origin types

Enumerator
kUnknown 

???

kBeamNeutrino 

Beam neutrinos.

kCosmicRay 

Cosmic rays.

kSuperNovaNeutrino 

Supernova neutrinos.

kSingleParticle 

single particles thrown at the detector

Definition at line 19 of file MCTruth.h.

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

Neutrino interaction categories.

Enumerator
kCC 
kNC 

Definition at line 77 of file MCNeutrino.h.

77  {
78  kCC,
79  kNC
80  };

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 83 of file MCNeutrino.h.

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

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(), and larg4::ParticleListAction::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 simb::GTruth gtruth 
)

Definition at line 66 of file GTruth.cxx.

References simb::GTruth::fDiffXsec, simb::GTruth::fFShadSystP4, simb::GTruth::fGint, simb::GTruth::fGPhaseSpace, simb::GTruth::fgQ2, simb::GTruth::fgq2, simb::GTruth::fGscatter, simb::GTruth::fgT, simb::GTruth::fgW, simb::GTruth::fgX, simb::GTruth::fgY, simb::GTruth::fHitNucP4, simb::GTruth::fIsCharm, simb::GTruth::fIsSeaQuark, simb::GTruth::fNumNeutron, simb::GTruth::fNumPi0, simb::GTruth::fNumPiMinus, simb::GTruth::fNumPiPlus, simb::GTruth::fNumProton, simb::GTruth::fprobability, simb::GTruth::fProbeP4, simb::GTruth::fProbePDG, simb::GTruth::fResNum, simb::GTruth::ftgtA, simb::GTruth::ftgtPDG, simb::GTruth::ftgtZ, simb::GTruth::fVertex, simb::GTruth::fweight, simb::GTruth::fXsec, and simb::gtruthaux::stringifyTLorentzVector().

67  {
68  output
69  << "GTruth:" << std::endl
70  // 123456789012
71  << " Gint " << std::setw(11) << gtruth.fGint << " "
72  << " Gscatter " << std::setw(11) << gtruth.fGscatter << " "
73  << " GPhaseSpace " << std::setw(9) << gtruth.fGPhaseSpace << std::endl
74  << " weight " << std::setw(11) << gtruth.fweight << " "
75  << " prob " << std::setw(11) << gtruth.fprobability << std::endl
76  << " Xsec " << std::setw(11) << gtruth.fXsec << " "
77  << " DiffXsec " << std::setw(11) << gtruth.fDiffXsec << std::endl
78  << " Npi(+,-,0)" << std::setw(4) << gtruth.fNumPiPlus << " "
79  << std::setw(4) << gtruth.fNumPiMinus << " "
80  << std::setw(4) << gtruth.fNumPi0 << " "
81  << " Np Nn " << std::setw(4) << gtruth.fNumProton << " "
82  << std::setw(4) << gtruth.fNumNeutron << std::endl
83  << " IsCharm " << std::setw(4) << ((gtruth.fIsCharm)?"yes":"no") << " "
84  << " ResNum " << std::setw(4) << gtruth.fResNum << std::endl
85  << " Q2 q2 " << std::setw(11) << gtruth.fgQ2 << " "
86  << std::setw(11) << gtruth.fgq2 << std::endl
87  << " W T " << std::setw(11) << gtruth.fgW << " "
88  << std::setw(11) << gtruth.fgT << std::endl
89  << " X Y " << std::setw(11) << gtruth.fgX << " "
90  << std::setw(11) << gtruth.fgY << std::endl
91  << " IsSeaQuark " << std::setw(4) << ((gtruth.fIsSeaQuark)?"yes":"no") << std::endl
92  << " Z A PDG " << std::setw(4) << gtruth.ftgtZ << " "
93  << std::setw(4) << gtruth.ftgtA << " "
94  << std::setw(11) << gtruth.ftgtPDG << " "
95  << " probe " << std::setw(11) << gtruth.fProbePDG << std::endl
96  << " FShadSyst " << gtruthaux::stringifyTLorentzVector(gtruth.fFShadSystP4) << std::endl
97  << " HitNucP4 " << gtruthaux::stringifyTLorentzVector(gtruth.fHitNucP4) << std::endl
98  << " ProbeP4 " << gtruthaux::stringifyTLorentzVector(gtruth.fProbeP4) << std::endl
99  << " Vertex " << gtruthaux::stringifyTLorentzVector(gtruth.fVertex) << std::endl;
100 
101  return output;
102  }
double fgW
Definition: GTruth.h:48
int fGint
interaction code
Definition: GTruth.h:25
double fgq2
Definition: GTruth.h:47
double fgX
Definition: GTruth.h:50
int ftgtA
Definition: GTruth.h:58
int fGPhaseSpace
phase space system of DiffXSec
Definition: GTruth.h:27
int fNumNeutron
number of neutrons after reaction, before FSI
Definition: GTruth.h:40
int ftgtZ
Definition: GTruth.h:57
double fXsec
cross section of interaction
Definition: GTruth.h:32
int fNumPiPlus
number of pi pluses after reaction, before FSI
Definition: GTruth.h:36
int fNumPiMinus
number of pi minuses after reaction, before FSI
Definition: GTruth.h:37
TLorentzVector fProbeP4
Definition: GTruth.h:63
int fResNum
resonance number
Definition: GTruth.h:42
int fNumProton
number of protons after reaction, before FSI
Definition: GTruth.h:39
double fprobability
interaction probability
Definition: GTruth.h:31
int fProbePDG
Definition: GTruth.h:62
std::string stringifyTLorentzVector(const TLorentzVector &tv4)
Definition: GTruth.cxx:55
int fGscatter
neutrino scattering code
Definition: GTruth.h:26
int fNumPi0
number of pi0 after reaction, before FSI
Definition: GTruth.h:38
bool fIsCharm
did the interaction produce a charmed hadron?
Definition: GTruth.h:41
double fweight
event interaction weight (genie internal)
Definition: GTruth.h:30
TLorentzVector fHitNucP4
Definition: GTruth.h:56
int ftgtPDG
PDG of Target Nucleus, nucleon only if free.
Definition: GTruth.h:59
double fgQ2
< these are for the internal (on shell) genie kinematics
Definition: GTruth.h:46
TLorentzVector fFShadSystP4
Definition: GTruth.h:52
double fgT
Definition: GTruth.h:49
bool fIsSeaQuark
Definition: GTruth.h:55
TLorentzVector fVertex
Definition: GTruth.h:64
double fgY
Definition: GTruth.h:51
double fDiffXsec
differential cross section of interaction
Definition: GTruth.h:33
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:23
Cosmic rays.
Definition: MCTruth.h:22
Beam neutrinos.
Definition: MCTruth.h:21
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:237
int PdgCode() const
Definition: MCParticle.h:216
int CCNC() const
Definition: MCNeutrino.h:152
double QSqr() const
Definition: MCNeutrino.h:161
int HitQuark() const
Definition: MCNeutrino.h:157
const simb::MCParticle & Nu() const
Definition: MCNeutrino.h:150
int HitNuc() const
Definition: MCNeutrino.h:156
int InteractionType() const
Definition: MCNeutrino.h:154
double W() const
Definition: MCNeutrino.h:158
double Y() const
Definition: MCNeutrino.h:160
double X() const
Definition: MCNeutrino.h:159
int Target() const
Definition: MCNeutrino.h:155
int Mode() const
Definition: MCNeutrino.h:153
std::ostream& simb::operator<< ( std::ostream &  output,
const MCParticle particle 
)

Definition at line 151 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().

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