10 #include <TDatabasePDG.h> 11 #include <TParticlePDG.h> 12 #include <TLorentzVector.h> 33 : fstatus(s_uninitialized)
34 , ftrackId(s_uninitialized)
35 , fpdgCode(s_uninitialized)
36 , fmother(s_uninitialized)
39 , fmass(s_uninitialized)
42 , fWeight(s_uninitialized)
44 , frescatter(s_uninitialized)
52 const std::string process,
72 const TDatabasePDG* databasePDG = TDatabasePDG::Instance();
73 const TParticlePDG* definition = databasePDG->GetParticle( pdg );
77 if ( definition != 0 ){
78 fmass = definition->Mass();
115 std::advance( i, index );
122 for(
int i = 0; i < 4; i++) {
130 for(
int i = 0; i < 4; i++) {
153 output <<
"ID=" << particle.
TrackId() <<
", ";
157 const TDatabasePDG* databasePDG = TDatabasePDG::Instance();
158 const TParticlePDG* definition = databasePDG->GetParticle( pdg );
162 if ( definition != 0 ) output << definition->GetName();
163 else output <<
"PDG=" << pdg;
165 output <<
", mass=" << particle.
Mass()
166 <<
", Mother ID=" << particle.
Mother()
167 <<
", Process=" << particle.
Process()
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()
double E(const int i=0) const
unsigned int NumberTrajectoryPoints() const
double Py(const int i=0) const
friend std::ostream & operator<<(std::ostream &output, const simb::MCParticle &)
static const int s_uninitialized
const simb::MCTrajectory & Trajectory() const
double fmass
Mass; from PDG unless overridden Should be in GeV.
double Px(const int i=0) const
std::string fendprocess
end process for the particle
std::string Process() const
TLorentzVector GetGvtx() const
int NumberDaughters() const
int Daughter(const int i) const
int frescatter
rescatter code
std::string EndProcess() const
MCParticle()
Don't write this as ROOT output.
daughters_type fdaughters
Sorted list of daughters of this particle.
double T(const int i=0) const
std::string fprocess
Detector-simulation physics process that created the particle.
void SetEndProcess(std::string s)
simb::MCTrajectory ftrajectory
particle trajectory (position,momentum)
double Vx(const int i=0) const
double fWeight
Assigned weight to this particle for MC tests.
double Pz(const int i=0) const
double Vz(const int i=0) const
int fstatus
Status code from generator, geant, etc.
TVector3 fpolarization
Polarization.
double Vy(const int i=0) const