Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
#include <TrackTrim.hh>
Classes | |
struct | Cluster |
Public Member Functions | |
TrackTrim () | |
Constructor. | |
virtual | ~TrackTrim () |
Destructor. | |
bool | ReadFile (const std::string &file, const unsigned int nIons=0, const unsigned int nSkip=0) |
Load data from an EXYZ.txt file. | |
void | Print () |
Print a summary of the available TRIM data. | |
void | SetWorkFunction (const double w) |
Set the W value [eV]. | |
double | GetWorkFunction () const |
Get the W value [eV]. | |
void | SetFanoFactor (const double f) |
Set the Fano factor. | |
double | GetFanoFactor () const |
Get the Fano factor. | |
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 |
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. | |
Protected Member Functions | |
void | AddIon (const std::vector< float > &x, const std::vector< float > &y, const std::vector< float > &z, const std::vector< float > &dedx, const std::vector< float > &ekin) |
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 | |
double | m_work = -1. |
Work function [eV]. | |
double | m_fano = -1. |
Fano factor [-]. | |
double | m_ekin = 0. |
Projectile energy [eV]. | |
std::vector< std::vector< std::array< float, 5 > > > | m_ions |
List of tracks. | |
size_t | m_ion = 0 |
Index of the current track. | |
std::vector< Cluster > | m_clusters |
Clusters on the current track. | |
size_t | m_cluster = 0 |
Index of the next cluster to be returned. | |
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 based on TRIM output files.
Definition at line 14 of file TrackTrim.hh.
Garfield::TrackTrim::TrackTrim | ( | ) |
|
inlinevirtual |
|
protected |
Definition at line 117 of file TrackTrim.cc.
Referenced by ReadFile().
|
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 272 of file TrackTrim.cc.
|
inline |
|
inline |
|
overridevirtual |
Calculate a new track starting from (x0, y0, z0) at time t0 in direction (dx0, dy0, dz0).
Implements Garfield::Track.
Definition at line 159 of file TrackTrim.cc.
void Garfield::TrackTrim::Print | ( | ) |
Print a summary of the available TRIM data.
Definition at line 146 of file TrackTrim.cc.
bool Garfield::TrackTrim::ReadFile | ( | const std::string & | file, |
const unsigned int | nIons = 0 , |
||
const unsigned int | nSkip = 0 |
||
) |
Load data from an EXYZ.txt file.
Definition at line 30 of file TrackTrim.cc.
|
inline |
|
inline |
|
protected |
Index of the next cluster to be returned.
Definition at line 64 of file TrackTrim.hh.
Referenced by GetCluster(), NewTrack(), and ReadFile().
|
protected |
Clusters on the current track.
Definition at line 62 of file TrackTrim.hh.
Referenced by GetCluster(), NewTrack(), and ReadFile().
|
protected |
Projectile energy [eV].
Definition at line 49 of file TrackTrim.hh.
Referenced by Print(), and ReadFile().
|
protected |
Fano factor [-].
Definition at line 46 of file TrackTrim.hh.
Referenced by GetFanoFactor(), NewTrack(), Print(), and SetFanoFactor().
|
protected |
Index of the current track.
Definition at line 53 of file TrackTrim.hh.
Referenced by NewTrack(), and ReadFile().
|
protected |
List of tracks.
Definition at line 51 of file TrackTrim.hh.
Referenced by AddIon(), NewTrack(), Print(), and ReadFile().
|
protected |
Work function [eV].
Definition at line 44 of file TrackTrim.hh.
Referenced by GetWorkFunction(), NewTrack(), Print(), and SetWorkFunction().