Garfield++ 4.0
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#ifndef G_HEED_FIELDMAP_H
2#define G_HEED_FIELDMAP_H
3
6
7namespace Garfield {
8class Sensor;
9}
10
11namespace Heed {
12
13/// Retrieve electric and magnetic field from Sensor.
14
16 public:
17 HeedFieldMap() = default;
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 constexpr double conv = 1. / CLHEP::cm;
35
36 // Centre of the geometry.
37 double m_x = 0.;
38 double m_y = 0.;
39 double m_z = 0.;
40
41 Garfield::Sensor* m_sensor = nullptr;
42 bool m_useEfield = false;
43 bool m_useBfield = false;
44};
45}
46
47#endif
Retrieve electric and magnetic field from Sensor.
Definition: HeedFieldMap.h:15
HeedFieldMap()=default
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:368
Definition: vec.h:179
Definition: BGMesh.cpp:6
double vfloat
Definition: vfloat.h:16