68 bool ReadFile(
const std::string& file);
80 bool NewTrack(
const double x0,
const double y0,
const double z0,
81 const double t0,
const double dx0,
const double dy0,
82 const double dz0)
override;
83 bool GetCluster(
double& xcls,
double& ycls,
double& zcls,
84 double& tcls,
int& n,
double& e,
double& extra)
override;
139 double Xi(
const double x,
const double beta2)
const;
140 double DedxEM(
const double e)
const;
141 double DedxHD(
const double e)
const;
142 bool PreciseLoss(
const double step,
const double estart,
double& deem,
144 bool EstimateRange(
const double ekin,
const double step,
double& stpmax);
145 bool SmallestStep(
double ekin,
double de,
double step,
double& stpmin);
148 const double step)
const;
std::vector< double > m_longstraggle
Longitudinal straggling [cm].
double RndmEnergyLoss(const double ekin, const double de, const double step) const
void SetClustersMaximum(const int n)
Set the max. number of clusters on a track.
void GetAtomicMassMumbers(double &a, double &z) const
Get A and Z of the target medium.
void Print()
Print the energy loss table.
double m_qion
Charge of ion.
double m_z
Effective Z of the gas.
std::vector< double > m_hdloss
Hadronic energy loss [MeV cm2/g].
void SetDensity(const double density)
Set the density [g/cm3] of the target medium.
bool GetCluster(double &xcls, double &ycls, double &zcls, double &tcls, int &n, double &e, double &extra) override
std::vector< double > m_range
Projected range [cm].
bool NewTrack(const double x0, const double y0, const double z0, const double t0, const double dx0, const double dy0, const double dz0) override
double DedxHD(const double e) const
std::vector< Cluster > m_clusters
size_t m_currcluster
Index of the next cluster to be returned.
double GetFanoFactor() const
Get the Fano factor.
void EnableTransverseStraggling(const bool on=true)
Simulate transverse straggling (default: on).
std::vector< double > m_emloss
EM energy loss [MeV cm2/g].
void SetTargetClusterSize(const int n)
Specify how many electrons should be grouped to a cluster.
bool m_chargeset
Charge gas been defined.
bool SmallestStep(double ekin, double de, double step, double &stpmin)
int GetModel() const
Get the fluctuation model.
double m_fano
Fano factor [-].
void SetModel(const int m)
void EnableLongitudinalStraggling(const bool on=true)
Simulate longitudinal straggling (default: off).
double m_mion
Mass of ion [MeV].
bool PreciseLoss(const double step, const double estart, double &deem, double &dehd) const
double m_work
Work function [eV].
double m_density
Density [g/cm3].
bool m_useTransStraggle
Include transverse straggling.
int m_nsize
Targeted cluster size.
void SetAtomicMassNumbers(const double a, const double z)
Set A and Z of the target medium.
std::vector< double > m_ekin
Energy in energy loss table [MeV].
std::vector< double > m_transstraggle
Transverse straggling [cm].
double GetDensity() const
Get the density [g/cm3] of the target medium.
int GetClustersMaximum() const
Retrieve the max. number of clusters on a track.
virtual ~TrackSrim()
Destructor.
void SetWorkFunction(const double w)
Set the W value [eV].
bool EstimateRange(const double ekin, const double step, double &stpmax)
bool m_useLongStraggle
Include longitudinal straggling.
double m_a
Effective A of the gas.
void PlotRange()
Make a plot of the projected range as function of the projectile energy.
int m_maxclusters
Maximum number of clusters allowed (infinite if 0)
double DedxEM(const double e) const
void SetFanoFactor(const double f)
Set the Fano factor.
double GetWorkFunction() const
Get the W value [eV].
int GetTargetClusterSize() const
Retrieve the target cluster size.
bool ReadFile(const std::string &file)
Load data from a SRIM file.
double Xi(const double x, const double beta2) const
Abstract base class for track generation.
int electrons
Number of electrons in this cluster.
double kinetic
Ion energy when cluster was created.
double ec
Energy spent to make the cluster.
double t
Cluster location and time.