Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
TrackElectron.hh
Go to the documentation of this file.
1#ifndef G_TRACK_ELECTRON
2#define G_TRACK_ELECTRON
3
4#include <string>
5#include <vector>
6
7#include "Track.hh"
8
9namespace Garfield {
10
11/// Ionization calculation based on MIP program (S. Biagi).
12
13class TrackElectron : public Track {
14
15 public:
16 // Constructor
18 // Destructor
19 virtual ~TrackElectron() {}
20
21 virtual void SetParticle(const std::string& particle);
22
23 virtual bool NewTrack(const double x0, const double y0, const double z0,
24 const double t0, const double dx0, const double dy0,
25 const double dz0);
26
27 virtual bool GetCluster(double& xcls, double& ycls, double& zcls, double& tcls,
28 int& ncls, double& ecls, double& extra);
29
30 virtual double GetClusterDensity();
31 virtual double GetStoppingPower();
32
33 private:
34 bool m_ready;
35
36 // Particle coordinates and direction
37 double m_x, m_y, m_z, m_t;
38 double m_dx, m_dy, m_dz;
39
40 // Parameters in ionization cross-section
41 struct component {
42 double fraction;
43 // Dipole moment
44 double m2Ion;
45 // Constant
46 double cIon;
47 // Density correction term
48 double x0Dens, x1Dens;
49 double cDens;
50 double aDens, mDens;
51 // Opal-Beaty-Peterson splitting factor
52 double wSplit;
53 // Ionisation threshold
54 double ethr;
55 // Relative cross-section
56 double p;
57 };
58 std::vector<component> m_components;
59
60 // Secondary electrons
61 struct electron {
62 double x, y, z;
63 double energy;
64 };
65 std::vector<electron> m_electrons;
66
67 // Medium name
68 std::string m_mediumName;
69 // Atomic density
70 double m_mediumDensity;
71 // Mean free path
72 double m_mfp;
73
74 bool SetupGas(Medium* gas);
75 bool UpdateCrossSection();
76};
77}
78
79#endif
Ionization calculation based on MIP program (S. Biagi).
virtual void SetParticle(const std::string &particle)
Set the type of particle.
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)
virtual bool GetCluster(double &xcls, double &ycls, double &zcls, double &tcls, int &ncls, double &ecls, double &extra)
virtual double GetStoppingPower()
Get the stopping power (mean energy loss [eV] per cm).
Abstract base class for track generation.
Definition: Track.hh:14