Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
ComponentConstant.hh
Go to the documentation of this file.
1// Component with constant electric field
2
3#ifndef G_COMPONENT_CONSTANT_H
4#define G_COMPONENT_CONSTANT_H
5
6#include "ComponentBase.hh"
7
8namespace Garfield {
9
11
12 public:
13 // Constructor
15 // Destructor
17
18 void ElectricField(const double x, const double y, const double z, double& ex,
19 double& ey, double& ez, Medium*& m, int& status);
20 void ElectricField(const double x, const double y, const double z, double& ex,
21 double& ey, double& ez, double& v, Medium*& m,
22 int& status);
23 bool GetVoltageRange(double& vmin, double& vmax);
24 void WeightingField(const double x, const double y, const double z,
25 double& wx, double& wy, double& wz,
26 const std::string label);
27 double WeightingPotential(const double x, const double y, const double z,
28 const std::string label);
29
30 void SetElectricField(const double ex, const double ey, const double ez);
31 void SetPotential(const double x, const double y, const double z,
32 const double v = 0.);
33
34 void SetWeightingField(const double wx, const double wy, const double wz,
35 const std::string label);
36 void SetWeightingPotential(const double x, const double y, const double z,
37 const double v = 0.);
38
39 private:
40 // Electric field
41 double fx, fy, fz;
42
43 // Potential
44 bool hasPotential;
45 // Point where potential was specified
46 double x0, y0, z0;
47 // Potential at this point
48 double v0;
49
50 // Weighting field
51 bool hasWeightingField;
52 std::string wfield;
53 double fwx, fwy, fwz;
54 bool hasWeightingPotential;
55 // Point where the weighting potential was specified
56 double wx0, wy0, wz0;
57 // Weighting potential at this point
58 double w0;
59
60 // Reset the component
61 void Reset();
62 // Verify periodicities
63 void UpdatePeriodicity();
64};
65}
66#endif
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)
void SetElectricField(const double ex, const double ey, const double ez)
double WeightingPotential(const double x, const double y, const double z, const std::string label)
bool GetVoltageRange(double &vmin, double &vmax)
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string label)
void SetPotential(const double x, const double y, const double z, const double v=0.)
void SetWeightingPotential(const double x, const double y, const double z, const double v=0.)
void SetWeightingField(const double wx, const double wy, const double wz, const std::string label)