Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
ComponentUser.hh
Go to the documentation of this file.
1// Simple component with electric field given by a user function
2
3#ifndef G_COMPONENT_USER_H
4#define G_COMPONENT_USER_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(void (*f)(const double, const double, const double,
31 double&, double&, double&));
32 void SetPotential(void (*f)(const double, const double, const double,
33 double&));
34
35 void SetWeightingField(void (*f)(const double, const double, const double,
36 double&, double&, double&,
37 const std::string));
38 void SetWeightingPotential(void (*f)(const double, const double, const double,
39 double&, const std::string));
40
41 private:
42 // Electric field function
43 bool hasField;
44 void (*field)(const double, const double, const double, double&, double&,
45 double&);
46
47 // Potential
48 bool hasPotential;
49 void (*potential)(const double, const double, const double, double&);
50
51 // Weighting field
52 bool hasWeightingField;
53 void (*wfield)(const double, const double, const double, double&, double&,
54 double&, const std::string);
55
56 // Weighting potential
57 bool hasWeightingPotential;
58 void (*wpot)(const double, const double, const double, double&,
59 const std::string);
60
61 // Reset the component
62 void Reset();
63 // Verify periodicities
64 void UpdatePeriodicity();
65};
66}
67#endif
void SetWeightingField(void(*f)(const double, const double, const double, double &, double &, double &, const std::string))
double WeightingPotential(const double x, const double y, const double z, const std::string label)
bool GetVoltageRange(double &vmin, double &vmax)
void SetElectricField(void(*f)(const double, const double, const double, double &, double &, double &))
void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)
void WeightingField(const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string label)
void SetPotential(void(*f)(const double, const double, const double, double &))
void SetWeightingPotential(void(*f)(const double, const double, const double, double &, const std::string))