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

Interface to Degrade. More...

#include <TrackDegrade.hh>

Inheritance diagram for Garfield::TrackDegrade:
Garfield::Track

Classes

struct  Cluster
struct  Electron
struct  Excitation

Public Member Functions

 TrackDegrade ()
 Default constructor.
 TrackDegrade (Sensor *sensor)
 Constructor.
virtual ~TrackDegrade ()
 Destructor.
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
double GetClusterDensity () override
 Get the cluster density (number of ionizing collisions per cm or inverse mean free path for ionization).
double GetStoppingPower () override
 Get the stopping power (mean energy loss [eV] per cm).
bool Initialise (Medium *medium, const bool verbose=false)
void SetThresholdEnergy (const double eth)
 Set the energy down to which electrons are tracked (default: 2 eV).
void StoreExcitations (const bool on=true, const double thr=4.)
 Store excitations in the cluster or not (off by default).
void EnableBremsstrahlung (const bool on=true)
 Enable or disable bremsstrahlung.
void EnableFullCascade (const bool on=true)
 Enable or disable detailed simulation of the deexcitation cascade.
void SetParticle (const std::string &particle) override
 Set the type of charged particle.
Public Member Functions inherited from Garfield::Track
 Track ()=delete
 Default constructor.
 Track (const std::string &name)
 Constructor.
virtual ~Track ()
 Destructor.
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 Member Functions

std::pair< std::vector< Electron >, std::vector< Excitation > > TransportDeltaElectron (const double x0, const double y0, const double z0, const double t0, const double e0, const double dx, const double dy, const double dz)
void SetupPenning (Medium *medium, std::array< double, 6 > &rP, std::array< double, 6 > &dP)
bool IsInside (const double x, const double y, const double z)
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)

Protected Attributes

std::vector< Clusterm_clusters
bool m_penning = true
bool m_bremsStrahlung = true
bool m_fullCascade = true
bool m_storeExcitations = false
double m_ethrExc = 4.
double m_ethr = 2.
double m_pressure = -1.
double m_temperature = -1.
std::string m_mediumName = ""
unsigned int m_nGas = 0
double m_dedx = -1.
double m_clusterDensity = -1.
std::array< double, 6 > m_rPenning
std::array< double, 6 > m_dPenning
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

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

Interface to Degrade.

Definition at line 14 of file TrackDegrade.hh.

Constructor & Destructor Documentation

◆ TrackDegrade() [1/2]

Garfield::TrackDegrade::TrackDegrade ( )
inline

Default constructor.

Definition at line 43 of file TrackDegrade.hh.

43: TrackDegrade(nullptr) {}
TrackDegrade()
Default constructor.

◆ TrackDegrade() [2/2]

Garfield::TrackDegrade::TrackDegrade ( Sensor * sensor)

Constructor.

◆ ~TrackDegrade()

virtual Garfield::TrackDegrade::~TrackDegrade ( )
inlinevirtual

Destructor.

Definition at line 47 of file TrackDegrade.hh.

47{}

Member Function Documentation

◆ EnableBremsstrahlung()

void Garfield::TrackDegrade::EnableBremsstrahlung ( const bool on = true)
inline

Enable or disable bremsstrahlung.

Definition at line 66 of file TrackDegrade.hh.

◆ EnableFullCascade()

void Garfield::TrackDegrade::EnableFullCascade ( const bool on = true)
inline

Enable or disable detailed simulation of the deexcitation cascade.

Definition at line 68 of file TrackDegrade.hh.

◆ GetClusterDensity()

double Garfield::TrackDegrade::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::TrackDegrade::GetClusters ( ) const
inline

Definition at line 52 of file TrackDegrade.hh.

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

◆ GetStoppingPower()

double Garfield::TrackDegrade::GetStoppingPower ( )
overridevirtual

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

Reimplemented from Garfield::Track.

◆ Initialise()

bool Garfield::TrackDegrade::Initialise ( Medium * medium,
const bool verbose = false )

◆ IsInside()

bool Garfield::TrackDegrade::IsInside ( const double x,
const double y,
const double z )
protected

◆ NewTrack()

bool Garfield::TrackDegrade::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.

◆ SetParticle()

void Garfield::TrackDegrade::SetParticle ( const std::string & part)
overridevirtual

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 from Garfield::Track.

◆ SetThresholdEnergy()

void Garfield::TrackDegrade::SetThresholdEnergy ( const double eth)

Set the energy down to which electrons are tracked (default: 2 eV).

◆ SetupPenning()

void Garfield::TrackDegrade::SetupPenning ( Medium * medium,
std::array< double, 6 > & rP,
std::array< double, 6 > & dP )
protected

◆ StoreExcitations()

void Garfield::TrackDegrade::StoreExcitations ( const bool on = true,
const double thr = 4. )
inline

Store excitations in the cluster or not (off by default).

Definition at line 61 of file TrackDegrade.hh.

61 {
63 m_ethrExc = std::max(thr, 1.e-3);
64 }

◆ TransportDeltaElectron()

std::pair< std::vector< Electron >, std::vector< Excitation > > Garfield::TrackDegrade::TransportDeltaElectron ( const double x0,
const double y0,
const double z0,
const double t0,
const double e0,
const double dx,
const double dy,
const double dz )
protected

Member Data Documentation

◆ m_bremsStrahlung

bool Garfield::TrackDegrade::m_bremsStrahlung = true
protected

Definition at line 76 of file TrackDegrade.hh.

◆ m_clusterDensity

double Garfield::TrackDegrade::m_clusterDensity = -1.
protected

Definition at line 90 of file TrackDegrade.hh.

◆ m_clusters

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

Definition at line 73 of file TrackDegrade.hh.

◆ m_dedx

double Garfield::TrackDegrade::m_dedx = -1.
protected

Definition at line 89 of file TrackDegrade.hh.

◆ m_dPenning

std::array<double, 6> Garfield::TrackDegrade::m_dPenning
protected

Definition at line 93 of file TrackDegrade.hh.

◆ m_ethr

double Garfield::TrackDegrade::m_ethr = 2.
protected

Definition at line 82 of file TrackDegrade.hh.

◆ m_ethrExc

double Garfield::TrackDegrade::m_ethrExc = 4.
protected

Definition at line 80 of file TrackDegrade.hh.

◆ m_fullCascade

bool Garfield::TrackDegrade::m_fullCascade = true
protected

Definition at line 77 of file TrackDegrade.hh.

◆ m_mediumName

std::string Garfield::TrackDegrade::m_mediumName = ""
protected

Definition at line 86 of file TrackDegrade.hh.

◆ m_nGas

unsigned int Garfield::TrackDegrade::m_nGas = 0
protected

Definition at line 87 of file TrackDegrade.hh.

◆ m_penning

bool Garfield::TrackDegrade::m_penning = true
protected

Definition at line 75 of file TrackDegrade.hh.

◆ m_pressure

double Garfield::TrackDegrade::m_pressure = -1.
protected

Definition at line 84 of file TrackDegrade.hh.

◆ m_rPenning

std::array<double, 6> Garfield::TrackDegrade::m_rPenning
protected

Definition at line 92 of file TrackDegrade.hh.

◆ m_storeExcitations

bool Garfield::TrackDegrade::m_storeExcitations = false
protected

Definition at line 78 of file TrackDegrade.hh.

◆ m_temperature

double Garfield::TrackDegrade::m_temperature = -1.
protected

Definition at line 85 of file TrackDegrade.hh.


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