Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
Loading...
Searching...
No Matches
Garfield::Track Class Referenceabstract

Abstract base class for track generation. More...

#include <Track.hh>

Inheritance diagram for Garfield::Track:
Garfield::TrackBichsel Garfield::TrackDegrade Garfield::TrackElectron Garfield::TrackHeed Garfield::TrackPAI Garfield::TrackSimple Garfield::TrackSrim Garfield::TrackTrim

Public Member Functions

 Track ()=delete
 Default constructor.
 Track (const std::string &name)
 Constructor.
virtual ~Track ()
 Destructor.
virtual void SetParticle (const std::string &part)
 Set the type of charged particle.
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 ( $\beta = v/c$) of the particle.
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 $\beta\gamma$ of the projectile.
double GetBeta () const
 Return the speed ( $\beta = v/c$) of the projectile.
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
 Calculate a new track starting from (x0, y0, z0) at time t0 in direction (dx0, dy0, dz0).
virtual double GetClusterDensity ()
 Get the cluster density (number of ionizing collisions per cm or inverse mean free path for ionization).
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
ViewDriftm_viewer = nullptr
bool m_debug = false
size_t m_plotId = 0

Detailed Description

Abstract base class for track generation.

Definition at line 15 of file Track.hh.

Constructor & Destructor Documentation

◆ Track() [1/2]

Garfield::Track::Track ( )
delete

Default constructor.

◆ Track() [2/2]

Garfield::Track::Track ( const std::string & name)

Constructor.

◆ ~Track()

virtual Garfield::Track::~Track ( )
inlinevirtual

Destructor.

Definition at line 22 of file Track.hh.

22{}

Member Function Documentation

◆ DisableDebugging()

void Garfield::Track::DisableDebugging ( )
inline

Switch off debugging messages.

Definition at line 93 of file Track.hh.

93{ m_debug = false; }

◆ DisablePlotting()

void Garfield::Track::DisablePlotting ( )

Switch off plotting.

◆ EnableDebugging()

void Garfield::Track::EnableDebugging ( )
inline

Switch on debugging messages.

Definition at line 91 of file Track.hh.

91{ m_debug = true; }

◆ EnablePlotting()

void Garfield::Track::EnablePlotting ( ViewDrift * viewer)

Switch on plotting.

◆ GetBeta()

double Garfield::Track::GetBeta ( ) const
inline

Return the speed ( $\beta = v/c$) of the projectile.

Definition at line 57 of file Track.hh.

57{ return sqrt(m_beta2); }
double m_beta2
Definition Track.hh:102

◆ GetBetaGamma()

double Garfield::Track::GetBetaGamma ( ) const
inline

Return the $\beta\gamma$ of the projectile.

Definition at line 55 of file Track.hh.

55{ return sqrt(m_beta2 / (1. - m_beta2)); }

◆ GetCharge()

double Garfield::Track::GetCharge ( ) const
inline

Get the charge of the projectile.

Definition at line 66 of file Track.hh.

66{ return m_q; }
double m_q
Definition Track.hh:98

◆ GetClusterDensity()

virtual double Garfield::Track::GetClusterDensity ( )
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 81 of file Track.hh.

81{ return 0.; }

◆ GetEnergy()

double Garfield::Track::GetEnergy ( ) const
inline

Return the particle energy.

Definition at line 53 of file Track.hh.

53{ return m_energy; }
double m_energy
Definition Track.hh:101

◆ GetGamma()

double Garfield::Track::GetGamma ( ) const
inline

Return the Lorentz factor of the projectile.

Definition at line 59 of file Track.hh.

59{ return sqrt(1. / (1. - m_beta2)); }

◆ GetKineticEnergy()

double Garfield::Track::GetKineticEnergy ( ) const
inline

Return the kinetic energy of the projectile.

Definition at line 63 of file Track.hh.

63{ return m_energy - m_mass; }
double m_mass
Definition Track.hh:100

◆ GetMass()

double Garfield::Track::GetMass ( ) const
inline

Get the mass [eV / c2] of the projectile.

Definition at line 68 of file Track.hh.

68{ return m_mass; }

◆ GetMomentum()

double Garfield::Track::GetMomentum ( ) const
inline

Return the particle momentum.

Definition at line 61 of file Track.hh.

61{ return m_mass * sqrt(m_beta2 / (1. - m_beta2)); }

◆ GetStoppingPower()

virtual double Garfield::Track::GetStoppingPower ( )
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 83 of file Track.hh.

83{ return 0.; }

◆ NewTrack()

virtual bool Garfield::Track::NewTrack ( const double x0,
const double y0,
const double z0,
const double t0,
const double dx0,
const double dy0,
const double dz0 )
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.

◆ PlotCluster()

void Garfield::Track::PlotCluster ( const double x0,
const double y0,
const double z0 )
protected

◆ PlotNewTrack()

void Garfield::Track::PlotNewTrack ( const double x0,
const double y0,
const double z0 )
protected

◆ SetBeta()

void Garfield::Track::SetBeta ( const double beta)

Set the speed ( $\beta = v/c$) of the particle.

◆ SetBetaGamma()

void Garfield::Track::SetBetaGamma ( const double bg)

Set the relative momentum of the particle.

◆ SetEnergy()

void Garfield::Track::SetEnergy ( const double e)

Set the particle energy.

◆ SetGamma()

void Garfield::Track::SetGamma ( const double gamma)

Set the Lorentz factor of the particle.

◆ SetKineticEnergy()

void Garfield::Track::SetKineticEnergy ( const double ekin)

Set the kinetic energy of the particle.

◆ SetMomentum()

void Garfield::Track::SetMomentum ( const double p)

Set the particle momentum.

◆ SetParticle()

virtual void Garfield::Track::SetParticle ( const std::string & part)
virtual

Set the type of charged particle.

  • electron,e-
  • positron,e+
  • muon,mu-
  • mu+
  • pion,pi-
  • pi+
  • kaon,K-
  • K+
  • proton,p
  • anti-proton,p-bar
  • deuteron,d
  • alpha

Reimplemented in Garfield::TrackDegrade, Garfield::TrackElectron, and Garfield::TrackTrim.

◆ SetSensor()

void Garfield::Track::SetSensor ( Sensor * s)

Set the sensor through which to transport the particle.

◆ StepBfield()

std::array< double, 3 > Garfield::Track::StepBfield ( const double dt,
const double qoverm,
const double vmag,
double bx,
double by,
double bz,
std::array< double, 3 > & dir )
staticprotected

Member Data Documentation

◆ m_beta2

double Garfield::Track::m_beta2 = 1.
protected

Definition at line 102 of file Track.hh.

◆ m_className

std::string Garfield::Track::m_className = "Track"
protected

Definition at line 96 of file Track.hh.

◆ m_debug

bool Garfield::Track::m_debug = false
protected

Definition at line 112 of file Track.hh.

◆ m_energy

double Garfield::Track::m_energy = 0.
protected

Definition at line 101 of file Track.hh.

◆ m_isChanged

bool Garfield::Track::m_isChanged = true
protected

Definition at line 108 of file Track.hh.

◆ m_isElectron

bool Garfield::Track::m_isElectron = false
protected

Definition at line 103 of file Track.hh.

◆ m_mass

double Garfield::Track::m_mass
protected

Definition at line 100 of file Track.hh.

◆ m_particleName

std::string Garfield::Track::m_particleName = "mu-"
protected

Definition at line 104 of file Track.hh.

◆ m_plotId

size_t Garfield::Track::m_plotId = 0
protected

Definition at line 114 of file Track.hh.

◆ m_q

double Garfield::Track::m_q = -1.
protected

Definition at line 98 of file Track.hh.

◆ m_sensor

Sensor* Garfield::Track::m_sensor = nullptr
protected

Definition at line 106 of file Track.hh.

◆ m_spin

int Garfield::Track::m_spin = 1
protected

Definition at line 99 of file Track.hh.

◆ m_viewer

ViewDrift* Garfield::Track::m_viewer = nullptr
protected

Definition at line 110 of file Track.hh.


The documentation for this class was generated from the following file:
  • /builds/garfield/docs/source/Include/Garfield/Track.hh