|
Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
#include <TrackSrim.hh>
Inheritance diagram for Garfield::TrackSrim:Classes | |
| struct | Cluster |
Public Member Functions | |
| TrackSrim () | |
| Constructor. | |
| virtual | ~TrackSrim () |
| Destructor. | |
| 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. | |
| void | SetDensity (const double density) |
| Set the density [g/cm3] of the target medium. | |
| double | GetDensity () const |
| Get the density [g/cm3] of the target medium. | |
| void | SetAtomicMassNumbers (const double a, const double z) |
| Set A and Z of the target medium. | |
| void | GetAtomicMassMumbers (double &a, double &z) const |
| Get A and Z of the target medium. | |
| void | SetModel (const int m) |
| int | GetModel () const |
| Get the fluctuation model. | |
| void | EnableTransverseStraggling (const bool on=true) |
| Simulate transverse straggling (default: on). | |
| void | EnableLongitudinalStraggling (const bool on=true) |
| Simulate longitudinal straggling (default: off). | |
| void | SetTargetClusterSize (const int n) |
| Specify how many electrons should be grouped to a cluster. | |
| int | GetTargetClusterSize () const |
| Retrieve the target cluster size. | |
| void | SetClustersMaximum (const int n) |
| int | GetClustersMaximum () const |
| bool | ReadFile (const std::string &file) |
| Load data from a SRIM file. | |
| void | Print () |
| void | PlotEnergyLoss () |
| void | PlotRange () |
| Make a plot of the projected range as function of the projectile energy. | |
| void | PlotStraggling () |
| 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 | |
| double | Xi (const double x, const double beta2) const |
| 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_useTransStraggle = true |
| Include transverse straggling. | |
| bool | m_useLongStraggle = false |
| Include longitudinal straggling. | |
| bool | m_chargeset = false |
| Charge gas been defined. | |
| double | m_density = -1. |
| Density [g/cm3]. | |
| double | m_work = -1. |
| Work function [eV]. | |
| double | m_fano = -1. |
| Fano factor [-]. | |
| double | m_q |
| Charge of ion. | |
| double | m_mass = -1. |
| Mass of ion [MeV]. | |
| double | m_a = -1. |
| A and Z of the gas. | |
| double | m_z = -1. |
| int | m_maxclusters = -1 |
| 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 = 4 |
| int | m_nsize = -1 |
| Targeted cluster size. | |
| std::vector< Cluster > | m_clusters |
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 |
| bool | m_usePlotting = false |
| ViewDrift * | m_viewer = nullptr |
| bool | m_debug = false |
| int | m_plotId = -1 |
Generate tracks based on SRIM energy loss, range and straggling tables.
Definition at line 11 of file TrackSrim.hh.
| Garfield::TrackSrim::TrackSrim | ( | ) |
|
inlinevirtual |
|
protected |
Definition at line 427 of file TrackSrim.cc.
Referenced by NewTrack(), and PreciseLoss().
|
protected |
Definition at line 431 of file TrackSrim.cc.
Referenced by NewTrack(), and PreciseLoss().
|
inline |
Simulate longitudinal straggling (default: off).
Definition at line 53 of file TrackSrim.hh.
|
inline |
Simulate transverse straggling (default: on).
Definition at line 49 of file TrackSrim.hh.
|
protected |
Definition at line 522 of file TrackSrim.cc.
Referenced by NewTrack().
|
inline |
|
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 1243 of file TrackSrim.cc.
|
inline |
Definition at line 63 of file TrackSrim.hh.
|
inline |
|
inline |
|
inline |
|
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 617 of file TrackSrim.cc.
| void Garfield::TrackSrim::PlotEnergyLoss | ( | ) |
Make a plot of the electromagnetic, hadronic, and total energy loss as function of the projectile energy.
Definition at line 306 of file TrackSrim.cc.
| void Garfield::TrackSrim::PlotRange | ( | ) |
Make a plot of the projected range as function of the projectile energy.
Definition at line 361 of file TrackSrim.cc.
| void Garfield::TrackSrim::PlotStraggling | ( | ) |
Make a plot of the transverse and longitudinal straggling as function of the projectile energy.
Definition at line 385 of file TrackSrim.cc.
|
protected |
Definition at line 443 of file TrackSrim.cc.
Referenced by EstimateRange(), and NewTrack().
| void Garfield::TrackSrim::Print | ( | ) |
Definition at line 285 of file TrackSrim.cc.
| bool Garfield::TrackSrim::ReadFile | ( | const std::string & | file | ) |
Load data from a SRIM file.
Definition at line 78 of file TrackSrim.cc.
|
protected |
Definition at line 1144 of file TrackSrim.cc.
Referenced by NewTrack().
|
inline |
Set A and Z of the target medium.
Definition at line 31 of file TrackSrim.hh.
|
inline |
Definition at line 62 of file TrackSrim.hh.
|
inline |
Set the density [g/cm3] of the target medium.
Definition at line 27 of file TrackSrim.hh.
Referenced by ReadFile().
|
inline |
|
inline |
Set the fluctuation model (0 = none, 1 = Landau, 2 = Vavilov, 3 = Gaussian, 4 = Combined). By default, the combined model (4) is used.
Definition at line 44 of file TrackSrim.hh.
|
inline |
Specify how many electrons should be grouped to a cluster.
Definition at line 58 of file TrackSrim.hh.
|
inline |
|
protected |
Definition at line 971 of file TrackSrim.cc.
Referenced by NewTrack().
|
protected |
Definition at line 435 of file TrackSrim.cc.
Referenced by RndmEnergyLoss(), and SmallestStep().
|
protected |
A and Z of the gas.
Definition at line 102 of file TrackSrim.hh.
Referenced by GetAtomicMassMumbers(), NewTrack(), Print(), RndmEnergyLoss(), SetAtomicMassNumbers(), SmallestStep(), and Xi().
|
protected |
Charge gas been defined.
Definition at line 90 of file TrackSrim.hh.
Referenced by NewTrack(), and ReadFile().
|
protected |
Definition at line 133 of file TrackSrim.hh.
Referenced by GetCluster(), and NewTrack().
|
protected |
Index of the next cluster to be returned.
Definition at line 121 of file TrackSrim.hh.
Referenced by GetCluster(), and NewTrack().
|
protected |
Density [g/cm3].
Definition at line 92 of file TrackSrim.hh.
Referenced by GetDensity(), NewTrack(), PlotEnergyLoss(), PreciseLoss(), Print(), RndmEnergyLoss(), SetDensity(), SmallestStep(), and Xi().
|
protected |
Energy in energy loss table [MeV].
Definition at line 108 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 110 of file TrackSrim.hh.
Referenced by DedxEM(), PlotEnergyLoss(), Print(), and ReadFile().
|
protected |
Fano factor [-].
Definition at line 96 of file TrackSrim.hh.
Referenced by GetFanoFactor(), NewTrack(), Print(), and SetFanoFactor().
|
protected |
Hadronic energy loss [MeV cm2/g].
Definition at line 112 of file TrackSrim.hh.
Referenced by DedxHD(), PlotEnergyLoss(), Print(), and ReadFile().
|
protected |
Longitudinal straggling [cm].
Definition at line 118 of file TrackSrim.hh.
Referenced by NewTrack(), PlotStraggling(), Print(), and ReadFile().
|
protected |
Mass of ion [MeV].
Definition at line 100 of file TrackSrim.hh.
Referenced by NewTrack(), Print(), ReadFile(), RndmEnergyLoss(), and SmallestStep().
|
protected |
Maximum number of clusters allowed (infinite if 0)
Definition at line 106 of file TrackSrim.hh.
Referenced by GetClustersMaximum(), NewTrack(), and SetClustersMaximum().
|
protected |
Fluctuation model (0 = none, 1 = Landau, 2 = Vavilov, 3 = Gaussian, 4 = Combined)
Definition at line 124 of file TrackSrim.hh.
Referenced by GetModel(), RndmEnergyLoss(), SetModel(), and SmallestStep().
|
protected |
Targeted cluster size.
Definition at line 126 of file TrackSrim.hh.
Referenced by GetTargetClusterSize(), NewTrack(), and SetTargetClusterSize().
|
protected |
Charge of ion.
Definition at line 98 of file TrackSrim.hh.
Referenced by NewTrack(), Print(), ReadFile(), RndmEnergyLoss(), SmallestStep(), and Xi().
|
protected |
Projected range [cm].
Definition at line 114 of file TrackSrim.hh.
Referenced by NewTrack(), PlotRange(), Print(), and ReadFile().
|
protected |
Transverse straggling [cm].
Definition at line 116 of file TrackSrim.hh.
Referenced by NewTrack(), PlotStraggling(), Print(), and ReadFile().
|
protected |
Include longitudinal straggling.
Definition at line 87 of file TrackSrim.hh.
Referenced by EnableLongitudinalStraggling(), and NewTrack().
|
protected |
Include transverse straggling.
Definition at line 85 of file TrackSrim.hh.
Referenced by EnableTransverseStraggling(), and NewTrack().
|
protected |
Work function [eV].
Definition at line 94 of file TrackSrim.hh.
Referenced by GetWorkFunction(), NewTrack(), Print(), and SetWorkFunction().
|
protected |
Definition at line 103 of file TrackSrim.hh.
Referenced by GetAtomicMassMumbers(), NewTrack(), Print(), RndmEnergyLoss(), SetAtomicMassNumbers(), SmallestStep(), and Xi().