11 #ifndef SIMB_MCPARTICLE_H 12 #define SIMB_MCPARTICLE_H 20 #include "TLorentzVector.h" 59 const int mother = -1,
60 const double mass = s_uninitialized,
119 const TLorentzVector&
Position(
const int i = 0 )
const;
120 double Vx(
const int i = 0)
const;
121 double Vy(
const int i = 0)
const;
122 double Vz(
const int i = 0)
const;
123 double T(
const int i = 0)
const;
131 const TLorentzVector&
Momentum(
const int i = 0 )
const;
132 double Px(
const int i = 0)
const;
133 double Py(
const int i = 0)
const;
134 double Pz(
const int i = 0)
const;
135 double E(
const int i = 0)
const;
136 double P(
const int i = 0)
const;
137 double Pt(
const int i = 0)
const;
141 double EndPx()
const;
142 double EndPy()
const;
143 double EndPz()
const;
155 void SetGvtx(TLorentzVector v);
160 TLorentzVector
GetGvtx()
const;
184 bool keepTransportation =
false);
206 #include <functional> 263 bool keepTransportation)
264 {
ftrajectory.
Add( position, momentum, process, keepTransportation); }
266 bool keep_second_to_last)
295 return (*lhs) < (*rhs);
300 #endif // SIMB_MCPARTICLE_H double E(const int i=0) const
void Add(TLorentzVector const &p, TLorentzVector const &m)
unsigned int NumberTrajectoryPoints() const
const TVector3 & Polarization() const
const TLorentzVector & Position(const int i=0) const
void AddDaughter(const int trackID)
double Py(const int i=0) const
friend std::ostream & operator<<(std::ostream &output, const simb::MCParticle &)
void AddTrajectoryPoint(TLorentzVector const &position, TLorentzVector const &momentum)
const TLorentzVector & EndPosition() const
static const int s_uninitialized
int FirstDaughter() const
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
bool operator()(const simb::MCParticle *lhs, const simb::MCParticle *rhs)
double Pt(const int i=0) const
void SetPolarization(const TVector3 &p)
int frescatter
rescatter code
std::string EndProcess() const
MCParticle()
Don't write this as ROOT output.
double P(const int i=0) const
daughters_type fdaughters
Sorted list of daughters of this particle.
double T(const int i=0) const
bool operator<(const simb::MCParticle &other) const
CodeOutputInterface * code
std::string fprocess
Detector-simulation physics process that created the particle.
const TLorentzVector & Position(const size_type) const
The accessor methods described above.
std::set< int > daughters_type
Base utilities and modules for event generation and detector simulation.
void SetWeight(double wt)
void SetEndProcess(std::string s)
simb::MCTrajectory ftrajectory
particle trajectory (position,momentum)
double Vx(const int i=0) const
void Sparsify(double margin=.1, bool keep_second_to_last=false)
double fWeight
Assigned weight to this particle for MC tests.
const TLorentzVector & Momentum(const int i=0) const
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.
def momentum(x1, x2, x3, scale=1.)
void SetRescatter(int code)
void SparsifyTrajectory(double margin=0.1, bool keep_second_to_last=false)
const TLorentzVector & Momentum(const size_type) const
const TLorentzVector & EndMomentum() const
MCParticle & operator=(const MCParticle &)=default
double Vy(const int i=0) const