Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
#include <TrackSrim.hh>
Classes | |
struct | cluster |
Public Member Functions | |
TrackSrim () | |
Constructor. | |
virtual | ~TrackSrim () |
Destructor. | |
void | SetWorkFunction (const double w) |
Set/get the W value [eV]. | |
double | GetWorkFunction () const |
void | SetFanoFactor (const double f) |
Set/get the Fano factor. | |
double | GetFanoFactor () const |
void | SetDensity (const double density) |
Set/get the density [g/cm3] of the target medium. | |
double | GetDensity () const |
void | SetAtomicMassNumbers (const double a, const double z) |
Set/get A and Z of the target medium. | |
void | GetAtomicMassMumbers (double &a, double &z) const |
void | SetModel (const int m) |
int | GetModel () const |
void | EnableTransverseStraggling () |
void | DisableTransverseStraggling () |
void | EnableLongitudinalStraggling () |
void | DisableLongitudinalStraggling () |
void | EnablePreciseVavilov () |
void | DisablePreciseVavilov () |
void | SetTargetClusterSize (const int n) |
int | GetTargetClusterSize () const |
void | SetClustersMaximum (const int n) |
int | SetClustersMaximum () const |
bool | ReadFile (const std::string &file) |
void | Print () |
void | PlotEnergyLoss () |
void | PlotRange () |
void | PlotStraggling () |
virtual bool | NewTrack (const double x0, const double y0, const double z0, const double t0, const double dx0, const double dy0, const double dz0) |
virtual bool | GetCluster (double &xcls, double &ycls, double &zcls, double &tcls, int &n, double &e, double &extra) |
Public Member Functions inherited from Garfield::Track | |
Track () | |
Constructor. | |
virtual | ~Track () |
Destructor. | |
virtual void | SetParticle (const std::string &part) |
Set the type of 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 ( ) 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 |
double | GetBetaGamma () const |
double | GetBeta () const |
double | GetGamma () const |
double | GetMomentum () const |
double | GetKineticEnergy () const |
double | GetCharge () const |
Get the charge of the projectile. | |
double | GetMass () const |
Get the mass [eV / c2] of the projectile. | |
void | SetSensor (Sensor *s) |
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) |
void | DisablePlotting () |
void | EnableDebugging () |
void | DisableDebugging () |
Protected Member Functions | |
double | DedxEM (const double e) const |
double | DedxHD (const double e) const |
bool | PreciseLoss (const double step, const double estart, double &deem, double &dehd) const |
bool | EstimateRange (const double ekin, const double step, double &stpmax) |
bool | SmallestStep (double ekin, double de, double step, double &stpmin) |
double | RndmEnergyLoss (const double ekin, const double de, const double step) const |
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 | |
bool | m_precisevavilov |
Use precise Vavilov generator. | |
bool | m_useTransStraggle |
Include transverse straggling. | |
bool | m_useLongStraggle |
Include longitudinal straggling. | |
bool | m_chargeset |
Charge gas been defined. | |
double | m_density |
Density [g/cm3]. | |
double | m_work |
Work function [eV]. | |
double | m_fano |
Fano factor [-]. | |
double | m_q |
Charge of ion. | |
double | m_mass |
Mass of ion [MeV]. | |
double | m_a |
A and Z of the gas. | |
double | m_z |
int | m_maxclusters |
Maximum number of clusters allowed (infinite if 0) | |
std::vector< double > | m_ekin |
Energy in energy loss table [MeV]. | |
std::vector< double > | m_emloss |
EM energy loss [MeV cm2/g]. | |
std::vector< double > | m_hdloss |
Hadronic energy loss [MeV cm2/g]. | |
std::vector< double > | m_range |
Projected range [cm]. | |
std::vector< double > | m_transstraggle |
Transverse straggling [cm]. | |
std::vector< double > | m_longstraggle |
Longitudinal straggling [cm]. | |
unsigned int | m_currcluster |
Index of the next cluster to be returned. | |
unsigned int | m_model |
int | m_nsize |
Targeted cluster size. | |
std::vector< cluster > | m_clusters |
Protected Attributes inherited from Garfield::Track | |
std::string | m_className |
double | m_q |
int | m_spin |
double | m_mass |
double | m_energy |
double | m_beta2 |
bool | m_isElectron |
std::string | m_particleName |
Sensor * | m_sensor |
bool | m_isChanged |
bool | m_usePlotting |
ViewDrift * | m_viewer |
bool | m_debug |
int | m_plotId |
Generate tracks based on SRIM energy loss, range and straggling tables.
Definition at line 11 of file TrackSrim.hh.
Garfield::TrackSrim::TrackSrim | ( | ) |
Constructor.
Definition at line 122 of file TrackSrim.cc.
|
inlinevirtual |
|
protected |
Definition at line 513 of file TrackSrim.cc.
Referenced by NewTrack(), and PreciseLoss().
|
protected |
Definition at line 517 of file TrackSrim.cc.
Referenced by NewTrack(), and PreciseLoss().
|
inline |
Definition at line 46 of file TrackSrim.hh.
|
inline |
Definition at line 49 of file TrackSrim.hh.
|
inline |
Definition at line 44 of file TrackSrim.hh.
|
inline |
Definition at line 45 of file TrackSrim.hh.
|
inline |
Definition at line 48 of file TrackSrim.hh.
|
inline |
Definition at line 43 of file TrackSrim.hh.
|
protected |
Definition at line 602 of file TrackSrim.cc.
Referenced by NewTrack().
|
inline |
Definition at line 33 of file TrackSrim.hh.
|
virtual |
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 1330 of file TrackSrim.cc.
|
inline |
Definition at line 27 of file TrackSrim.hh.
|
inline |
Definition at line 24 of file TrackSrim.hh.
|
inline |
Definition at line 41 of file TrackSrim.hh.
|
inline |
Definition at line 52 of file TrackSrim.hh.
|
inline |
Definition at line 21 of file TrackSrim.hh.
|
virtual |
Calculate a new track starting from (x0, y0, z0) at time t0 in direction (dx0, dy0, dz0).
Implements Garfield::Track.
Definition at line 698 of file TrackSrim.cc.
void Garfield::TrackSrim::PlotEnergyLoss | ( | ) |
Definition at line 367 of file TrackSrim.cc.
void Garfield::TrackSrim::PlotRange | ( | ) |
Definition at line 429 of file TrackSrim.cc.
void Garfield::TrackSrim::PlotStraggling | ( | ) |
Definition at line 460 of file TrackSrim.cc.
|
protected |
Definition at line 521 of file TrackSrim.cc.
Referenced by EstimateRange(), and NewTrack().
void Garfield::TrackSrim::Print | ( | ) |
Definition at line 345 of file TrackSrim.cc.
bool Garfield::TrackSrim::ReadFile | ( | const std::string & | file | ) |
Definition at line 140 of file TrackSrim.cc.
|
protected |
Definition at line 1226 of file TrackSrim.cc.
Referenced by NewTrack().
|
inline |
Set/get A and Z of the target medium.
Definition at line 29 of file TrackSrim.hh.
|
inline |
Definition at line 55 of file TrackSrim.hh.
|
inline |
Definition at line 54 of file TrackSrim.hh.
|
inline |
Set/get the density [g/cm3] of the target medium.
Definition at line 26 of file TrackSrim.hh.
Referenced by ReadFile().
|
inline |
|
inline |
Set/get the fluctuation model (0 = none, 1 = Landau, 2 = Vavilov, 3 = Gaussian, 4 = Combined)
Definition at line 40 of file TrackSrim.hh.
|
inline |
Definition at line 51 of file TrackSrim.hh.
|
inline |
|
protected |
Definition at line 1052 of file TrackSrim.cc.
Referenced by NewTrack().
|
protected |
A and Z of the gas.
Definition at line 90 of file TrackSrim.hh.
Referenced by GetAtomicMassMumbers(), NewTrack(), Print(), RndmEnergyLoss(), SetAtomicMassNumbers(), and SmallestStep().
|
protected |
Charge gas been defined.
Definition at line 78 of file TrackSrim.hh.
Referenced by NewTrack(), and ReadFile().
|
protected |
Definition at line 121 of file TrackSrim.hh.
Referenced by GetCluster(), and NewTrack().
|
protected |
Index of the next cluster to be returned.
Definition at line 109 of file TrackSrim.hh.
Referenced by GetCluster(), and NewTrack().
|
protected |
Density [g/cm3].
Definition at line 80 of file TrackSrim.hh.
Referenced by GetDensity(), NewTrack(), PlotEnergyLoss(), PreciseLoss(), Print(), RndmEnergyLoss(), SetDensity(), and SmallestStep().
|
protected |
Energy in energy loss table [MeV].
Definition at line 96 of file TrackSrim.hh.
Referenced by DedxEM(), DedxHD(), NewTrack(), PlotEnergyLoss(), PlotRange(), PlotStraggling(), Print(), and ReadFile().
|
protected |
EM energy loss [MeV cm2/g].
Definition at line 98 of file TrackSrim.hh.
Referenced by DedxEM(), PlotEnergyLoss(), Print(), and ReadFile().
|
protected |
Fano factor [-].
Definition at line 84 of file TrackSrim.hh.
Referenced by GetFanoFactor(), NewTrack(), Print(), and SetFanoFactor().
|
protected |
Hadronic energy loss [MeV cm2/g].
Definition at line 100 of file TrackSrim.hh.
Referenced by DedxHD(), PlotEnergyLoss(), Print(), and ReadFile().
|
protected |
Longitudinal straggling [cm].
Definition at line 106 of file TrackSrim.hh.
Referenced by NewTrack(), PlotStraggling(), Print(), and ReadFile().
|
protected |
Mass of ion [MeV].
Definition at line 88 of file TrackSrim.hh.
Referenced by NewTrack(), Print(), ReadFile(), RndmEnergyLoss(), SmallestStep(), and TrackSrim().
|
protected |
Maximum number of clusters allowed (infinite if 0)
Definition at line 94 of file TrackSrim.hh.
Referenced by NewTrack(), and SetClustersMaximum().
|
protected |
Fluctuation model (0 = none, 1 = Landau, 2 = Vavilov, 3 = Gaussian, 4 = Combined)
Definition at line 112 of file TrackSrim.hh.
Referenced by GetModel(), RndmEnergyLoss(), SetModel(), and SmallestStep().
|
protected |
Targeted cluster size.
Definition at line 114 of file TrackSrim.hh.
Referenced by GetTargetClusterSize(), NewTrack(), and SetTargetClusterSize().
|
protected |
Use precise Vavilov generator.
Definition at line 71 of file TrackSrim.hh.
Referenced by DisablePreciseVavilov(), and EnablePreciseVavilov().
|
protected |
Charge of ion.
Definition at line 86 of file TrackSrim.hh.
Referenced by NewTrack(), Print(), ReadFile(), RndmEnergyLoss(), and SmallestStep().
|
protected |
Projected range [cm].
Definition at line 102 of file TrackSrim.hh.
Referenced by NewTrack(), PlotRange(), Print(), and ReadFile().
|
protected |
Transverse straggling [cm].
Definition at line 104 of file TrackSrim.hh.
Referenced by NewTrack(), PlotStraggling(), Print(), and ReadFile().
|
protected |
Include longitudinal straggling.
Definition at line 75 of file TrackSrim.hh.
Referenced by DisableLongitudinalStraggling(), EnableLongitudinalStraggling(), and NewTrack().
|
protected |
Include transverse straggling.
Definition at line 73 of file TrackSrim.hh.
Referenced by DisableTransverseStraggling(), EnableTransverseStraggling(), and NewTrack().
|
protected |
Work function [eV].
Definition at line 82 of file TrackSrim.hh.
Referenced by GetWorkFunction(), NewTrack(), Print(), and SetWorkFunction().
|
protected |
Definition at line 91 of file TrackSrim.hh.
Referenced by GetAtomicMassMumbers(), NewTrack(), Print(), RndmEnergyLoss(), SetAtomicMassNumbers(), and SmallestStep().