Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
HeedFieldMap.h
Go to the documentation of this file.
1
2#ifndef G_HEED_FIELDMAP_H
3#define G_HEED_FIELDMAP_H
4
6
7namespace Garfield {
8class Sensor;
9}
10
11namespace Heed {
12
13/// Retrieve electric and magnetic field from Sensor.
14
16 public:
18
19 void SetSensor(Garfield::Sensor* sensor) { m_sensor = sensor; }
20 void SetCentre(const double x, const double y, const double z) {
21 m_x = x;
22 m_y = y;
23 m_z = z;
24 }
25 void UseEfield(const bool flag) { m_useEfield = flag; }
26 void UseBfield(const bool flag) { m_useBfield = flag; }
27
28 void field_map(const point& pt, vec& efield, vec& bfield,
29 vfloat& mrange) const;
30 bool inside(const point& pt);
31
32 private:
33 /// Conversion factor from mm to cm.
34 static const double conv;
35
36 // Centre of the geometry.
37 double m_x;
38 double m_y;
39 double m_z;
40
41 Garfield::Sensor* m_sensor;
42 bool m_useEfield;
43 bool m_useBfield;
44};
45}
46
47#endif
Retrieve electric and magnetic field from Sensor.
Definition: HeedFieldMap.h:15
void SetSensor(Garfield::Sensor *sensor)
Definition: HeedFieldMap.h:19
void SetCentre(const double x, const double y, const double z)
Definition: HeedFieldMap.h:20
bool inside(const point &pt)
void UseEfield(const bool flag)
Definition: HeedFieldMap.h:25
void field_map(const point &pt, vec &efield, vec &bfield, vfloat &mrange) const
void UseBfield(const bool flag)
Definition: HeedFieldMap.h:26
Point.
Definition: vec.h:374
Definition: vec.h:186
Definition: BGMesh.cpp:5
double vfloat
Definition: vfloat.h:16