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

Generate tracks based on a cluster density given by the user. More...

#include <TrackSimple.hh>

Inheritance diagram for Garfield::TrackSimple:
Garfield::Track

Classes

struct  Cluster

Public Member Functions

 TrackSimple ()
 Default constructor.
 TrackSimple (Sensor *sensor)
 Constructor.
virtual ~TrackSimple ()
 Destructor.
void SetEqualSpacing ()
 Constant distance between clusters.
void SetExponentialSpacing ()
 Exponentially distributed distance between clusters.
void SetClusterDensity (const double d)
 Set the cluster density (inverse mean free path).
double GetClusterDensity () override
 Get the cluster density (number of ionizing collisions per cm or inverse mean free path for ionization).
void SetStoppingPower (const double dedx)
 Set the stopping power (dE/dx).
double GetStoppingPower () override
 Get the stopping power (mean energy loss [eV] per cm).
bool NewTrack (const double x0, const double y0, const double z0, const double t0, const double dx0, const double dy0, const double dz0) override
 Calculate a new track starting from (x0, y0, z0) at time t0 in direction (dx0, dy0, dz0).
const std::vector< Cluster > & GetClusters () const
Public Member Functions inherited from Garfield::Track
 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.
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 Attributes

double m_mfp = 0.04
double m_eloss = 2530.
bool m_useEqualSpacing = false
std::vector< Clusterm_clusters
Protected Attributes inherited from Garfield::Track
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

Additional Inherited Members

Protected Member Functions inherited from Garfield::Track
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 inherited from Garfield::Track
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)

Detailed Description

Generate tracks based on a cluster density given by the user.

Definition at line 12 of file TrackSimple.hh.

Constructor & Destructor Documentation

◆ TrackSimple() [1/2]

Garfield::TrackSimple::TrackSimple ( )
inline

Default constructor.

Definition at line 20 of file TrackSimple.hh.

20: TrackSimple(nullptr) {}
TrackSimple()
Default constructor.

◆ TrackSimple() [2/2]

Garfield::TrackSimple::TrackSimple ( Sensor * sensor)

Constructor.

◆ ~TrackSimple()

virtual Garfield::TrackSimple::~TrackSimple ( )
inlinevirtual

Destructor.

Definition at line 24 of file TrackSimple.hh.

24{}

Member Function Documentation

◆ GetClusterDensity()

double Garfield::TrackSimple::GetClusterDensity ( )
overridevirtual

Get the cluster density (number of ionizing collisions per cm or inverse mean free path for ionization).

Reimplemented from Garfield::Track.

◆ GetClusters()

const std::vector< Cluster > & Garfield::TrackSimple::GetClusters ( ) const
inline

Definition at line 41 of file TrackSimple.hh.

41{ return m_clusters; }
std::vector< Cluster > m_clusters

◆ GetStoppingPower()

double Garfield::TrackSimple::GetStoppingPower ( )
overridevirtual

Get the stopping power (mean energy loss [eV] per cm).

Reimplemented from Garfield::Track.

◆ NewTrack()

bool Garfield::TrackSimple::NewTrack ( const double x0,
const double y0,
const double z0,
const double t0,
const double dx0,
const double dy0,
const double dz0 )
overridevirtual

Calculate a new track starting from (x0, y0, z0) at time t0 in direction (dx0, dy0, dz0).

Implements Garfield::Track.

◆ SetClusterDensity()

void Garfield::TrackSimple::SetClusterDensity ( const double d)

Set the cluster density (inverse mean free path).

◆ SetEqualSpacing()

void Garfield::TrackSimple::SetEqualSpacing ( )
inline

Constant distance between clusters.

Definition at line 27 of file TrackSimple.hh.

27{ m_useEqualSpacing = true; }

◆ SetExponentialSpacing()

void Garfield::TrackSimple::SetExponentialSpacing ( )
inline

Exponentially distributed distance between clusters.

Definition at line 29 of file TrackSimple.hh.

29{ m_useEqualSpacing = false; }

◆ SetStoppingPower()

void Garfield::TrackSimple::SetStoppingPower ( const double dedx)

Set the stopping power (dE/dx).

Member Data Documentation

◆ m_clusters

std::vector<Cluster> Garfield::TrackSimple::m_clusters
protected

Definition at line 51 of file TrackSimple.hh.

◆ m_eloss

double Garfield::TrackSimple::m_eloss = 2530.
protected

Definition at line 47 of file TrackSimple.hh.

◆ m_mfp

double Garfield::TrackSimple::m_mfp = 0.04
protected

Definition at line 45 of file TrackSimple.hh.

◆ m_useEqualSpacing

bool Garfield::TrackSimple::m_useEqualSpacing = false
protected

Definition at line 49 of file TrackSimple.hh.


The documentation for this class was generated from the following file: