Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Garfield::ComponentBase Class Referenceabstract

Abstract base class for components. More...

#include <ComponentBase.hh>

+ Inheritance diagram for Garfield::ComponentBase:

Public Member Functions

 ComponentBase ()
 Constructor.
 
virtual ~ComponentBase ()
 Destructor.
 
virtual void SetGeometry (GeometryBase *geo)
 Define the geometry.
 
virtual void Clear ()
 Reset.
 
virtual MediumGetMedium (const double x, const double y, const double z)
 Get the medium at a given location (x, y, z).
 
virtual void ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)=0
 
virtual void ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status)=0
 Calculate the drift field [V/cm] and potential [V] at (x, y, z).
 
virtual bool GetVoltageRange (double &vmin, double &vmax)=0
 Calculate the voltage range [V].
 
virtual void WeightingField (const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label)
 
virtual double WeightingPotential (const double x, const double y, const double z, const std::string &label)
 
virtual void DelayedWeightingField (const double x, const double y, const double z, const double t, double &wx, double &wy, double &wz, const std::string &label)
 
virtual void MagneticField (const double x, const double y, const double z, double &bx, double &by, double &bz, int &status)
 
void SetMagneticField (const double bx, const double by, const double bz)
 Set a constant magnetic field.
 
virtual bool IsReady ()
 Ready for use?
 
virtual bool GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
 Get the bounding box coordinates.
 
double IntegrateFluxCircle (const double xc, const double yc, const double r, const unsigned int nI=50)
 
double IntegrateFluxSphere (const double xc, const double yc, const double zc, const double r, const unsigned int nI=20)
 
double IntegrateFlux (const double x0, const double y0, const double z0, const double dx1, const double dy1, const double dz1, const double dx2, const double dy2, const double dz2, const unsigned int nU=20, const unsigned int nV=20)
 
virtual bool IsWireCrossed (const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, double &xc, double &yc, double &zc, const bool centre, double &rc)
 
virtual bool IsInTrapRadius (const double q0, const double x0, const double y0, const double z0, double &xw, double &yw, double &rw)
 
void EnablePeriodicityX (const bool on=true)
 Enable simple periodicity in the $x$ direction.
 
void DisablePeriodicityX ()
 
void EnablePeriodicityY (const bool on=true)
 Enable simple periodicity in the $y$ direction.
 
void DisablePeriodicityY ()
 
void EnablePeriodicityZ (const bool on=true)
 Enable simple periodicity in the $z$ direction.
 
void DisablePeriodicityZ ()
 
void EnableMirrorPeriodicityX (const bool on=true)
 Enable mirror periodicity in the $x$ direction.
 
void DisableMirrorPeriodicityX ()
 
void EnableMirrorPeriodicityY (const bool on=true)
 Enable mirror periodicity in the $y$ direction.
 
void DisableMirrorPeriodicityY ()
 
void EnableMirrorPeriodicityZ (const bool on=true)
 Enable mirror periodicity in the $y$ direction.
 
void DisableMirrorPeriodicityZ ()
 
void EnableAxialPeriodicityX (const bool on=true)
 Enable axial periodicity in the $x$ direction.
 
void DisableAxialPeriodicityX ()
 
void EnableAxialPeriodicityY (const bool on=true)
 Enable axial periodicity in the $y$ direction.
 
void DisableAxialPeriodicityY ()
 
void EnableAxialPeriodicityZ (const bool on=true)
 Enable axial periodicity in the $z$ direction.
 
void DisableAxialPeriodicityZ ()
 
void EnableRotationSymmetryX (const bool on=true)
 Enable rotation symmetry around the $x$ axis.
 
void DisableRotationSymmetryX ()
 
void EnableRotationSymmetryY (const bool on=true)
 Enable rotation symmetry around the $y$ axis.
 
void DisableRotationSymmetryY ()
 
void EnableRotationSymmetryZ (const bool on=true)
 Enable rotation symmetry around the $z$ axis.
 
void DisableRotationSymmetryZ ()
 
void EnableDebugging ()
 Switch on debugging messages.
 
void DisableDebugging ()
 Switch off debugging messages.
 
void ActivateTraps ()
 Request trapping to be taken care of by the component (for TCAD).
 
void DeactivateTraps ()
 
bool IsTrapActive ()
 
void ActivateVelocityMap ()
 Request velocity to be taken care of by the component (for TCAD).
 
void DectivateVelocityMap ()
 
bool IsVelocityActive ()
 
virtual bool ElectronAttachment (const double, const double, const double, double &eta)
 Get the electron attachment coefficient.
 
virtual bool HoleAttachment (const double, const double, const double, double &eta)
 Get the hole attachment coefficient.
 
virtual void ElectronVelocity (const double, const double, const double, double &vx, double &vy, double &vz, Medium *&, int &status)
 Get the electron drift velocity.
 
virtual void HoleVelocity (const double, const double, const double, double &vx, double &vy, double &vz, Medium *&, int &status)
 Get the hole drift velocity.
 
virtual bool GetElectronLifetime (const double, const double, const double, double &etau)
 
virtual bool GetHoleLifetime (const double, const double, const double, double &htau)
 

Protected Member Functions

virtual void Reset ()=0
 Reset the component.
 
virtual void UpdatePeriodicity ()=0
 Verify periodicities.
 

Protected Attributes

std::string m_className = "ComponentBase"
 Class name.
 
GeometryBasem_geometry = nullptr
 Pointer to the geometry.
 
bool m_ready = false
 Ready for use?
 
bool m_activeTraps = false
 Does the component have traps?
 
bool m_hasVelocityMap = false
 Does the component have velocity maps?
 
std::array< bool, 3 > m_periodic = {{false, false, false}}
 Simple periodicity in x, y, z.
 
std::array< bool, 3 > m_mirrorPeriodic = {{false, false, false}}
 Mirror periodicity in x, y, z.
 
std::array< bool, 3 > m_axiallyPeriodic = {{false, false, false}}
 Axial periodicity in x, y, z.
 
std::array< bool, 3 > m_rotationSymmetric = {{false, false, false}}
 Rotation symmetry around x-axis, y-axis, z-axis.
 
double m_bx0 = 0.
 
double m_by0 = 0.
 
double m_bz0 = 0.
 
bool m_debug = false
 Switch on/off debugging messages.
 

Detailed Description

Abstract base class for components.

Definition at line 13 of file ComponentBase.hh.

Constructor & Destructor Documentation

◆ ComponentBase()

Garfield::ComponentBase::ComponentBase ( )

Constructor.

Definition at line 9 of file ComponentBase.cc.

9{}

◆ ~ComponentBase()

virtual Garfield::ComponentBase::~ComponentBase ( )
inlinevirtual

Destructor.

Definition at line 18 of file ComponentBase.hh.

18{}

Member Function Documentation

◆ ActivateTraps()

void Garfield::ComponentBase::ActivateTraps ( )
inline

Request trapping to be taken care of by the component (for TCAD).

Definition at line 237 of file ComponentBase.hh.

237{ m_activeTraps = true; }
bool m_activeTraps
Does the component have traps?

◆ ActivateVelocityMap()

void Garfield::ComponentBase::ActivateVelocityMap ( )
inline

Request velocity to be taken care of by the component (for TCAD).

Definition at line 242 of file ComponentBase.hh.

242{ m_hasVelocityMap = true; }
bool m_hasVelocityMap
Does the component have velocity maps?

◆ Clear()

void Garfield::ComponentBase::Clear ( )
virtual

Reset.

Reimplemented in Garfield::ComponentGrid, and Garfield::ComponentVoxel.

Definition at line 27 of file ComponentBase.cc.

27 {
28 m_geometry = nullptr;
29 Reset();
30}
GeometryBase * m_geometry
Pointer to the geometry.
virtual void Reset()=0
Reset the component.

◆ DeactivateTraps()

void Garfield::ComponentBase::DeactivateTraps ( )
inline

Definition at line 238 of file ComponentBase.hh.

238{ m_activeTraps = false; }

◆ DectivateVelocityMap()

void Garfield::ComponentBase::DectivateVelocityMap ( )
inline

Definition at line 243 of file ComponentBase.hh.

243{ m_hasVelocityMap = false; }

◆ DelayedWeightingField()

void Garfield::ComponentBase::DelayedWeightingField ( const double  x,
const double  y,
const double  z,
const double  t,
double &  wx,
double &  wy,
double &  wz,
const std::string &  label 
)
virtual

Calculate the delayed weighting field at a given point and time and for a given electrode.

Parameters
x,y,zcoordinates [cm].
ttime [ns].
wx,wy,wzcomponents of the weighting field [1/cm].
labelname of the electrode

Reimplemented in Garfield::ComponentGrid, Garfield::ComponentUser, and Garfield::ComponentVoxel.

Definition at line 41 of file ComponentBase.cc.

46 {
47 if (m_debug) {
48 std::cerr << m_className << "::DelayedWeightingField: "
49 << "Function not implemented.\n";
50 }
51 wx = wy = wz = 0.;
52}
std::string m_className
Class name.
bool m_debug
Switch on/off debugging messages.

◆ DisableAxialPeriodicityX()

void Garfield::ComponentBase::DisableAxialPeriodicityX ( )
inline

Definition at line 198 of file ComponentBase.hh.

198{ EnableAxialPeriodicityX(false); }
void EnableAxialPeriodicityX(const bool on=true)
Enable axial periodicity in the direction.

◆ DisableAxialPeriodicityY()

void Garfield::ComponentBase::DisableAxialPeriodicityY ( )
inline

Definition at line 204 of file ComponentBase.hh.

204{ EnableAxialPeriodicityY(false); }
void EnableAxialPeriodicityY(const bool on=true)
Enable axial periodicity in the direction.

◆ DisableAxialPeriodicityZ()

void Garfield::ComponentBase::DisableAxialPeriodicityZ ( )
inline

Definition at line 210 of file ComponentBase.hh.

210{ EnableAxialPeriodicityZ(false); }
void EnableAxialPeriodicityZ(const bool on=true)
Enable axial periodicity in the direction.

◆ DisableDebugging()

void Garfield::ComponentBase::DisableDebugging ( )
inline

Switch off debugging messages.

Definition at line 234 of file ComponentBase.hh.

234{ m_debug = false; }

◆ DisableMirrorPeriodicityX()

void Garfield::ComponentBase::DisableMirrorPeriodicityX ( )
inline

Definition at line 179 of file ComponentBase.hh.

179{ EnableMirrorPeriodicityX(false); }
void EnableMirrorPeriodicityX(const bool on=true)
Enable mirror periodicity in the direction.

◆ DisableMirrorPeriodicityY()

void Garfield::ComponentBase::DisableMirrorPeriodicityY ( )
inline

Definition at line 185 of file ComponentBase.hh.

185{ EnableMirrorPeriodicityY(false); }
void EnableMirrorPeriodicityY(const bool on=true)
Enable mirror periodicity in the direction.

◆ DisableMirrorPeriodicityZ()

void Garfield::ComponentBase::DisableMirrorPeriodicityZ ( )
inline

Definition at line 191 of file ComponentBase.hh.

191{ EnableMirrorPeriodicityZ(false); }
void EnableMirrorPeriodicityZ(const bool on=true)
Enable mirror periodicity in the direction.

◆ DisablePeriodicityX()

void Garfield::ComponentBase::DisablePeriodicityX ( )
inline

Definition at line 160 of file ComponentBase.hh.

160{ EnablePeriodicityX(false); }
void EnablePeriodicityX(const bool on=true)
Enable simple periodicity in the direction.

◆ DisablePeriodicityY()

void Garfield::ComponentBase::DisablePeriodicityY ( )
inline

Definition at line 166 of file ComponentBase.hh.

166{ EnablePeriodicityY(false); }
void EnablePeriodicityY(const bool on=true)
Enable simple periodicity in the direction.

◆ DisablePeriodicityZ()

void Garfield::ComponentBase::DisablePeriodicityZ ( )
inline

Definition at line 172 of file ComponentBase.hh.

172{ EnablePeriodicityZ(false); }
void EnablePeriodicityZ(const bool on=true)
Enable simple periodicity in the direction.

◆ DisableRotationSymmetryX()

void Garfield::ComponentBase::DisableRotationSymmetryX ( )
inline

Definition at line 217 of file ComponentBase.hh.

217{ EnableRotationSymmetryX(false); }
void EnableRotationSymmetryX(const bool on=true)
Enable rotation symmetry around the axis.

◆ DisableRotationSymmetryY()

void Garfield::ComponentBase::DisableRotationSymmetryY ( )
inline

Definition at line 223 of file ComponentBase.hh.

223{ EnableRotationSymmetryY(false); }
void EnableRotationSymmetryY(const bool on=true)
Enable rotation symmetry around the axis.

◆ DisableRotationSymmetryZ()

void Garfield::ComponentBase::DisableRotationSymmetryZ ( )
inline

Definition at line 229 of file ComponentBase.hh.

229{ EnableRotationSymmetryZ(false); }
void EnableRotationSymmetryZ(const bool on=true)
Enable rotation symmetry around the axis.

◆ ElectricField() [1/2]

virtual void Garfield::ComponentBase::ElectricField ( const double  x,
const double  y,
const double  z,
double &  ex,
double &  ey,
double &  ez,
double &  v,
Medium *&  m,
int &  status 
)
pure virtual

◆ ElectricField() [2/2]

virtual void Garfield::ComponentBase::ElectricField ( const double  x,
const double  y,
const double  z,
double &  ex,
double &  ey,
double &  ez,
Medium *&  m,
int &  status 
)
pure virtual

Calculate the drift field at given point.

Parameters
x,y,zcoordinates [cm].
ex,ey,ezcomponents of the electric field [V/cm].
mpointer to the medium at this location.
statusstatus flag

Status flags:

        0: Inside an active medium
      > 0: Inside a wire of type X
-4 ... -1: On the side of a plane where no wires are
       -5: Inside the mesh but not in an active medium
       -6: Outside the mesh
      -10: Unknown potential type (should not occur)
    other: Other cases (should not occur)

Implemented in Garfield::ComponentUserMapBase, Garfield::ComponentAnalyticField, Garfield::ComponentAnsys121, Garfield::ComponentAnsys123, Garfield::ComponentComsol, Garfield::ComponentConstant, Garfield::ComponentCST, Garfield::ComponentElmer, Garfield::ComponentGrid, Garfield::ComponentNeBem2d, Garfield::ComponentNeBem3d, Garfield::ComponentNeBem3dMap, Garfield::ComponentTcad2d, Garfield::ComponentTcad3d, Garfield::ComponentUser, and Garfield::ComponentVoxel.

Referenced by Garfield::ComponentUserMapBase::ElectricField(), Garfield::ViewField::Evaluate2D(), Garfield::ViewField::EvaluateProfile(), IntegrateFlux(), IntegrateFluxCircle(), IntegrateFluxSphere(), and Garfield::ComponentGrid::SaveElectricField().

◆ ElectronAttachment()

virtual bool Garfield::ComponentBase::ElectronAttachment ( const double  ,
const double  ,
const double  ,
double &  eta 
)
inlinevirtual

Get the electron attachment coefficient.

Reimplemented in Garfield::ComponentTcad2d.

Definition at line 247 of file ComponentBase.hh.

248 {
249 eta = 0;
250 return false;
251 }

◆ ElectronVelocity()

virtual void Garfield::ComponentBase::ElectronVelocity ( const double  ,
const double  ,
const double  ,
double &  vx,
double &  vy,
double &  vz,
Medium *&  ,
int &  status 
)
inlinevirtual

Get the electron drift velocity.

Reimplemented in Garfield::ComponentTcad2d.

Definition at line 259 of file ComponentBase.hh.

261 {
262 vx = vy = vz = 0;
263 status = -100;
264 }

◆ EnableAxialPeriodicityX()

void Garfield::ComponentBase::EnableAxialPeriodicityX ( const bool  on = true)
inline

Enable axial periodicity in the $x$ direction.

Definition at line 194 of file ComponentBase.hh.

194 {
195 m_axiallyPeriodic[0] = on;
197 }
std::array< bool, 3 > m_axiallyPeriodic
Axial periodicity in x, y, z.
virtual void UpdatePeriodicity()=0
Verify periodicities.

Referenced by DisableAxialPeriodicityX().

◆ EnableAxialPeriodicityY()

void Garfield::ComponentBase::EnableAxialPeriodicityY ( const bool  on = true)
inline

Enable axial periodicity in the $y$ direction.

Definition at line 200 of file ComponentBase.hh.

200 {
201 m_axiallyPeriodic[1] = on;
203 }

Referenced by DisableAxialPeriodicityY().

◆ EnableAxialPeriodicityZ()

void Garfield::ComponentBase::EnableAxialPeriodicityZ ( const bool  on = true)
inline

Enable axial periodicity in the $z$ direction.

Definition at line 206 of file ComponentBase.hh.

206 {
207 m_axiallyPeriodic[2] = on;
209 }

Referenced by DisableAxialPeriodicityZ().

◆ EnableDebugging()

void Garfield::ComponentBase::EnableDebugging ( )
inline

Switch on debugging messages.

Definition at line 232 of file ComponentBase.hh.

232{ m_debug = true; }

◆ EnableMirrorPeriodicityX()

void Garfield::ComponentBase::EnableMirrorPeriodicityX ( const bool  on = true)
inline

Enable mirror periodicity in the $x$ direction.

Definition at line 175 of file ComponentBase.hh.

175 {
176 m_mirrorPeriodic[0] = on;
178 }
std::array< bool, 3 > m_mirrorPeriodic
Mirror periodicity in x, y, z.

Referenced by DisableMirrorPeriodicityX().

◆ EnableMirrorPeriodicityY()

void Garfield::ComponentBase::EnableMirrorPeriodicityY ( const bool  on = true)
inline

Enable mirror periodicity in the $y$ direction.

Definition at line 181 of file ComponentBase.hh.

181 {
182 m_mirrorPeriodic[1] = on;
184 }

Referenced by DisableMirrorPeriodicityY(), and main().

◆ EnableMirrorPeriodicityZ()

void Garfield::ComponentBase::EnableMirrorPeriodicityZ ( const bool  on = true)
inline

Enable mirror periodicity in the $y$ direction.

Definition at line 187 of file ComponentBase.hh.

187 {
188 m_mirrorPeriodic[2] = on;
190 }

Referenced by DisableMirrorPeriodicityZ().

◆ EnablePeriodicityX()

void Garfield::ComponentBase::EnablePeriodicityX ( const bool  on = true)
inline

Enable simple periodicity in the $x$ direction.

Definition at line 156 of file ComponentBase.hh.

156 {
157 m_periodic[0] = on;
159 }
std::array< bool, 3 > m_periodic
Simple periodicity in x, y, z.

Referenced by DisablePeriodicityX(), and main().

◆ EnablePeriodicityY()

void Garfield::ComponentBase::EnablePeriodicityY ( const bool  on = true)
inline

Enable simple periodicity in the $y$ direction.

Definition at line 162 of file ComponentBase.hh.

162 {
163 m_periodic[1] = on;
165 }

Referenced by DisablePeriodicityY().

◆ EnablePeriodicityZ()

void Garfield::ComponentBase::EnablePeriodicityZ ( const bool  on = true)
inline

Enable simple periodicity in the $z$ direction.

Definition at line 168 of file ComponentBase.hh.

168 {
169 m_periodic[2] = on;
171 }

Referenced by DisablePeriodicityZ().

◆ EnableRotationSymmetryX()

void Garfield::ComponentBase::EnableRotationSymmetryX ( const bool  on = true)
inline

Enable rotation symmetry around the $x$ axis.

Definition at line 213 of file ComponentBase.hh.

213 {
214 m_rotationSymmetric[0] = on;
216 }
std::array< bool, 3 > m_rotationSymmetric
Rotation symmetry around x-axis, y-axis, z-axis.

Referenced by DisableRotationSymmetryX().

◆ EnableRotationSymmetryY()

void Garfield::ComponentBase::EnableRotationSymmetryY ( const bool  on = true)
inline

Enable rotation symmetry around the $y$ axis.

Definition at line 219 of file ComponentBase.hh.

219 {
220 m_rotationSymmetric[1] = on;
222 }

Referenced by DisableRotationSymmetryY().

◆ EnableRotationSymmetryZ()

void Garfield::ComponentBase::EnableRotationSymmetryZ ( const bool  on = true)
inline

Enable rotation symmetry around the $z$ axis.

Definition at line 225 of file ComponentBase.hh.

225 {
226 m_rotationSymmetric[2] = on;
228 }

Referenced by DisableRotationSymmetryZ().

◆ GetBoundingBox()

bool Garfield::ComponentBase::GetBoundingBox ( double &  xmin,
double &  ymin,
double &  zmin,
double &  xmax,
double &  ymax,
double &  zmax 
)
virtual

Get the bounding box coordinates.

Reimplemented in Garfield::ComponentAnalyticField, Garfield::ComponentFieldMap, Garfield::ComponentGrid, Garfield::ComponentNeBem2d, Garfield::ComponentNeBem3dMap, Garfield::ComponentTcad2d, Garfield::ComponentTcad3d, and Garfield::ComponentVoxel.

Definition at line 85 of file ComponentBase.cc.

86 {
87 if (!m_geometry) return false;
88 return m_geometry->GetBoundingBox(xmin, ymin, zmin, xmax, ymax, zmax);
89}
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)=0
Get the bounding box (envelope of the geometry).

Referenced by Garfield::ComponentConstant::GetVoltageRange().

◆ GetElectronLifetime()

virtual bool Garfield::ComponentBase::GetElectronLifetime ( const double  ,
const double  ,
const double  ,
double &  etau 
)
inlinevirtual

Reimplemented in Garfield::ComponentTcad2d.

Definition at line 272 of file ComponentBase.hh.

273 {
274 etau = -1;
275 return false;
276 }

◆ GetHoleLifetime()

virtual bool Garfield::ComponentBase::GetHoleLifetime ( const double  ,
const double  ,
const double  ,
double &  htau 
)
inlinevirtual

Reimplemented in Garfield::ComponentTcad2d.

Definition at line 277 of file ComponentBase.hh.

278 {
279 htau = -1;
280 return false;
281 }

◆ GetMedium()

◆ GetVoltageRange()

◆ HoleAttachment()

virtual bool Garfield::ComponentBase::HoleAttachment ( const double  ,
const double  ,
const double  ,
double &  eta 
)
inlinevirtual

Get the hole attachment coefficient.

Reimplemented in Garfield::ComponentTcad2d.

Definition at line 253 of file ComponentBase.hh.

254 {
255 eta = 0;
256 return false;
257 }

◆ HoleVelocity()

virtual void Garfield::ComponentBase::HoleVelocity ( const double  ,
const double  ,
const double  ,
double &  vx,
double &  vy,
double &  vz,
Medium *&  ,
int &  status 
)
inlinevirtual

Get the hole drift velocity.

Reimplemented in Garfield::ComponentTcad2d.

Definition at line 266 of file ComponentBase.hh.

268 {
269 vx = vy = vz = 0;
270 status = -100;
271 }

◆ IntegrateFlux()

double Garfield::ComponentBase::IntegrateFlux ( const double  x0,
const double  y0,
const double  z0,
const double  dx1,
const double  dy1,
const double  dz1,
const double  dx2,
const double  dy2,
const double  dz2,
const unsigned int  nU = 20,
const unsigned int  nV = 20 
)

Integrate the normal component of the electric field over a parallelogram.

Parameters
x0,y0,z0coordinates of one of the corners [cm]
dx1,dy1,dz1vector to one of the adjacent corners [cm]
dx2,dy2,dz2vector to the other adjacent corner [cm]
nU,nVnumber of integration points in the two directions
Returns
flux [V cm]

Definition at line 208 of file ComponentBase.cc.

212 {
213
214 // FLDIN4, FCHK4, FCHK5
215 if (nU <= 1 || nV <= 1) {
216 std::cerr << m_className << "::IntegrateFlux:\n"
217 << " Number of points to integrate over must be > 1.\n";
218 return 0.;
219 }
220 // Number of Gaussian quadrature points.
221 constexpr unsigned int nG = 6;
222 constexpr std::array<double, nG> t = {
223 -0.932469514203152028, -0.661209386466264514, -0.238619186083196909,
224 0.238619186083196909, 0.661209386466264514, 0.932469514203152028};
225 constexpr std::array<double, nG> w = {
226 0.171324492379170345, 0.360761573048138608, 0.467913934572691047,
227 0.467913934572691047, 0.360761573048138608, 0.171324492379170345};
228
229 // Compute the normal vector.
230 const double xn = dy1 * dz2 - dz1 * dy2;
231 const double yn = dz1 * dx2 - dx1 * dz2;
232 const double zn = dx1 * dy2 - dy1 * dx2;
233 if (m_debug) {
234 std::cout << m_className << "::IntegrateFlux: Normal vector = "
235 << xn << ", " << yn << ", " << zn << ".\n";
236 }
237 // If this vector has zero norm, return 0 flux.
238 const double d1 = dx1 * dx1 + dy1 * dy1 + dz1 * dz1;
239 const double d2 = dx2 * dx2 + dy2 * dy2 + dz2 * dz2;
240 if (xn * xn + yn * yn + zn * zn < 1.e-10 * sqrt(d1 * d2) ||
241 d1 < 1.e-10 * d2 || d2 < 1.e-10 * d1) {
242 std::cerr << m_className << "::IntegrateFlux:\n"
243 << " Parallelogram does not have non-zero area.\n";
244 return 0.;
245 }
246
247 // (Half-)step sizes in the two directions.
248 const double du = 1. / nU;
249 const double hu = 0.5 * du;
250 const double dv = 1. / nV;
251 const double hv = 0.5 * dv;
252 // Arguments of ElectricField.
253 double ex = 0., ey = 0., ez = 0.;
254 Medium* m = nullptr;
255 int status = 0;
256 // Perform the integration.
257 double s2 = 0.;
258 for (unsigned int i = 0; i < nG; ++i) {
259 const double v0 = hv * (1. + t[i]);
260 for (unsigned int k = 0; k < nV; ++k) {
261 const double v = v0 + k * dv;
262 double s1 = 0.;
263 for (unsigned int ii = 0; ii < nG; ++ii) {
264 const double u0 = hu * (1. + t[ii]);
265 for (unsigned int kk = 0; kk < nU; ++kk) {
266 const double u = u0 + kk * du;
267 const double x = x0 + u * dx1 + v * dx2;
268 const double y = y0 + u * dy1 + v * dy2;
269 const double z = z0 + u * dz1 + v * dz2;
270 ElectricField(x, y, z, ex, ey, ez, m, status);
271 s1 += w[ii] * (ex * xn + ey * yn + ez * zn);
272 }
273 }
274 s2 += w[i] * hu * s1;
275 }
276 }
277 return hv * s2;
278}
virtual void ElectricField(const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status)=0
DoubleAc sqrt(const DoubleAc &f)
Definition: DoubleAc.cpp:314

◆ IntegrateFluxCircle()

double Garfield::ComponentBase::IntegrateFluxCircle ( const double  xc,
const double  yc,
const double  r,
const unsigned int  nI = 50 
)

Integrate the normal component of the electric field over a circle.

Parameters
xc,yccentre of the circle [cm]
rradius [cm]
nInumber of intervals for the integration
Returns
charge enclosed in the circle [fC / cm]

Definition at line 109 of file ComponentBase.cc.

111 {
112 // FLDIN2, FCHK3
113 if (nI == 0) {
114 std::cerr << m_className << "::IntegrateFlux:\n"
115 << " Number of intervals must be > 0.\n";
116 return 0.;
117 }
118 // Number of Gaussian quadrature points per interval.
119 constexpr unsigned int nG = 6;
120 constexpr std::array<double, nG> t = {
121 -0.932469514203152028, -0.661209386466264514, -0.238619186083196909,
122 0.238619186083196909, 0.661209386466264514, 0.932469514203152028};
123 constexpr std::array<double, nG> w = {
124 0.171324492379170345, 0.360761573048138608, 0.467913934572691047,
125 0.467913934572691047, 0.360761573048138608, 0.171324492379170345};
126
127 // Width and half-width of intervals.
128 const double d = TwoPi / nI;
129 const double h = 0.5 * d;
130 // Arguments of ElectricField.
131 double ex = 0., ey = 0., ez = 0.;
132 Medium* m = nullptr;
133 int status = 0;
134 // Perform the integration.
135 double s = 0.;
136 for (unsigned int i = 0; i < nG; ++i) {
137 const double phi0 = h * (1. + t[i]);
138 for (unsigned int k = 0; k < nI; ++k) {
139 const double phi = phi0 + k * d;
140 const double cp = cos(phi);
141 const double sp = sin(phi);
142 ElectricField(xc + cp * r, yc + sp * r, 0., ex, ey, ez, m, status);
143 s += w[i] * r * (ex * cp + ey * sp);
144 }
145 }
146 return h * s * VacuumPermittivity;
147}
DoubleAc cos(const DoubleAc &f)
Definition: DoubleAc.cpp:432
DoubleAc sin(const DoubleAc &f)
Definition: DoubleAc.cpp:384

◆ IntegrateFluxSphere()

double Garfield::ComponentBase::IntegrateFluxSphere ( const double  xc,
const double  yc,
const double  zc,
const double  r,
const unsigned int  nI = 20 
)

Integrate the normal component of the electric field over a sphere.

Parameters
xc,yc,zccentre of the sphere [cm]
rradius of the sphere [cm]
nInumber of integration intervals in phi and theta
Returns
charge enclosed in the sphere [fC]

Definition at line 149 of file ComponentBase.cc.

151 {
152 // FLDIN3, FCHK2, FCHK1
153 if (nI == 0) {
154 std::cerr << m_className << "::IntegrateFlux:\n"
155 << " Number of intervals must be > 0.\n";
156 return 0.;
157 }
158 // Number of Gaussian quadrature points.
159 constexpr unsigned int nG = 6;
160 constexpr std::array<double, nG> t = {
161 -0.932469514203152028, -0.661209386466264514, -0.238619186083196909,
162 0.238619186083196909, 0.661209386466264514, 0.932469514203152028};
163 constexpr std::array<double, nG> w = {
164 0.171324492379170345, 0.360761573048138608, 0.467913934572691047,
165 0.467913934572691047, 0.360761573048138608, 0.171324492379170345};
166
167 const double r2 = r * r;
168 // Width and half-width of theta intervals.
169 const double dt = Pi / nI;
170 const double ht = 0.5 * dt;
171 // Width and half-width of phi intervals.
172 const double dp = TwoPi / nI;
173 const double hp = 0.5 * dp;
174 // Arguments of ElectricField.
175 double ex = 0., ey = 0., ez = 0.;
176 Medium* m = nullptr;
177 int status = 0;
178 // Perform the integration.
179 double s2 = 0.;
180 // Loop over theta.
181 for (unsigned int i = 0; i < nG; ++i) {
182 const double theta0 = ht * (1. + t[i]) - HalfPi;
183 for (unsigned int k = 0; k < nI; ++k) {
184 const double theta = theta0 + k * dt;
185 const double ct = cos(theta);
186 const double st = sin(theta);
187 const double z = zc + st * r;
188 double s1 = 0.;
189 // Loop over phi.
190 for (unsigned int ii = 0; ii < nG; ++ii) {
191 const double phi0 = hp * (1. + t[ii]);
192 for (unsigned int kk = 0; kk < nI; ++kk) {
193 const double phi = phi0 + kk * dp;
194 const double cp = cos(phi);
195 const double sp = sin(phi);
196 const double x = xc + cp * ct * r;
197 const double y = yc + sp * ct * r;
198 ElectricField(x, y, z, ex, ey, ez, m, status);
199 s1 += w[ii] * ((ex * cp + ey * sp) * ct + ez * st);
200 }
201 }
202 s2 += w[i] * r2 * ct * hp * s1;
203 }
204 }
205 return ht * s2 * VacuumPermittivity;
206}

◆ IsInTrapRadius()

bool Garfield::ComponentBase::IsInTrapRadius ( const double  q0,
const double  x0,
const double  y0,
const double  z0,
double &  xw,
double &  yw,
double &  rw 
)
virtual

Determine whether a particle is inside the trap radius of a wire.

Parameters
q0charge of the particle [in elementary charges].
x0,y0,z0position [cm] of the particle.
xw,ywcoordinates of the wire (if applicable).
rwradius of the wire (if applicable).

Reimplemented in Garfield::ComponentAnalyticField, and Garfield::ComponentNeBem2d.

Definition at line 100 of file ComponentBase.cc.

102 {
103 xw = x0;
104 yw = y0;
105 rw = 0.;
106 return false;
107}

◆ IsReady()

virtual bool Garfield::ComponentBase::IsReady ( )
inlinevirtual

Ready for use?

Definition at line 94 of file ComponentBase.hh.

94{ return m_ready; }
bool m_ready
Ready for use?

◆ IsTrapActive()

bool Garfield::ComponentBase::IsTrapActive ( )
inline

Definition at line 239 of file ComponentBase.hh.

239{ return m_activeTraps; }

◆ IsVelocityActive()

bool Garfield::ComponentBase::IsVelocityActive ( )
inline

Definition at line 244 of file ComponentBase.hh.

244{ return m_hasVelocityMap; }

◆ IsWireCrossed()

bool Garfield::ComponentBase::IsWireCrossed ( const double  x0,
const double  y0,
const double  z0,
const double  x1,
const double  y1,
const double  z1,
double &  xc,
double &  yc,
double &  zc,
const bool  centre,
double &  rc 
)
virtual

Determine whether the line between two points crosses a wire.

Parameters
x0,y0,z0first point [cm].
x1,y1,z1second point [cm]
xc,yc,zcpoint [cm] where the line crosses the wire or the coordinates of the wire centre.
centreflag whether to return the coordinates of the line-wire crossing point or of the wire centre.
rcradius [cm] of the wire.

Reimplemented in Garfield::ComponentAnalyticField, and Garfield::ComponentNeBem2d.

Definition at line 91 of file ComponentBase.cc.

96 {
97 return false;
98}

◆ MagneticField()

void Garfield::ComponentBase::MagneticField ( const double  x,
const double  y,
const double  z,
double &  bx,
double &  by,
double &  bz,
int &  status 
)
virtual

Calculate the magnetic field at a given point.

Parameters
x,y,zcoordinates [cm].
bx,by,bzcomponents of the magnetic field [Tesla].
statusstatus flag.

Reimplemented in Garfield::ComponentGrid, Garfield::ComponentNeBem3dMap, Garfield::ComponentUser, and Garfield::ComponentVoxel.

Definition at line 64 of file ComponentBase.cc.

66 {
67 bx = m_bx0;
68 by = m_by0;
69 bz = m_bz0;
70 if (m_debug) {
71 std::cout << m_className << "::MagneticField: Field at (" << x << ", " << y
72 << ", " << z << ") is (" << bx << ", " << by << ", " << bz
73 << ")\n";
74 }
75 status = 0;
76}

Referenced by Garfield::ComponentGrid::MagneticField(), Garfield::ComponentNeBem3dMap::MagneticField(), and Garfield::ComponentVoxel::MagneticField().

◆ Reset()

virtual void Garfield::ComponentBase::Reset ( )
protectedpure virtual

Reset the component.

Implemented in Garfield::ComponentUserMapBase, Garfield::ComponentFieldMap, and Garfield::ComponentNeBem3d.

Referenced by Clear().

◆ SetGeometry()

void Garfield::ComponentBase::SetGeometry ( GeometryBase geo)
virtual

Define the geometry.

Definition at line 11 of file ComponentBase.cc.

11 {
12 // Make sure the geometry is defined
13 if (!geo) {
14 std::cerr << m_className << "::SetGeometry: Null pointer.\n";
15 return;
16 }
17
18 m_geometry = geo;
19}

Referenced by GarfieldPhysics::CreateGeometry().

◆ SetMagneticField()

void Garfield::ComponentBase::SetMagneticField ( const double  bx,
const double  by,
const double  bz 
)

Set a constant magnetic field.

Definition at line 78 of file ComponentBase.cc.

79 {
80 m_bx0 = bx;
81 m_by0 = by;
82 m_bz0 = bz;
83}

◆ UpdatePeriodicity()

◆ WeightingField()

void Garfield::ComponentBase::WeightingField ( const double  x,
const double  y,
const double  z,
double &  wx,
double &  wy,
double &  wz,
const std::string &  label 
)
virtual

Calculate the weighting field at a given point and for a given electrode.

Parameters
x,y,zcoordinates [cm].
wx,wy,wzcomponents of the weighting field [1/cm].
labelname of the electrode

Reimplemented in Garfield::ComponentUserMapBase, Garfield::ComponentAnalyticField, Garfield::ComponentAnsys121, Garfield::ComponentAnsys123, Garfield::ComponentComsol, Garfield::ComponentConstant, Garfield::ComponentCST, Garfield::ComponentElmer, Garfield::ComponentGrid, Garfield::ComponentNeBem3dMap, Garfield::ComponentTcad2d, Garfield::ComponentTcad3d, Garfield::ComponentUser, and Garfield::ComponentVoxel.

Definition at line 32 of file ComponentBase.cc.

34 {
35 if (m_debug) {
36 std::cerr << m_className << "::WeightingField: Function not implemented.\n";
37 }
38 wx = wy = wz = 0.;
39}

Referenced by Garfield::ViewField::Evaluate2D(), Garfield::ViewField::EvaluateProfile(), Garfield::ComponentGrid::SaveWeightingField(), and Garfield::ComponentUserMapBase::WeightingField().

◆ WeightingPotential()

double Garfield::ComponentBase::WeightingPotential ( const double  x,
const double  y,
const double  z,
const std::string &  label 
)
virtual

Calculate the weighting potential at a given point.

Parameters
x,y,zcoordinates [cm].
labelname of the electrode.
Returns
weighting potential [dimensionless].

Reimplemented in Garfield::ComponentUserMapBase, Garfield::ComponentAnalyticField, Garfield::ComponentAnsys121, Garfield::ComponentAnsys123, Garfield::ComponentComsol, Garfield::ComponentConstant, Garfield::ComponentCST, Garfield::ComponentElmer, Garfield::ComponentGrid, Garfield::ComponentNeBem3dMap, Garfield::ComponentTcad2d, Garfield::ComponentTcad3d, Garfield::ComponentUser, and Garfield::ComponentVoxel.

Definition at line 54 of file ComponentBase.cc.

56 {
57 if (m_debug) {
58 std::cerr << m_className << "::WeightingPotential: "
59 << "Function not implemented.\n";
60 }
61 return 0.;
62}

Referenced by Garfield::ViewField::Evaluate2D(), Garfield::ViewField::EvaluateProfile(), Garfield::ComponentGrid::SaveWeightingField(), and Garfield::ComponentUserMapBase::WeightingPotential().

Member Data Documentation

◆ m_activeTraps

bool Garfield::ComponentBase::m_activeTraps = false
protected

Does the component have traps?

Definition at line 294 of file ComponentBase.hh.

Referenced by ActivateTraps(), DeactivateTraps(), and IsTrapActive().

◆ m_axiallyPeriodic

◆ m_bx0

double Garfield::ComponentBase::m_bx0 = 0.
protected

Definition at line 307 of file ComponentBase.hh.

Referenced by MagneticField(), and SetMagneticField().

◆ m_by0

double Garfield::ComponentBase::m_by0 = 0.
protected

Definition at line 307 of file ComponentBase.hh.

Referenced by MagneticField(), and SetMagneticField().

◆ m_bz0

double Garfield::ComponentBase::m_bz0 = 0.
protected

Definition at line 307 of file ComponentBase.hh.

Referenced by MagneticField(), and SetMagneticField().

◆ m_className

std::string Garfield::ComponentBase::m_className = "ComponentBase"
protected

Class name.

Definition at line 285 of file ComponentBase.hh.

Referenced by Garfield::ComponentAnalyticField::AddPixelOnPlanePhi(), Garfield::ComponentAnalyticField::AddPixelOnPlaneR(), Garfield::ComponentAnalyticField::AddPixelOnPlaneX(), Garfield::ComponentAnalyticField::AddPixelOnPlaneY(), Garfield::ComponentAnalyticField::AddPlanePhi(), Garfield::ComponentAnalyticField::AddPlaneR(), Garfield::ComponentAnalyticField::AddPlaneX(), Garfield::ComponentAnalyticField::AddPlaneY(), Garfield::ComponentAnalyticField::AddReadout(), Garfield::ComponentNeBem2d::AddRegion(), Garfield::ComponentNeBem2d::AddSegment(), Garfield::ComponentAnalyticField::AddStripOnPlanePhi(), Garfield::ComponentAnalyticField::AddStripOnPlaneR(), Garfield::ComponentAnalyticField::AddStripOnPlaneX(), Garfield::ComponentAnalyticField::AddStripOnPlaneY(), Garfield::ComponentAnalyticField::AddTube(), Garfield::ComponentNeBem2d::AddWire(), Garfield::ComponentAnalyticField::AddWire(), Garfield::ComponentAnalyticField::ComponentAnalyticField(), Garfield::ComponentAnsys121::ComponentAnsys121(), Garfield::ComponentAnsys123::ComponentAnsys123(), Garfield::ComponentComsol::ComponentComsol(), Garfield::ComponentConstant::ComponentConstant(), Garfield::ComponentCST::ComponentCST(), Garfield::ComponentElmer::ComponentElmer(), Garfield::ComponentFieldMap::ComponentFieldMap(), Garfield::ComponentGrid::ComponentGrid(), Garfield::ComponentNeBem2d::ComponentNeBem2d(), Garfield::ComponentNeBem3d::ComponentNeBem3d(), Garfield::ComponentNeBem3dMap::ComponentNeBem3dMap(), Garfield::ComponentTcad2d::ComponentTcad2d(), Garfield::ComponentTcad3d::ComponentTcad3d(), Garfield::ComponentUser::ComponentUser(), Garfield::ComponentUserMapBase::ComponentUserMapBase(), Garfield::ComponentVoxel::ComponentVoxel(), Garfield::ComponentCST::Coordinate2Index(), DelayedWeightingField(), Garfield::ComponentFieldMap::DriftMedium(), Garfield::ComponentUserMapBase::ElectricField(), Garfield::ComponentAnsys121::ElectricField(), Garfield::ComponentAnsys123::ElectricField(), Garfield::ComponentComsol::ElectricField(), Garfield::ComponentElmer::ElectricField(), Garfield::ComponentGrid::ElectricField(), Garfield::ComponentNeBem2d::ElectricField(), Garfield::ComponentNeBem3d::ElectricField(), Garfield::ComponentNeBem3dMap::ElectricField(), Garfield::ComponentTcad2d::ElectricField(), Garfield::ComponentTcad3d::ElectricField(), Garfield::ComponentVoxel::ElectricField(), Garfield::ComponentConstant::ElectricField(), Garfield::ComponentUser::ElectricField(), Garfield::ComponentAnalyticField::ElectricFieldAtWire(), Garfield::ComponentTcad2d::ElectronAttachment(), Garfield::ComponentTcad2d::ElectronVelocity(), Garfield::ComponentFieldMap::FindElement13(), Garfield::ComponentFieldMap::FindElement5(), Garfield::ComponentFieldMap::FindElementCube(), Garfield::ComponentAnalyticField::ForcesOnWire(), Garfield::ComponentTcad2d::GetAcceptorOccupation(), Garfield::ComponentFieldMap::GetConductivity(), Garfield::ComponentTcad2d::GetDonorOccupation(), Garfield::ComponentGrid::GetElectricField(), Garfield::ComponentGrid::GetElectricFieldRange(), Garfield::ComponentNeBem3dMap::GetElectricFieldRange(), Garfield::ComponentVoxel::GetElectricFieldRange(), Garfield::ComponentTcad2d::GetElectronLifetime(), Garfield::ComponentNeBem3dMap::GetElement(), Garfield::ComponentVoxel::GetElement(), Garfield::ComponentFieldMap::GetElement(), Garfield::ComponentTcad2d::GetElement(), Garfield::ComponentTcad3d::GetElement(), Garfield::ComponentNeBem3d::GetElement(), Garfield::ComponentTcad2d::GetHoleLifetime(), Garfield::ComponentUserMapBase::GetMedium(), Garfield::ComponentAnsys121::GetMedium(), Garfield::ComponentAnsys123::GetMedium(), Garfield::ComponentComsol::GetMedium(), Garfield::ComponentCST::GetMedium(), Garfield::ComponentElmer::GetMedium(), Garfield::ComponentGrid::GetMedium(), Garfield::ComponentNeBem3dMap::GetMedium(), Garfield::ComponentTcad2d::GetMedium(), Garfield::ComponentTcad3d::GetMedium(), Garfield::ComponentVoxel::GetMedium(), Garfield::ComponentFieldMap::GetMedium(), Garfield::ComponentTcad2d::GetMobility(), Garfield::ComponentTcad2d::GetNode(), Garfield::ComponentTcad3d::GetNode(), Garfield::ComponentFieldMap::GetPermittivity(), Garfield::ComponentAnalyticField::GetPlanePhi(), Garfield::ComponentAnalyticField::GetPlaneR(), Garfield::ComponentAnalyticField::GetPlaneX(), Garfield::ComponentAnalyticField::GetPlaneY(), Garfield::ComponentNeBem3d::GetPrimitive(), Garfield::ComponentTcad2d::GetRegion(), Garfield::ComponentTcad3d::GetRegion(), Garfield::ComponentAnalyticField::GetVoltageRange(), Garfield::ComponentConstant::GetVoltageRange(), Garfield::ComponentAnalyticField::GetWire(), Garfield::ComponentTcad2d::HoleAttachment(), Garfield::ComponentTcad2d::HoleVelocity(), Garfield::ComponentNeBem2d::Initialise(), Garfield::ComponentNeBem3d::Initialise(), Garfield::ComponentTcad2d::Initialise(), Garfield::ComponentTcad3d::Initialise(), Garfield::ComponentElmer::Initialise(), Garfield::ComponentCST::Initialise(), Garfield::ComponentAnsys121::Initialise(), Garfield::ComponentAnsys123::Initialise(), Garfield::ComponentComsol::Initialise(), IntegrateFlux(), IntegrateFluxCircle(), IntegrateFluxSphere(), Garfield::ComponentAnalyticField::IsInTrapRadius(), Garfield::ComponentAnalyticField::IsWireCrossed(), Garfield::ComponentNeBem3dMap::LoadElectricField(), Garfield::ComponentVoxel::LoadElectricField(), Garfield::ComponentNeBem3dMap::LoadMagneticField(), Garfield::ComponentVoxel::LoadMagneticField(), Garfield::ComponentNeBem3dMap::LoadMapInfo(), Garfield::ComponentVoxel::LoadWeightingField(), MagneticField(), Garfield::ComponentAnalyticField::MultipoleMoments(), Garfield::ComponentFieldMap::NotDriftMedium(), Garfield::ComponentAnalyticField::PrintCell(), Garfield::ComponentAnalyticField::PrintCharges(), Garfield::ComponentFieldMap::PrintElement(), Garfield::ComponentFieldMap::PrintMaterials(), Garfield::ComponentFieldMap::PrintNotReady(), Garfield::ComponentFieldMap::PrintRange(), Garfield::ComponentTcad3d::PrintRegions(), Garfield::ComponentNeBem3dMap::PrintRegions(), Garfield::ComponentTcad2d::PrintRegions(), Garfield::ComponentVoxel::PrintRegions(), Garfield::ComponentFieldMap::PrintWarning(), Garfield::ComponentGrid::SaveElectricField(), Garfield::ComponentGrid::SaveWeightingField(), Garfield::ComponentTcad2d::SetAcceptor(), Garfield::ComponentAnalyticField::SetCartesianCoordinates(), Garfield::ComponentUser::SetDelayedWeightingField(), Garfield::ComponentTcad2d::SetDonor(), Garfield::ComponentTcad2d::SetDriftRegion(), Garfield::ComponentTcad3d::SetDriftRegion(), Garfield::ComponentConstant::SetElectricField(), Garfield::ComponentUser::SetElectricField(), SetGeometry(), Garfield::ComponentAnalyticField::SetGravity(), Garfield::ComponentUser::SetMagneticField(), Garfield::ComponentNeBem2d::SetMaxNumberOfIterations(), Garfield::ComponentNeBem3dMap::SetMedium(), Garfield::ComponentVoxel::SetMedium(), Garfield::ComponentFieldMap::SetMedium(), Garfield::ComponentTcad2d::SetMedium(), Garfield::ComponentTcad3d::SetMedium(), Garfield::ComponentGrid::SetMedium(), Garfield::ComponentGrid::SetMesh(), Garfield::ComponentNeBem3dMap::SetMesh(), Garfield::ComponentVoxel::SetMesh(), Garfield::ComponentNeBem2d::SetNumberOfCollocationPoints(), Garfield::ComponentNeBem2d::SetNumberOfDivisions(), Garfield::ComponentAnalyticField::SetNumberOfSteps(), Garfield::ComponentAnalyticField::SetPeriodicityPhi(), Garfield::ComponentAnalyticField::SetPeriodicityX(), Garfield::ComponentAnalyticField::SetPeriodicityY(), Garfield::ComponentAnalyticField::SetPolarCoordinates(), Garfield::ComponentUser::SetPotential(), Garfield::ComponentFieldMap::SetRange(), Garfield::ComponentAnsys121::SetRangeZ(), Garfield::ComponentCST::SetRangeZ(), Garfield::ComponentNeBem2d::SetRangeZ(), Garfield::ComponentTcad2d::SetRangeZ(), Garfield::ComponentAnalyticField::SetScanningArea(), Garfield::ComponentAnalyticField::SetScanningAreaFirstOrder(), Garfield::ComponentAnalyticField::SetScanningGrid(), Garfield::ComponentNeBem3d::SetTargetElementSize(), Garfield::ComponentTcad2d::SetWeightingField(), Garfield::ComponentTcad3d::SetWeightingField(), Garfield::ComponentComsol::SetWeightingField(), Garfield::ComponentAnsys121::SetWeightingField(), Garfield::ComponentAnsys123::SetWeightingField(), Garfield::ComponentElmer::SetWeightingField(), Garfield::ComponentCST::SetWeightingField(), Garfield::ComponentUser::SetWeightingField(), Garfield::ComponentConstant::SetWeightingPotential(), Garfield::ComponentUser::SetWeightingPotential(), Garfield::ComponentCST::ShiftComponent(), Garfield::ComponentTcad2d::UnsetDriftRegion(), Garfield::ComponentTcad3d::UnsetDriftRegion(), Garfield::ComponentUserMapBase::UpdatePeriodicity(), Garfield::ComponentNeBem3d::UpdatePeriodicity(), Garfield::ComponentFieldMap::UpdatePeriodicity2d(), Garfield::ComponentFieldMap::UpdatePeriodicityCommon(), WeightingField(), Garfield::ComponentUserMapBase::WeightingField(), Garfield::ComponentConstant::WeightingField(), Garfield::ComponentTcad2d::WeightingField(), Garfield::ComponentTcad3d::WeightingField(), WeightingPotential(), Garfield::ComponentUserMapBase::WeightingPotential(), Garfield::ComponentCST::WeightingPotential(), Garfield::ComponentTcad2d::WeightingPotential(), Garfield::ComponentTcad3d::WeightingPotential(), and Garfield::ComponentAnalyticField::WireDisplacement().

◆ m_debug

bool Garfield::ComponentBase::m_debug = false
protected

Switch on/off debugging messages.

Definition at line 310 of file ComponentBase.hh.

Referenced by Garfield::ComponentNeBem2d::AddRegion(), Garfield::ComponentNeBem2d::AddSegment(), Garfield::ComponentNeBem2d::AddWire(), Garfield::ComponentCST::Coordinate2Index(), DelayedWeightingField(), DisableDebugging(), Garfield::ComponentUserMapBase::ElectricField(), Garfield::ComponentAnsys121::ElectricField(), Garfield::ComponentAnsys123::ElectricField(), Garfield::ComponentComsol::ElectricField(), Garfield::ComponentElmer::ElectricField(), Garfield::ComponentNeBem3dMap::ElectricField(), Garfield::ComponentConstant::ElectricField(), Garfield::ComponentUser::ElectricField(), Garfield::ComponentTcad2d::ElectronAttachment(), EnableDebugging(), Garfield::ComponentFieldMap::FindElement13(), Garfield::ComponentFieldMap::FindElement5(), Garfield::ComponentFieldMap::FindElementCube(), Garfield::ComponentAnalyticField::ForcesOnWire(), Garfield::ComponentNeBem3dMap::GetElement(), Garfield::ComponentUserMapBase::GetMedium(), Garfield::ComponentAnsys121::GetMedium(), Garfield::ComponentAnsys123::GetMedium(), Garfield::ComponentComsol::GetMedium(), Garfield::ComponentCST::GetMedium(), Garfield::ComponentElmer::GetMedium(), Garfield::ComponentTcad2d::HoleAttachment(), Garfield::ComponentNeBem2d::Initialise(), Garfield::ComponentNeBem3d::Initialise(), Garfield::ComponentTcad3d::Initialise(), Garfield::ComponentElmer::Initialise(), Garfield::ComponentCST::Initialise(), Garfield::ComponentAnsys121::Initialise(), Garfield::ComponentAnsys123::Initialise(), IntegrateFlux(), Garfield::ComponentAnalyticField::IsInTrapRadius(), MagneticField(), Garfield::ComponentAnalyticField::MultipoleMoments(), Garfield::ComponentFieldMap::SetMedium(), Garfield::ComponentFieldMap::SetRange(), Garfield::ComponentCST::SetWeightingField(), Garfield::ComponentUserMapBase::UpdatePeriodicity(), Garfield::ComponentFieldMap::UpdatePeriodicityCommon(), WeightingField(), Garfield::ComponentUserMapBase::WeightingField(), Garfield::ComponentAnsys121::WeightingField(), Garfield::ComponentAnsys123::WeightingField(), Garfield::ComponentComsol::WeightingField(), Garfield::ComponentConstant::WeightingField(), Garfield::ComponentElmer::WeightingField(), WeightingPotential(), Garfield::ComponentUserMapBase::WeightingPotential(), Garfield::ComponentAnsys121::WeightingPotential(), Garfield::ComponentAnsys123::WeightingPotential(), Garfield::ComponentComsol::WeightingPotential(), Garfield::ComponentCST::WeightingPotential(), and Garfield::ComponentElmer::WeightingPotential().

◆ m_geometry

◆ m_hasVelocityMap

bool Garfield::ComponentBase::m_hasVelocityMap = false
protected

Does the component have velocity maps?

Definition at line 296 of file ComponentBase.hh.

Referenced by ActivateVelocityMap(), DectivateVelocityMap(), and IsVelocityActive().

◆ m_mirrorPeriodic

◆ m_periodic

◆ m_ready

bool Garfield::ComponentBase::m_ready = false
protected

Ready for use?

Definition at line 291 of file ComponentBase.hh.

Referenced by Garfield::ComponentNeBem2d::AddSegment(), Garfield::ComponentNeBem2d::AddWire(), Garfield::ComponentFieldMap::DriftMedium(), Garfield::ComponentAnsys121::ElectricField(), Garfield::ComponentAnsys123::ElectricField(), Garfield::ComponentComsol::ElectricField(), Garfield::ComponentElmer::ElectricField(), Garfield::ComponentGrid::ElectricField(), Garfield::ComponentNeBem2d::ElectricField(), Garfield::ComponentNeBem3d::ElectricField(), Garfield::ComponentNeBem3dMap::ElectricField(), Garfield::ComponentTcad2d::ElectricField(), Garfield::ComponentTcad3d::ElectricField(), Garfield::ComponentVoxel::ElectricField(), Garfield::ComponentTcad2d::ElectronVelocity(), Garfield::ComponentTcad2d::GetAcceptorOccupation(), Garfield::ComponentFieldMap::GetBoundingBox(), Garfield::ComponentGrid::GetBoundingBox(), Garfield::ComponentNeBem3dMap::GetBoundingBox(), Garfield::ComponentTcad2d::GetBoundingBox(), Garfield::ComponentTcad3d::GetBoundingBox(), Garfield::ComponentVoxel::GetBoundingBox(), Garfield::ComponentTcad2d::GetDonorOccupation(), Garfield::ComponentGrid::GetElectricField(), Garfield::ComponentGrid::GetElectricFieldRange(), Garfield::ComponentNeBem3dMap::GetElectricFieldRange(), Garfield::ComponentVoxel::GetElectricFieldRange(), Garfield::ComponentTcad2d::GetElectronLifetime(), Garfield::ComponentNeBem3dMap::GetElement(), Garfield::ComponentVoxel::GetElement(), Garfield::ComponentTcad2d::GetHoleLifetime(), Garfield::ComponentAnsys121::GetMedium(), Garfield::ComponentAnsys123::GetMedium(), Garfield::ComponentComsol::GetMedium(), Garfield::ComponentElmer::GetMedium(), Garfield::ComponentGrid::GetMedium(), Garfield::ComponentNeBem3dMap::GetMedium(), Garfield::ComponentTcad2d::GetMedium(), Garfield::ComponentTcad3d::GetMedium(), Garfield::ComponentVoxel::GetMedium(), Garfield::ComponentTcad2d::GetMobility(), Garfield::ComponentNeBem2d::GetRegion(), Garfield::ComponentGrid::GetVoltageRange(), Garfield::ComponentNeBem3dMap::GetVoltageRange(), Garfield::ComponentTcad2d::GetVoltageRange(), Garfield::ComponentTcad3d::GetVoltageRange(), Garfield::ComponentVoxel::GetVoltageRange(), Garfield::ComponentTcad2d::HoleVelocity(), Garfield::ComponentNeBem2d::Initialise(), Garfield::ComponentTcad2d::Initialise(), Garfield::ComponentTcad3d::Initialise(), Garfield::ComponentElmer::Initialise(), Garfield::ComponentCST::Initialise(), Garfield::ComponentAnsys121::Initialise(), Garfield::ComponentAnsys123::Initialise(), Garfield::ComponentComsol::Initialise(), IsReady(), Garfield::ComponentGrid::LoadElectricField(), Garfield::ComponentNeBem3dMap::LoadElectricField(), Garfield::ComponentVoxel::LoadElectricField(), Garfield::ComponentFieldMap::NotDriftMedium(), Garfield::ComponentFieldMap::PrintMaterials(), Garfield::ComponentTcad3d::PrintRegions(), Garfield::ComponentNeBem3dMap::PrintRegions(), Garfield::ComponentTcad2d::PrintRegions(), Garfield::ComponentVoxel::PrintRegions(), Garfield::ComponentNeBem3d::Reset(), Garfield::ComponentConstant::SetElectricField(), Garfield::ComponentUser::SetElectricField(), Garfield::ComponentNeBem2d::SetNumberOfCollocationPoints(), Garfield::ComponentNeBem2d::SetNumberOfDivisions(), Garfield::ComponentFieldMap::SetRange(), Garfield::ComponentTcad2d::SetWeightingField(), Garfield::ComponentTcad3d::SetWeightingField(), Garfield::ComponentComsol::SetWeightingField(), Garfield::ComponentAnsys121::SetWeightingField(), Garfield::ComponentAnsys123::SetWeightingField(), Garfield::ComponentElmer::SetWeightingField(), Garfield::ComponentCST::SetWeightingField(), Garfield::ComponentFieldMap::UpdatePeriodicity2d(), Garfield::ComponentFieldMap::UpdatePeriodicityCommon(), Garfield::ComponentAnsys121::WeightingField(), Garfield::ComponentAnsys123::WeightingField(), Garfield::ComponentComsol::WeightingField(), Garfield::ComponentCST::WeightingField(), Garfield::ComponentElmer::WeightingField(), Garfield::ComponentAnsys121::WeightingPotential(), Garfield::ComponentAnsys123::WeightingPotential(), Garfield::ComponentComsol::WeightingPotential(), Garfield::ComponentCST::WeightingPotential(), and Garfield::ComponentElmer::WeightingPotential().

◆ m_rotationSymmetric

std::array<bool, 3> Garfield::ComponentBase::m_rotationSymmetric = {{false, false, false}}
protected

The documentation for this class was generated from the following files: