Garfield++ 3.0
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 public:
16 /// Constructor
18 /// Destructor
19 virtual ~TrackBichsel() {}
20
21 virtual bool NewTrack(const double x0, const double y0, const double z0,
22 const double t0, const double dx0, const double dy0,
23 const double dz0);
24 virtual bool GetCluster(double& xcls, double& ycls, double& zcls,
25 double& tcls, int& n, double& e, double& extra);
26
27 virtual double GetClusterDensity();
28 virtual double GetStoppingPower();
29
30 void SetDataFile(const std::string& filename) { m_datafile = filename; }
31
32 private:
33 /// Particle rel. momentum.
34 double m_bg = 3.16228;
35 /// Particle speed
36 double m_speed;
37
38 // Particle position and direction
39 double m_x = 0., m_y = 0., m_z = 0., m_t = 0.;
40 double m_dx = 0., m_dy = 0., m_dz = 1.;
41
42 /// Inverse mean free path
43 double m_imfp = 4.05090e4;
44
45 std::string m_datafile = "SiM0invw.inv";
46 /// Table of cumulative distribution functions
47 std::vector<std::vector<double> > m_cdf;
48 int m_iCdf = 2;
49 int m_nCdfEntries = -1;
50
51 bool m_isInitialised = false;
52 bool m_isInMedium = false;
53
54 double GetInverseMeanFreePath(const double bg);
55 bool LoadCrossSectionTable(const std::string& filename);
56 void SelectCrossSectionTable();
57};
58}
59
60#endif
virtual double GetStoppingPower()
Get the stopping power (mean energy loss [eV] per cm).
void SetDataFile(const std::string &filename)
Definition: TrackBichsel.hh:30
virtual bool GetCluster(double &xcls, double &ycls, double &zcls, double &tcls, int &n, double &e, double &extra)
Definition: TrackBichsel.cc:96
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:22
virtual ~TrackBichsel()
Destructor.
Definition: TrackBichsel.hh:19
TrackBichsel()
Constructor.
Definition: TrackBichsel.cc:17
Abstract base class for track generation.
Definition: Track.hh:14