Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
TrackSimple.hh
Go to the documentation of this file.
1#ifndef G_TRACK_SIMPLE_H
2#define G_TRACK_SIMPLE_H
3
4#include "Track.hh"
5
6namespace Garfield {
7
8/// Generate tracks based on a cluster density given by the user.
9
10class TrackSimple : public Track {
11 public:
12 /// Constructor
14 /// Destructor
15 virtual ~TrackSimple() {}
16
17 /// Constant distance between clusters.
19 /// Exponentially distributed distance between clusters.
21
22 /// Set the cluster density (inverse mean free path).
23 void SetClusterDensity(const double d);
24 virtual double GetClusterDensity();
25 /// Set the stopping power (dE/dx).
26 void SetStoppingPower(const double dedx);
27 virtual double GetStoppingPower();
28
29 virtual bool NewTrack(const double x0, const double y0, const double z0,
30 const double t0, const double dx0, const double dy0,
31 const double dz0);
32 virtual bool GetCluster(double& xcls, double& ycls, double& zcls,
33 double& tcls, int& n, double& e, double& extra);
34
35 protected:
36 bool m_isReady = false;
37
38 // Particle position, time 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 = 0.;
41 // Mean free path (mean spacing between adjacent clusters)
42 double m_mfp = 0.04;
43 // Average energy per cluster
44 double m_eloss = 2530.;
45
46 bool m_useEqualSpacing = false;
47};
48}
49
50#endif
Generate tracks based on a cluster density given by the user.
Definition: TrackSimple.hh:10
void SetEqualSpacing()
Constant distance between clusters.
Definition: TrackSimple.hh:18
void SetStoppingPower(const double dedx)
Set the stopping power (dE/dx).
Definition: TrackSimple.cc:26
virtual ~TrackSimple()
Destructor.
Definition: TrackSimple.hh:15
virtual double GetClusterDensity()
Definition: TrackSimple.cc:24
void SetExponentialSpacing()
Exponentially distributed distance between clusters.
Definition: TrackSimple.hh:20
virtual bool GetCluster(double &xcls, double &ycls, double &zcls, double &tcls, int &n, double &e, double &extra)
Definition: TrackSimple.cc:79
virtual double GetStoppingPower()
Get the stopping power (mean energy loss [eV] per cm).
Definition: TrackSimple.cc:37
void SetClusterDensity(const double d)
Set the cluster density (inverse mean free path).
Definition: TrackSimple.cc:13
TrackSimple()
Constructor.
Definition: TrackSimple.cc:11
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: TrackSimple.cc:39
Abstract base class for track generation.
Definition: Track.hh:14