![]() |
Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
|
Generate tracks using Heed++. More...
#include <TrackHeed.hh>
Classes | |
struct | Cluster |
struct | Electron |
struct | Photon |
Public Member Functions | |
TrackHeed () | |
Default constructor. | |
TrackHeed (Sensor *sensor) | |
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 |
Calculate a new track starting from (x0, y0, z0) at time t0 in direction (dx0, dy0, dz0). | |
const std::vector< Cluster > & | GetClusters () const |
bool | GetCluster (double &xc, double &yc, double &zc, double &tc, int &nc, double &ec, double &extra) |
bool | GetCluster (double &xc, double &yc, double &zc, double &tc, int &ne, int &ni, double &ec, double &extra) |
bool | GetCluster (double &xc, double &yc, double &zc, double &tc, int &ne, int &ni, int &np, double &ec, double &extra) |
Get the next "cluster" (ionising collision of the charged particle). | |
bool | 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. | |
bool | GetIon (const unsigned int i, double &x, double &y, double &z, double &t) const |
Retrieve the properties of an ion in the current cluster. | |
bool | GetPhoton (const unsigned int i, double &x, double &y, double &z, double &t, double &e, double &dx, double &dy, double &dz) const |
Retrieve the properties of an unabsorbed photon. | |
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). | |
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, const bool verbose=false) |
Compute the differential cross-section for a given medium. | |
Cluster | 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) |
Simulate a delta electron. | |
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) |
Simulate a delta electron. | |
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) |
Simulate a delta electron. | |
Cluster | 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) |
Simulate a photon. | |
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, int &np) |
Simulate a photon. | |
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) |
Simulate a photon. | |
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) |
Simulate a photon. | |
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) |
Set parameters for calculating the particle trajectory. | |
void | GetSteppingLimits (double &maxStep, double &radStraight, double &stepAngleStraight, double &stepAngleCurved) |
void | CrossInactiveMedia (const bool on=true) |
void | EnableCoulombScattering (const bool on=true) |
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) |
Specify the energy mesh to be used. | |
void | SetParticleUser (const double m, const double z) |
Define particle mass and charge (for exotic particles). | |
void | EnableOneStepFly (const bool on) |
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 ( ![]() | |
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. | |
void | EnablePlotting (ViewDrift *viewer) |
Switch on plotting. | |
void | DisablePlotting () |
Switch off plotting. | |
void | EnableDebugging () |
Switch on debugging messages. | |
void | DisableDebugging () |
Switch off debugging messages. |
Private Member Functions | |
TrackHeed (const TrackHeed &heed) | |
TrackHeed & | operator= (const TrackHeed &heed) |
bool | SetupGas (Medium *medium) |
bool | SetupMaterial (Medium *medium) |
bool | SetupDelta (const std::string &databasePath) |
bool | AddCluster (Heed::HeedPhoton *virtualPhoton, std::vector< Cluster > &clusters) |
void | AddElectrons (const std::vector< Heed::HeedCondElectron > &conductionElectrons, std::vector< Electron > &electrons) |
bool | IsInside (const double x, const double y, const double z) |
bool | UpdateBoundingBox (bool &update) |
Private Attributes | |
bool | m_oneStepFly = false |
bool | m_ready = false |
bool | m_hasActiveTrack = false |
double | m_mediumDensity = -1. |
std::string | m_mediumName = "" |
bool | m_usePacsOutput = false |
bool | m_doPhotonReabsorption = true |
bool | m_crossInactiveMedia = false |
bool | m_coulombScattering = false |
bool | m_useBfieldAuto = true |
bool | m_doDeltaTransport = true |
std::vector< Cluster > | m_clusters |
size_t | m_cluster = 0 |
std::unique_ptr< Heed::particle_def > | m_particle_def |
std::unique_ptr< Heed::HeedMatterDef > | m_matter |
std::unique_ptr< Heed::GasDef > | m_gas |
std::unique_ptr< Heed::MatterDef > | m_material |
double | m_emin = 2.e-6 |
double | m_emax = 2.e-1 |
unsigned int | m_nEnergyIntervals = 200 |
std::unique_ptr< Heed::EnergyMesh > | m_energyMesh |
std::unique_ptr< Heed::EnTransfCS > | m_transferCs |
std::unique_ptr< Heed::ElElasticScat > | m_elScat |
std::unique_ptr< Heed::ElElasticScatLowSigma > | m_lowSigma |
std::unique_ptr< Heed::PairProd > | m_pairProd |
std::unique_ptr< Heed::HeedDeltaElectronCS > | m_deltaCs |
std::unique_ptr< HeedChamber > | m_chamber |
std::unique_ptr< HeedFieldMap > | m_fieldMap |
double | m_lX = 0. |
double | m_lY = 0. |
double | m_lZ = 0. |
double | m_cX = 0. |
double | m_cY = 0. |
double | m_cZ = 0. |
double | m_maxStep = 100. |
Max. step length. | |
double | m_radStraight = 1000. |
Bending radius beyond which to use straight-line approximation. | |
double | m_stepAngleStraight = 0.1 |
Angular step for curved trajectories approximated by straight-line steps. | |
double | m_stepAngleCurved = 0.2 |
Angular step for curved lines. |
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) |
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 |
ViewDrift * | m_viewer = nullptr |
bool | m_debug = false |
size_t | m_plotId = 0 |
Generate tracks using Heed++.
Definition at line 34 of file TrackHeed.hh.
|
inline |
Garfield::TrackHeed::TrackHeed | ( | Sensor * | sensor | ) |
Constructor.
|
virtual |
Destructor.
|
private |
|
private |
|
private |
|
inline |
Definition at line 250 of file TrackHeed.hh.
|
inline |
void Garfield::TrackHeed::DisableElectricField | ( | ) |
Do not take the electric field into account in the stepping algorithm.
void Garfield::TrackHeed::DisableMagneticField | ( | ) |
Do not take the magnetic field into account in the stepping algorithm.
|
inline |
Definition at line 251 of file TrackHeed.hh.
|
inline |
void Garfield::TrackHeed::EnableElectricField | ( | ) |
Take the electric field into account in the stepping algorithm.
void Garfield::TrackHeed::EnableMagneticField | ( | ) |
Take the magnetic field into account in the stepping algorithm.
|
inline |
Definition at line 278 of file TrackHeed.hh.
|
inline |
Write the photoabsorption cross-sections used to a text file.
Definition at line 265 of file TrackHeed.hh.
|
inline |
Simulate (or not) the photons produced in the atomic relaxation cascade.
Definition at line 260 of file TrackHeed.hh.
bool Garfield::TrackHeed::GetCluster | ( | double & | xc, |
double & | yc, | ||
double & | zc, | ||
double & | tc, | ||
int & | nc, | ||
double & | ec, | ||
double & | extra ) |
bool Garfield::TrackHeed::GetCluster | ( | double & | xc, |
double & | yc, | ||
double & | zc, | ||
double & | tc, | ||
int & | ne, | ||
int & | ni, | ||
double & | ec, | ||
double & | extra ) |
bool Garfield::TrackHeed::GetCluster | ( | double & | xc, |
double & | yc, | ||
double & | zc, | ||
double & | tc, | ||
int & | ne, | ||
int & | ni, | ||
int & | np, | ||
double & | ec, | ||
double & | extra ) |
Get the next "cluster" (ionising collision of the charged particle).
xc,yc,zc | coordinates of the collision |
tc | time of the collision |
ne | number of electrons |
ni | number of ions |
np | number of fluorescence photons |
ec | deposited energy |
extra | additional information (not always implemented) |
|
overridevirtual |
Get the cluster density (number of ionizing collisions per cm or inverse mean free path for ionization).
Reimplemented from Garfield::Track.
|
inline |
Definition at line 77 of file TrackHeed.hh.
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) |
double Garfield::TrackHeed::GetFanoFactor | ( | ) | const |
Return the Fano factor of the medium (of the last simulated track).
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 |
double Garfield::TrackHeed::GetPhotoAbsorptionCrossSection | ( | const double | e | ) | const |
Return the photoabsorption cross-section at a given energy.
bool Garfield::TrackHeed::GetPhoton | ( | const unsigned int | i, |
double & | x, | ||
double & | y, | ||
double & | z, | ||
double & | t, | ||
double & | e, | ||
double & | dx, | ||
double & | dy, | ||
double & | dz ) const |
Retrieve the properties of an unabsorbed photon.
i | index of the photon |
x,y,z | coordinates of the photon |
t | time |
e | photon energy |
dx,dy,dz | direction vector |
|
inline |
Definition at line 242 of file TrackHeed.hh.
|
overridevirtual |
Get the stopping power (mean energy loss [eV] per cm).
Reimplemented from Garfield::Track.
double Garfield::TrackHeed::GetW | ( | ) | const |
Return the W value of the medium (of the last simulated track).
bool Garfield::TrackHeed::Initialise | ( | Medium * | medium, |
const bool | verbose = false ) |
Compute the differential cross-section for a given medium.
|
private |
|
overridevirtual |
Calculate a new track starting from (x0, y0, z0) at time t0 in direction (dx0, dy0, dz0).
Implements Garfield::Track.
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 |
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.
|
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 234 of file TrackHeed.hh.
|
private |
|
private |
|
private |
Cluster 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 ) |
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 |
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 |
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 |
Cluster 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 ) |
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 |
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 |
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 | number of electrons produced by the photon |
ni | number of ions produced by the photon |
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, | ||
int & | np ) |
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 |
ni | number of ions produced by the photon |
np | number of fluorescence photons |
|
private |
|
private |
Definition at line 325 of file TrackHeed.hh.
|
private |
Definition at line 302 of file TrackHeed.hh.
|
private |
Definition at line 301 of file TrackHeed.hh.
|
private |
Definition at line 297 of file TrackHeed.hh.
|
private |
Definition at line 296 of file TrackHeed.hh.
|
private |
Definition at line 330 of file TrackHeed.hh.
|
private |
Definition at line 330 of file TrackHeed.hh.
|
private |
Definition at line 330 of file TrackHeed.hh.
|
private |
Definition at line 322 of file TrackHeed.hh.
|
private |
Definition at line 299 of file TrackHeed.hh.
|
private |
Definition at line 295 of file TrackHeed.hh.
|
private |
Definition at line 319 of file TrackHeed.hh.
|
private |
Definition at line 313 of file TrackHeed.hh.
|
private |
Definition at line 312 of file TrackHeed.hh.
|
private |
Definition at line 315 of file TrackHeed.hh.
|
private |
Definition at line 326 of file TrackHeed.hh.
|
private |
Definition at line 308 of file TrackHeed.hh.
|
private |
Definition at line 288 of file TrackHeed.hh.
|
private |
Definition at line 320 of file TrackHeed.hh.
|
private |
Definition at line 329 of file TrackHeed.hh.
|
private |
Definition at line 329 of file TrackHeed.hh.
|
private |
Definition at line 329 of file TrackHeed.hh.
|
private |
Definition at line 309 of file TrackHeed.hh.
|
private |
Definition at line 307 of file TrackHeed.hh.
|
private |
Max. step length.
Definition at line 334 of file TrackHeed.hh.
|
private |
Definition at line 290 of file TrackHeed.hh.
|
private |
Definition at line 291 of file TrackHeed.hh.
|
private |
Definition at line 314 of file TrackHeed.hh.
|
private |
Definition at line 285 of file TrackHeed.hh.
|
private |
Definition at line 321 of file TrackHeed.hh.
|
private |
Definition at line 305 of file TrackHeed.hh.
|
private |
Bending radius beyond which to use straight-line approximation.
Definition at line 336 of file TrackHeed.hh.
|
private |
Definition at line 287 of file TrackHeed.hh.
|
private |
Angular step for curved lines.
Definition at line 340 of file TrackHeed.hh.
|
private |
Angular step for curved trajectories approximated by straight-line steps.
Definition at line 338 of file TrackHeed.hh.
|
private |
Definition at line 318 of file TrackHeed.hh.
|
private |
Definition at line 298 of file TrackHeed.hh.
|
private |
Definition at line 293 of file TrackHeed.hh.