Garfield++ 5.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Abstract base class for track generation. More...
#include <Track.hh>
Public Member Functions | |
Track ()=delete | |
Default constructor. | |
Track (const std::string &name) | |
Constructor. | |
virtual | ~Track () |
Destructor. | |
virtual void | SetParticle (const std::string &part) |
void | SetEnergy (const double e) |
Set the particle energy. | |
void | SetBetaGamma (const double bg) |
Set the relative momentum of the particle. | |
void | SetBeta (const double beta) |
Set the speed ( ![]() | |
void | SetGamma (const double gamma) |
Set the Lorentz factor of the particle. | |
void | SetMomentum (const double p) |
Set the particle momentum. | |
void | SetKineticEnergy (const double ekin) |
Set the kinetic energy of the particle. | |
double | GetEnergy () const |
Return the particle energy. | |
double | GetBetaGamma () const |
Return the ![]() | |
double | GetBeta () const |
Return the speed ( ![]() | |
double | GetGamma () const |
Return the Lorentz factor of the projectile. | |
double | GetMomentum () const |
Return the particle momentum. | |
double | GetKineticEnergy () const |
Return the kinetic energy of the projectile. | |
double | GetCharge () const |
Get the charge of the projectile. | |
double | GetMass () const |
Get the mass [eV / c2] of the projectile. | |
void | SetSensor (Sensor *s) |
Set the sensor through which to transport the particle. | |
virtual bool | NewTrack (const double x0, const double y0, const double z0, const double t0, const double dx0, const double dy0, const double dz0)=0 |
virtual bool | GetCluster (double &xc, double &yc, double &zc, double &tc, int &nc, double &ec, double &extra)=0 |
virtual double | GetClusterDensity () |
virtual double | GetStoppingPower () |
Get the stopping power (mean energy loss [eV] per cm). | |
void | EnablePlotting (ViewDrift *viewer) |
Switch on plotting. | |
void | DisablePlotting () |
Switch off plotting. | |
void | EnableDebugging () |
Switch on debugging messages. | |
void | DisableDebugging () |
Switch off debugging messages. | |
Protected Member Functions | |
void | PlotNewTrack (const double x0, const double y0, const double z0) |
void | PlotCluster (const double x0, const double y0, const double z0) |
Static Protected Member Functions | |
static std::array< double, 3 > | StepBfield (const double dt, const double qoverm, const double vmag, double bx, double by, double bz, std::array< double, 3 > &dir) |
Protected Attributes | |
std::string | m_className = "Track" |
double | m_q = -1. |
int | m_spin = 1 |
double | m_mass |
double | m_energy = 0. |
double | m_beta2 = 1. |
bool | m_isElectron = false |
std::string | m_particleName = "mu-" |
Sensor * | m_sensor = nullptr |
bool | m_isChanged = true |
ViewDrift * | m_viewer = nullptr |
bool | m_debug = false |
size_t | m_plotId = 0 |
|
delete |
Default constructor.
Referenced by Garfield::TrackBichsel::TrackBichsel(), Garfield::TrackDegrade::TrackDegrade(), Garfield::TrackElectron::TrackElectron(), Garfield::TrackHeed::TrackHeed(), Garfield::TrackPAI::TrackPAI(), Garfield::TrackSimple::TrackSimple(), Garfield::TrackSrim::TrackSrim(), and Garfield::TrackTrim::TrackTrim().
Garfield::Track::Track | ( | const std::string & | name | ) |
Constructor.
Definition at line 13 of file Track.cc.
|
inlinevirtual |
|
inline |
void Garfield::Track::DisablePlotting | ( | ) |
|
inline |
void Garfield::Track::EnablePlotting | ( | ViewDrift * | viewer | ) |
|
inline |
Return the speed (
Definition at line 56 of file Track.hh.
Referenced by Garfield::TrackDegrade::NewTrack(), and Garfield::TrackHeed::NewTrack().
|
inline |
|
inline |
|
pure virtual |
Get the next "cluster" (ionising collision of the charged particle).
xc,yc,zc | coordinates of the collision |
tc | time of the collision |
nc | number of electrons produced |
ec | deposited energy |
extra | additional information (not always implemented) |
Implemented in Garfield::TrackBichsel, Garfield::TrackDegrade, Garfield::TrackElectron, Garfield::TrackHeed, Garfield::TrackPAI, Garfield::TrackSimple, Garfield::TrackSrim, and Garfield::TrackTrim.
|
inlinevirtual |
Get the cluster density (number of ionizing collisions per cm or inverse mean free path for ionization).
Reimplemented in Garfield::TrackBichsel, Garfield::TrackDegrade, Garfield::TrackElectron, Garfield::TrackHeed, Garfield::TrackPAI, and Garfield::TrackSimple.
Definition at line 89 of file Track.hh.
|
inline |
|
inline |
Return the Lorentz factor of the projectile.
Definition at line 58 of file Track.hh.
Referenced by Garfield::TrackHeed::Initialise(), and Garfield::TrackDegrade::NewTrack().
|
inline |
Return the kinetic energy of the projectile.
Definition at line 62 of file Track.hh.
Referenced by Garfield::TrackBichsel::ComputeCrossSection(), Garfield::TrackDegrade::Initialise(), Garfield::TrackBichsel::NewTrack(), Garfield::TrackDegrade::NewTrack(), Garfield::TrackPAI::NewTrack(), Garfield::TrackSrim::NewTrack(), and Garfield::TrackTrim::NewTrack().
|
inline |
|
inline |
|
inlinevirtual |
Get the stopping power (mean energy loss [eV] per cm).
Reimplemented in Garfield::TrackBichsel, Garfield::TrackDegrade, Garfield::TrackElectron, Garfield::TrackHeed, Garfield::TrackPAI, and Garfield::TrackSimple.
Definition at line 91 of file Track.hh.
|
pure virtual |
Calculate a new track starting from (x0, y0, z0) at time t0 in direction (dx0, dy0, dz0).
Implemented in Garfield::TrackBichsel, Garfield::TrackDegrade, Garfield::TrackElectron, Garfield::TrackHeed, Garfield::TrackPAI, Garfield::TrackSimple, Garfield::TrackSrim, and Garfield::TrackTrim.
|
protected |
Definition at line 195 of file Track.cc.
Referenced by Garfield::TrackHeed::NewTrack(), Garfield::TrackSrim::NewTrack(), and Garfield::TrackTrim::NewTrack().
|
protected |
Definition at line 190 of file Track.cc.
Referenced by Garfield::TrackHeed::NewTrack(), Garfield::TrackSrim::NewTrack(), and Garfield::TrackTrim::NewTrack().
void Garfield::Track::SetBeta | ( | const double | beta | ) |
void Garfield::Track::SetBetaGamma | ( | const double | bg | ) |
Set the relative momentum of the particle.
Definition at line 106 of file Track.cc.
Referenced by Track(), Garfield::TrackDegrade::TrackDegrade(), and Garfield::TrackElectron::TrackElectron().
void Garfield::Track::SetEnergy | ( | const double | e | ) |
void Garfield::Track::SetGamma | ( | const double | gamma | ) |
void Garfield::Track::SetKineticEnergy | ( | const double | ekin | ) |
Set the kinetic energy of the particle.
Definition at line 156 of file Track.cc.
Referenced by Garfield::TrackTrim::ReadFile().
void Garfield::Track::SetMomentum | ( | const double | p | ) |
|
virtual |
Set the type of charged particle.
Reimplemented in Garfield::TrackDegrade, Garfield::TrackElectron, and Garfield::TrackTrim.
Definition at line 18 of file Track.cc.
Referenced by main().
void Garfield::Track::SetSensor | ( | Sensor * | s | ) |
|
staticprotected |
Definition at line 199 of file Track.cc.
Referenced by Garfield::TrackSrim::NewTrack(), Garfield::TrackTrim::NewTrack(), and Garfield::TrackSrim::TerminateBfield().
|
protected |
Definition at line 110 of file Track.hh.
Referenced by GetBeta(), GetBetaGamma(), GetGamma(), GetMomentum(), Garfield::TrackElectron::NewTrack(), SetBeta(), SetBetaGamma(), SetEnergy(), SetGamma(), SetKineticEnergy(), and SetMomentum().
|
protected |
Definition at line 104 of file Track.hh.
Referenced by Garfield::TrackBichsel::ComputeCrossSection(), EnablePlotting(), Garfield::TrackSrim::EstimateRange(), Garfield::TrackSrim::GetCluster(), Garfield::TrackTrim::GetCluster(), Garfield::TrackHeed::GetClusterDensity(), Garfield::TrackPAI::GetClusterDensity(), Garfield::TrackHeed::GetElectron(), Garfield::TrackHeed::GetIon(), Garfield::TrackHeed::GetPhoton(), Garfield::TrackHeed::GetStoppingPower(), Garfield::TrackPAI::GetStoppingPower(), Garfield::TrackBichsel::Initialise(), Garfield::TrackDegrade::Initialise(), Garfield::TrackHeed::Initialise(), Garfield::TrackBichsel::NewTrack(), Garfield::TrackDegrade::NewTrack(), Garfield::TrackElectron::NewTrack(), Garfield::TrackHeed::NewTrack(), Garfield::TrackPAI::NewTrack(), Garfield::TrackSimple::NewTrack(), Garfield::TrackSrim::NewTrack(), Garfield::TrackTrim::NewTrack(), Garfield::TrackSrim::PreciseLoss(), Garfield::TrackTrim::Print(), Garfield::TrackSrim::ReadFile(), Garfield::TrackTrim::ReadFile(), SetBeta(), SetBetaGamma(), Garfield::TrackSimple::SetClusterDensity(), SetEnergy(), Garfield::TrackHeed::SetEnergyMesh(), SetGamma(), SetKineticEnergy(), SetMomentum(), SetParticle(), Garfield::TrackDegrade::SetParticle(), Garfield::TrackElectron::SetParticle(), Garfield::TrackTrim::SetParticle(), Garfield::TrackHeed::SetParticleUser(), SetSensor(), Garfield::TrackSimple::SetStoppingPower(), Garfield::TrackDegrade::SetThresholdEnergy(), Garfield::TrackDegrade::SetupPenning(), Garfield::TrackSrim::SmallestStep(), Track(), Garfield::TrackDegrade::TransportDeltaElectron(), Garfield::TrackHeed::TransportDeltaElectron(), and Garfield::TrackHeed::TransportPhoton().
|
protected |
Definition at line 120 of file Track.hh.
Referenced by Garfield::TrackBichsel::ComputeCrossSection(), DisableDebugging(), EnableDebugging(), Garfield::TrackSrim::EstimateRange(), Garfield::TrackSrim::GetCluster(), Garfield::TrackTrim::GetCluster(), Garfield::TrackBichsel::Initialise(), Garfield::TrackHeed::Initialise(), Garfield::TrackBichsel::NewTrack(), Garfield::TrackDegrade::NewTrack(), Garfield::TrackHeed::NewTrack(), Garfield::TrackSimple::NewTrack(), Garfield::TrackSrim::NewTrack(), Garfield::TrackTrim::NewTrack(), Garfield::TrackSrim::PreciseLoss(), Garfield::TrackSrim::ReadFile(), Garfield::TrackSrim::RndmEnergyLoss(), Garfield::TrackDegrade::SetupPenning(), Garfield::TrackSrim::SmallestStep(), and Garfield::TrackDegrade::TransportDeltaElectron().
|
protected |
Definition at line 109 of file Track.hh.
Referenced by GetEnergy(), GetKineticEnergy(), Garfield::TrackSrim::NewTrack(), SetBeta(), SetBetaGamma(), SetEnergy(), SetGamma(), SetKineticEnergy(), and SetMomentum().
|
protected |
Definition at line 116 of file Track.hh.
Referenced by Garfield::TrackBichsel::GetClusterDensity(), Garfield::TrackDegrade::GetClusterDensity(), Garfield::TrackPAI::GetClusterDensity(), Garfield::TrackBichsel::GetStoppingPower(), Garfield::TrackDegrade::GetStoppingPower(), Garfield::TrackPAI::GetStoppingPower(), Garfield::TrackDegrade::Initialise(), Garfield::TrackBichsel::NewTrack(), Garfield::TrackDegrade::NewTrack(), Garfield::TrackHeed::NewTrack(), Garfield::TrackPAI::NewTrack(), SetBeta(), SetBetaGamma(), SetEnergy(), SetGamma(), SetKineticEnergy(), SetMomentum(), Garfield::TrackHeed::TransportDeltaElectron(), and Garfield::TrackHeed::TransportPhoton().
|
protected |
Definition at line 111 of file Track.hh.
Referenced by Garfield::TrackBichsel::ComputeCrossSection(), Garfield::TrackHeed::Initialise(), SetParticle(), Garfield::TrackHeed::SetParticleUser(), Garfield::TrackDegrade::TrackDegrade(), and Garfield::TrackElectron::TrackElectron().
|
protected |
Definition at line 108 of file Track.hh.
Referenced by Garfield::TrackBichsel::ComputeCrossSection(), GetKineticEnergy(), GetMass(), GetMomentum(), Garfield::TrackHeed::Initialise(), Garfield::TrackHeed::NewTrack(), Garfield::TrackTrim::NewTrack(), Garfield::TrackTrim::ReadFile(), SetBeta(), SetBetaGamma(), SetEnergy(), SetGamma(), SetKineticEnergy(), SetMomentum(), SetParticle(), Garfield::TrackHeed::SetParticleUser(), Track(), Garfield::TrackDegrade::TrackDegrade(), and Garfield::TrackElectron::TrackElectron().
|
protected |
Definition at line 112 of file Track.hh.
Referenced by Garfield::TrackHeed::NewTrack(), Garfield::TrackTrim::Print(), Garfield::TrackTrim::ReadFile(), SetParticle(), Garfield::TrackHeed::SetParticleUser(), Garfield::TrackDegrade::TrackDegrade(), and Garfield::TrackElectron::TrackElectron().
|
protected |
Definition at line 122 of file Track.hh.
Referenced by PlotCluster(), and PlotNewTrack().
|
protected |
Definition at line 106 of file Track.hh.
Referenced by Garfield::TrackBichsel::ComputeCrossSection(), GetCharge(), Garfield::TrackHeed::Initialise(), Garfield::TrackHeed::NewTrack(), Garfield::TrackTrim::NewTrack(), Garfield::TrackTrim::SetCharge(), SetParticle(), Garfield::TrackHeed::SetParticleUser(), Garfield::TrackDegrade::TrackDegrade(), Garfield::TrackElectron::TrackElectron(), and Garfield::TrackTrim::TrackTrim().
|
protected |
Definition at line 114 of file Track.hh.
Referenced by Garfield::TrackSrim::GetMedium(), Garfield::TrackHeed::Initialise(), Garfield::TrackDegrade::IsInside(), Garfield::TrackBichsel::NewTrack(), Garfield::TrackDegrade::NewTrack(), Garfield::TrackElectron::NewTrack(), Garfield::TrackHeed::NewTrack(), Garfield::TrackPAI::NewTrack(), Garfield::TrackSimple::NewTrack(), Garfield::TrackSrim::NewTrack(), Garfield::TrackTrim::NewTrack(), SetSensor(), Garfield::TrackSrim::TerminateBfield(), Garfield::TrackBichsel::TrackBichsel(), Garfield::TrackDegrade::TrackDegrade(), Garfield::TrackHeed::TrackHeed(), Garfield::TrackSimple::TrackSimple(), Garfield::TrackSrim::TrackSrim(), Garfield::TrackTrim::TrackTrim(), Garfield::TrackDegrade::TransportDeltaElectron(), Garfield::TrackHeed::TransportDeltaElectron(), and Garfield::TrackHeed::TransportPhoton().
|
protected |
Definition at line 107 of file Track.hh.
Referenced by SetParticle(), Garfield::TrackHeed::SetParticleUser(), Garfield::TrackDegrade::TrackDegrade(), and Garfield::TrackElectron::TrackElectron().
|
protected |
Definition at line 118 of file Track.hh.
Referenced by DisablePlotting(), EnablePlotting(), Garfield::TrackHeed::NewTrack(), Garfield::TrackSrim::NewTrack(), Garfield::TrackTrim::NewTrack(), PlotCluster(), and PlotNewTrack().