Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
TrackBichsel.hh
Go to the documentation of this file.
1#ifndef G_TRACK_BICHSEL_H
2#define G_TRACK_BICHSEL_H
3
4#include "Track.hh"
5
6namespace Garfield {
7
8/// Generate tracks using differential cross-sections
9/// for silicon computed by Hans Bichsel.
10/// References:
11/// - H. Bichsel, Rev. Mod. Phys. 60 (1988), 663-699
12/// - https://faculty.washington.edu/hbichsel/
13
14class TrackBichsel : public Track {
15
16 public:
17 /// Constructor
19 /// Destructor
20 virtual ~TrackBichsel() {}
21
22 virtual bool NewTrack(const double x0, const double y0, const double z0,
23 const double t0, const double dx0, const double dy0,
24 const double dz0);
25 virtual bool GetCluster(double& xcls, double& ycls, double& zcls, double& tcls,
26 int& n, double& e, double& extra);
27
28 virtual double GetClusterDensity();
29 virtual double GetStoppingPower();
30
31 void SetDataFile(const std::string& filename) { m_datafile = filename; }
32
33 private:
34 /// Particle rel. momentum.
35 double m_bg;
36 /// Particle speed
37 double m_speed;
38
39 // Particle position and direction
40 double m_x, m_y, m_z, m_t;
41 double m_dx, m_dy, m_dz;
42
43 /// Inverse mean free path
44 double m_imfp;
45
46 std::string m_datafile;
47 /// Table of cumulative distribution functions
48 std::vector<std::vector<double> > m_cdf;
49 int m_iCdf;
50 int m_nCdfEntries;
51
52 bool m_isInitialised;
53 bool m_isInMedium;
54
55 double GetInverseMeanFreePath(const double bg);
56 bool LoadCrossSectionTable(const std::string& filename);
57 void SelectCrossSectionTable();
58};
59}
60
61#endif
virtual double GetStoppingPower()
Get the stopping power (mean energy loss [eV] per cm).
void SetDataFile(const std::string &filename)
Definition: TrackBichsel.hh:31
virtual bool GetCluster(double &xcls, double &ycls, double &zcls, double &tcls, int &n, double &e, double &extra)
virtual double GetClusterDensity()
virtual bool NewTrack(const double x0, const double y0, const double z0, const double t0, const double dx0, const double dy0, const double dz0)
Definition: TrackBichsel.cc:35
virtual ~TrackBichsel()
Destructor.
Definition: TrackBichsel.hh:20
TrackBichsel()
Constructor.
Definition: TrackBichsel.cc:15
Abstract base class for track generation.
Definition: Track.hh:14