Garfield++ v1r0
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// Ionization calculation based on MIP program (S. Biagi)
2
3#ifndef G_TRACK_ELECTRON
4#define G_TRACK_ELECTRON
5
6#include <string>
7#include <vector>
8
9#include "Track.hh"
10
11namespace Garfield {
12
13class TrackElectron : public Track {
14
15 public:
16 // Constructor
18 // Destructor
20
21 void SetParticle(std::string particle);
22
23 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 bool GetCluster(double& xcls, double& ycls, double& zcls, double& tcls,
28 int& ncls, double& ecls, double& extra);
29
30 double GetClusterDensity();
31 double GetStoppingPower();
32
33 private:
34 bool ready;
35
36 // Particle coordinates and direction
37 double x, y, z, t;
38 double dx, dy, dz;
39
40 // Parameters in ionization cross-section
41 int nComponents;
42 struct component {
43 double fraction;
44 // Dipole moment
45 double m2Ion;
46 // Constant
47 double cIon;
48 // Density correction term
49 double x0Dens, x1Dens;
50 double cDens;
51 double aDens, mDens;
52 // Opal-Beaty-Peterson splitting factor
53 double wSplit;
54 // Ionisation threshold
55 double ethr;
56 // Relative cross-section
57 double p;
58 };
59 std::vector<component> components;
60
61 // Secondary electrons
62 int nElectrons;
63 struct electron {
64 double x, y, z;
65 double energy;
66 };
67 std::vector<electron> electrons;
68
69 // Medium name
70 std::string mediumName;
71 // Atomic density
72 double mediumDensity;
73 // Mean free path
74 double mfp;
75
76 bool SetupGas(Medium* gas);
77 bool UpdateCrossSection();
78};
79}
80
81#endif
bool NewTrack(const double x0, const double y0, const double z0, const double t0, const double dx0, const double dy0, const double dz0)
bool GetCluster(double &xcls, double &ycls, double &zcls, double &tcls, int &ncls, double &ecls, double &extra)
void SetParticle(std::string particle)