Garfield++ 3.0
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 public:
15 // Constructor
17 // Destructor
18 virtual ~TrackElectron() {}
19
20 virtual void SetParticle(const std::string& particle);
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
26 virtual bool GetCluster(double& xcls, double& ycls, double& zcls,
27 double& tcls, int& ncls, double& ecls, double& extra);
28
29 virtual double GetClusterDensity();
30 virtual double GetStoppingPower();
31
32 private:
33 bool m_ready = false;
34
35 // Particle coordinates and direction
36 double m_x = 0., m_y = 0., m_z = 0., m_t = 0.;
37 double m_dx = 0., m_dy = 0., m_dz = 1.;
38
39 // Parameters in ionization cross-section
40 struct component {
41 double fraction;
42 // Dipole moment
43 double m2Ion;
44 // Constant
45 double cIon;
46 // Density correction term
47 double x0Dens, x1Dens;
48 double cDens;
49 double aDens, mDens;
50 // Opal-Beaty-Peterson splitting factor
51 double wSplit;
52 // Ionisation threshold
53 double ethr;
54 // Relative cross-section
55 double p;
56 };
57 std::vector<component> m_components;
58
59 // Secondary electrons
60 struct electron {
61 double x, y, z;
62 double energy;
63 };
64 std::vector<electron> m_electrons;
65
66 // Medium name
67 std::string m_mediumName = "";
68 // Atomic density
69 double m_mediumDensity = 0.;
70 // Mean free path
71 double m_mfp = 0.;
72
73 bool SetupGas(Medium* gas);
74 bool UpdateCrossSection();
75};
76}
77
78#endif
Ionization calculation based on MIP program (S. Biagi).
virtual void SetParticle(const std::string &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