Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Generate tracks using Heed++. More...
#include <TrackHeed.hh>
Public Member Functions | |
TrackHeed () | |
Constructor. | |
virtual | ~TrackHeed () |
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 |
bool | GetCluster (double &xcls, double &ycls, double &zcls, double &tcls, int &n, double &e, double &extra) override |
bool | GetCluster (double &xcls, double &ycls, double &zcls, double &tcls, int &ne, int &ni, double &e, double &extra) |
bool | GetElectron (const unsigned int i, double &x, double &y, double &z, double &t, double &e, double &dx, double &dy, double &dz) |
bool | GetIon (const unsigned int i, double &x, double &y, double &z, double &t) const |
double | GetClusterDensity () override |
double | GetStoppingPower () override |
Get the stopping power (mean energy loss [eV] per cm). | |
double | GetW () const |
Return the W value of the medium (of the last simulated track). | |
double | GetFanoFactor () const |
Return the Fano factor of the medium (of the last simulated track). | |
double | GetPhotoAbsorptionCrossSection (const double e) const |
Return the photoabsorption cross-section at a given energy. | |
bool | Initialise (Medium *medium) |
Compute the differential cross-section for a given medium. | |
void | TransportDeltaElectron (const double x0, const double y0, const double z0, const double t0, const double e0, const double dx0, const double dy0, const double dz0, int &ne, int &ni) |
void | TransportDeltaElectron (const double x0, const double y0, const double z0, const double t0, const double e0, const double dx0, const double dy0, const double dz0, int &ne) |
void | TransportPhoton (const double x0, const double y0, const double z0, const double t0, const double e0, const double dx0, const double dy0, const double dz0, int &ne, int &ni) |
void | TransportPhoton (const double x0, const double y0, const double z0, const double t0, const double e0, const double dx0, const double dy0, const double dz0, int &ne) |
void | EnableElectricField () |
Take the electric field into account in the stepping algorithm. | |
void | DisableElectricField () |
Do not take the electric field into account in the stepping algorithm. | |
void | EnableMagneticField () |
Take the magnetic field into account in the stepping algorithm. | |
void | DisableMagneticField () |
Do not take the magnetic field into account in the stepping algorithm. | |
void | SetSteppingLimits (const double maxStep, const double radStraight, const double stepAngleStraight, const double stepAngleCurved) |
void | GetSteppingLimits (double &maxStep, double &radStraight, double &stepAngleStraight, double &stepAngleCurved) |
void | EnableDeltaElectronTransport () |
Switch simulation of delta electrons on. | |
void | DisableDeltaElectronTransport () |
Switch simulation of delta electrons off. | |
void | EnablePhotonReabsorption (const bool on=true) |
Simulate (or not) the photons produced in the atomic relaxation cascade. | |
void | EnablePhotoAbsorptionCrossSectionOutput (const bool on) |
Write the photoabsorption cross-sections used to a text file. | |
void | SetEnergyMesh (const double e0, const double e1, const int nsteps) |
void | SetParticleUser (const double m, const double z) |
void | EnableOneStepFly (const bool on) |
Public Member Functions inherited from Garfield::Track | |
Track () | |
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 ( ) 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 of the projectile. | |
double | GetBeta () const |
Return the speed ( ) 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 |
virtual bool | GetCluster (double &xcls, double &ycls, double &zcls, double &tcls, int &n, double &e, 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. | |
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) |
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 |
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 |
Generate tracks using Heed++.
Definition at line 35 of file TrackHeed.hh.
Garfield::TrackHeed::TrackHeed | ( | ) |
Constructor.
Definition at line 49 of file TrackHeed.cc.
|
virtual |
|
inline |
Switch simulation of delta electrons off.
Definition at line 161 of file TrackHeed.hh.
void Garfield::TrackHeed::DisableElectricField | ( | ) |
Do not take the electric field into account in the stepping algorithm.
Definition at line 677 of file TrackHeed.cc.
void Garfield::TrackHeed::DisableMagneticField | ( | ) |
Do not take the magnetic field into account in the stepping algorithm.
Definition at line 679 of file TrackHeed.cc.
|
inline |
Switch simulation of delta electrons on.
Definition at line 159 of file TrackHeed.hh.
Referenced by GarfieldPhysics::InitializePhysics().
void Garfield::TrackHeed::EnableElectricField | ( | ) |
Take the electric field into account in the stepping algorithm.
Definition at line 676 of file TrackHeed.cc.
void Garfield::TrackHeed::EnableMagneticField | ( | ) |
Take the magnetic field into account in the stepping algorithm.
Definition at line 678 of file TrackHeed.cc.
Referenced by main().
|
inline |
Definition at line 182 of file TrackHeed.hh.
|
inline |
Write the photoabsorption cross-sections used to a text file.
Definition at line 169 of file TrackHeed.hh.
|
inline |
Simulate (or not) the photons produced in the atomic relaxation cascade.
Definition at line 164 of file TrackHeed.hh.
|
overridevirtual |
Get the next "cluster" (ionising collision of the charged particle).
xcls,ycls,zcls | coordinates of the collision |
tcls | time of the collision |
n | number of electrons produced |
e | deposited energy |
extra | additional information (not always implemented) |
Implements Garfield::Track.
Definition at line 222 of file TrackHeed.cc.
Referenced by GarfieldPhysics::DoIt(), GetCluster(), and main().
bool Garfield::TrackHeed::GetCluster | ( | double & | xcls, |
double & | ycls, | ||
double & | zcls, | ||
double & | tcls, | ||
int & | ne, | ||
int & | ni, | ||
double & | e, | ||
double & | extra | ||
) |
Definition at line 228 of file TrackHeed.cc.
|
overridevirtual |
Get the cluster density (number of ionizing collisions per cm or inverse mean free path for ionization).
Reimplemented from Garfield::Track.
Definition at line 200 of file TrackHeed.cc.
bool Garfield::TrackHeed::GetElectron | ( | const unsigned int | i, |
double & | x, | ||
double & | y, | ||
double & | z, | ||
double & | t, | ||
double & | e, | ||
double & | dx, | ||
double & | dy, | ||
double & | dz | ||
) |
Retrieve the properties of a conduction or delta electron in the current cluster.
i | index of the electron |
x,y,z | coordinates of the electron |
t | time |
e | kinetic energy (only meaningful for delta-electrons) |
dx,dy,dz | direction vector (only meaningful for delta-electrons) |
Definition at line 354 of file TrackHeed.cc.
Referenced by GarfieldPhysics::DoIt(), and main().
double Garfield::TrackHeed::GetFanoFactor | ( | ) | const |
Return the Fano factor of the medium (of the last simulated track).
Definition at line 1048 of file TrackHeed.cc.
bool Garfield::TrackHeed::GetIon | ( | const unsigned int | i, |
double & | x, | ||
double & | y, | ||
double & | z, | ||
double & | t | ||
) | const |
Retrieve the properties of an ion in the current cluster.
i | index of the ion |
x,y,z | coordinates of the ion |
t | time |
Definition at line 398 of file TrackHeed.cc.
double Garfield::TrackHeed::GetPhotoAbsorptionCrossSection | ( | const double | e | ) | const |
Return the photoabsorption cross-section at a given energy.
Definition at line 1050 of file TrackHeed.cc.
|
inline |
Definition at line 150 of file TrackHeed.hh.
|
overridevirtual |
Get the stopping power (mean energy loss [eV] per cm).
Reimplemented from Garfield::Track.
Definition at line 211 of file TrackHeed.cc.
double Garfield::TrackHeed::GetW | ( | ) | const |
Return the W value of the medium (of the last simulated track).
Definition at line 1047 of file TrackHeed.cc.
Referenced by GarfieldPhysics::DoIt().
bool Garfield::TrackHeed::Initialise | ( | Medium * | medium | ) |
Compute the differential cross-section for a given medium.
Definition at line 720 of file TrackHeed.cc.
Referenced by NewTrack(), TransportDeltaElectron(), and TransportPhoton().
|
overridevirtual |
Calculate a new track starting from (x0, y0, z0) at time t0 in direction (dx0, dy0, dz0).
Implements Garfield::Track.
Definition at line 59 of file TrackHeed.cc.
Referenced by GarfieldPhysics::DoIt(), and main().
void Garfield::TrackHeed::SetEnergyMesh | ( | const double | e0, |
const double | e1, | ||
const int | nsteps | ||
) |
Specify the energy mesh to be used.
e0,e1 | lower/higher limit of the energy range [eV] |
nsteps | number of intervals |
Definition at line 681 of file TrackHeed.cc.
void Garfield::TrackHeed::SetParticleUser | ( | const double | m, |
const double | z | ||
) |
Define particle mass and charge (for exotic particles). For standard particles Track::SetParticle should be used.
Definition at line 703 of file TrackHeed.cc.
|
inline |
Set parameters for calculating the particle trajectory.
maxStep | maximum step length |
radStraight | radius beyond which to approximate circles by polylines. |
stepAngleStraight | max. angular step (in radian) when using polyline steps. |
stepAngleCurved | max. angular step (in radian) when using circular steps. |
Definition at line 142 of file TrackHeed.hh.
void Garfield::TrackHeed::TransportDeltaElectron | ( | const double | x0, |
const double | y0, | ||
const double | z0, | ||
const double | t0, | ||
const double | e0, | ||
const double | dx0, | ||
const double | dy0, | ||
const double | dz0, | ||
int & | ne | ||
) |
Simulate a delta electron.
x0,y0,z0 | initial position of the delta electron |
t0 | initial time |
e0 | initial kinetic energy of the delta electron |
dx0,dy0,dz0 | initial direction of the delta electron |
ne | number of electrons produced by the delta electron |
Definition at line 413 of file TrackHeed.cc.
void Garfield::TrackHeed::TransportDeltaElectron | ( | const double | x0, |
const double | y0, | ||
const double | z0, | ||
const double | t0, | ||
const double | e0, | ||
const double | dx0, | ||
const double | dy0, | ||
const double | dz0, | ||
int & | ne, | ||
int & | ni | ||
) |
Simulate a delta electron.
x0,y0,z0 | initial position of the delta electron |
t0 | initial time |
e0 | initial kinetic energy of the delta electron |
dx0,dy0,dz0 | initial direction of the delta electron |
ne,ni | number of electrons/ions produced by the delta electron |
Definition at line 422 of file TrackHeed.cc.
Referenced by GarfieldPhysics::DoIt(), and TransportDeltaElectron().
void Garfield::TrackHeed::TransportPhoton | ( | const double | x0, |
const double | y0, | ||
const double | z0, | ||
const double | t0, | ||
const double | e0, | ||
const double | dx0, | ||
const double | dy0, | ||
const double | dz0, | ||
int & | ne | ||
) |
Simulate a photon.
x0,y0,z0 | initial position of the photon |
t0 | initial time |
e0 | initial energy of the photon |
dx0,dy0,dz0 | initial direction of the photon |
ne | number of electrons produced by the photon |
Definition at line 527 of file TrackHeed.cc.
void Garfield::TrackHeed::TransportPhoton | ( | const double | x0, |
const double | y0, | ||
const double | z0, | ||
const double | t0, | ||
const double | e0, | ||
const double | dx0, | ||
const double | dy0, | ||
const double | dz0, | ||
int & | ne, | ||
int & | ni | ||
) |
Simulate a photon.
x0,y0,z0 | initial position of the photon |
t0 | initial time |
e0 | initial energy of the photon |
dx0,dy0,dz0 | initial direction of the photon |
ne,ni | number of electrons/ions produced by the photon |
Definition at line 535 of file TrackHeed.cc.
Referenced by GarfieldPhysics::DoIt(), and TransportPhoton().