Garfield++ v1r0
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// Track generation using differential cross-sections computed by H. Bichsel
2// References:
3// - H. Bichsel, Rev. Mod. Phys. 60 (1988), 663-699
4// - https://faculty.washington.edu/hbichsel/
5
6#ifndef G_TRACK_BICHSEL_H
7#define G_TRACK_BICHSEL_H
8
9#include "Track.hh"
10
11namespace Garfield {
12
13class TrackBichsel : public Track {
14
15 public:
16 // Constructor
18 // Destructor
20
21 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 bool GetCluster(double& xcls, double& ycls, double& zcls, double& tcls,
25 int& n, double& e, double& extra);
26
27 double GetClusterDensity();
28 double GetStoppingPower();
29
30 void SetDataFile(const std::string filename) { datafile = filename; }
31
32 private:
33 // Particle speed and rel. momentum
34 double bg;
35 double speed;
36
37 // Particle position and direction
38 double x, y, z, t;
39 double dx, dy, dz;
40
41 // Inverse mean free path
42 double imfp;
43
44 std::string datafile;
45 // Table of cumulative distribution functions
46 std::vector<std::vector<double> > cdf;
47 int iCdf;
48 int nCdfEntries;
49
50 bool isInitialised;
51 bool isInMedium;
52
53 double GetInverseMeanFreePath(const double bg);
54 bool LoadCrossSectionTable(const std::string filename);
55 void SelectCrossSectionTable();
56};
57}
58
59#endif
bool GetCluster(double &xcls, double &ycls, double &zcls, double &tcls, int &n, double &e, double &extra)
void SetDataFile(const std::string filename)
Definition: TrackBichsel.hh:30
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