Garfield++ v2r0
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
12 public:
13 /// Constructor
15 /// Destructor
16 virtual ~TrackSimple() {}
17
18 /// Constant distance between clusters.
20 /// Exponentially distributed distance between clusters.
22
23 /// Set the cluster density (inverse mean free path).
24 void SetClusterDensity(const double d);
25 virtual double GetClusterDensity();
26 /// Set the stopping power (dE/dx).
27 void SetStoppingPower(const double dedx);
28 virtual double GetStoppingPower();
29
30 virtual bool NewTrack(const double x0, const double y0, const double z0,
31 const double t0, const double dx0, const double dy0,
32 const double dz0);
33 virtual bool GetCluster(double& xcls, double& ycls, double& zcls,
34 double& tcls, int& n, double& e, double& extra);
35
36 protected:
38
39 // Particle position, time and direction
40 double m_x, m_y, m_z, m_t;
41 double m_dx, m_dy, m_dz;
42 // Mean free path (mean spacing between adjacent clusters)
43 double m_mfp;
44 // Average energy per cluster
45 double m_eloss;
46
48};
49}
50
51#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:19
void SetStoppingPower(const double dedx)
Set the stopping power (dE/dx).
Definition: TrackSimple.cc:41
virtual ~TrackSimple()
Destructor.
Definition: TrackSimple.hh:16
virtual double GetClusterDensity()
Definition: TrackSimple.cc:39
void SetExponentialSpacing()
Exponentially distributed distance between clusters.
Definition: TrackSimple.hh:21
virtual bool GetCluster(double &xcls, double &ycls, double &zcls, double &tcls, int &n, double &e, double &extra)
Definition: TrackSimple.cc:96
virtual double GetStoppingPower()
Get the stopping power (mean energy loss [eV] per cm).
Definition: TrackSimple.cc:53
void SetClusterDensity(const double d)
Set the cluster density (inverse mean free path).
Definition: TrackSimple.cc:27
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:55
Abstract base class for track generation.
Definition: Track.hh:14