25 bool ReadFile(
const std::string& file,
const unsigned int nIons = 0,
26 const unsigned int nSkip = 0);
32 if (fabs(q) > 0.)
m_q = q;
68 bool NewTrack(
const double x0,
const double y0,
const double z0,
69 const double t0,
const double dx0,
const double dy0,
70 const double dz0)
override;
72 bool GetCluster(
double& xc,
double& yc,
double& zc,
double& tc,
int& nc,
73 double& ec,
double& extra);
86 std::vector<std::vector<std::array<float, 6> > >
m_ions;
100 void AddIon(
const std::vector<float>& x,
const std::vector<float>& y,
101 const std::vector<float>& z,
const std::vector<float>& dedx,
102 const std::vector<float>& ekin);
double m_ekin
Projectile energy [eV].
void EnableStepSizeLimit(const double dmax)
Set a max. distance between subsequent steps.
size_t m_cluster
Index of the next cluster to be returned.
void SetParticle(const std::string &part) override
Set the type of charged particle.
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)
TrackTrim(Sensor *sensor)
Constructor.
double GetWorkFunction() const
Get the W value [eV].
TrackTrim()
Default constructor.
void DisableStepSizeLimit()
Do not reduce the steps with respect to the TRIM input file (default).
std::vector< Cluster > m_clusters
Clusters on the current track.
bool m_fset
Has the Fano factor been set?
double m_fano
Fano factor [-] of the target.
void DisableEnergyLossLimit()
Do not limit the energy loss per cluster (default).
void SetWorkFunction(const double w)
Set the W value [eV].
size_t m_ion
Index of the current track.
void EnableEnergyLossLimit(const double emax)
Set a max. energy loss per cluster.
virtual ~TrackTrim()
Destructor.
double m_work
Work function [eV] of the target.
void Print()
Print a summary of the available TRIM data.
const std::vector< Cluster > & GetClusters() const
void SetFanoFactor(const double f)
Set the Fano factor.
void SetCharge(const double q)
Set the projectile charge [-].
void UnsetFanoFactor()
Use the default Fano factor.
double m_maxLossPerStep
Energy loss limit per step.
bool GetCluster(double &xc, double &yc, double &zc, double &tc, int &nc, double &ec, double &extra)
double GetFanoFactor() const
Get the Fano factor.
bool ReadFile(const std::string &file, const unsigned int nIons=0, const unsigned int nSkip=0)
Load data from an EXYZ.txt file.
double m_maxStepSize
Step size limit.
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,...
std::vector< std::vector< std::array< float, 6 > > > m_ions
List of tracks.
Track()=delete
Default constructor.
double energy
Energy spent to make the cluster.
int n
Number of electrons in this cluster.
double ekin
Ion energy when cluster was created.