Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
Loading...
Searching...
No Matches
Garfield::ComponentConstant Class Reference

Component with constant electric field. More...

#include <ComponentConstant.hh>

Inheritance diagram for Garfield::ComponentConstant:

Public Member Functions

 ComponentConstant ()
 Constructor.
 ~ComponentConstant ()
 Destructor.
void SetElectricField (const double ex, const double ey, const double ez)
 Set the components of the electric field [V / cm].
void SetPotential (const double x, const double y, const double z, const double v=0.)
 Specify the potential at a given point.
void SetWeightingField (const double wx, const double wy, const double wz, const std::string label)
 Set the components of the weighting field [1 / cm].
void SetWeightingPotential (const double x, const double y, const double z, const double v=0.)
 Specify the weighting potential at a given point.
void SetArea (const double xmin, const double ymin, const double zmin, const double xmax, const double ymax, const double zmax)
 Set the limits of the active area explicitly (instead of using a Geometry object).
void UnsetArea ()
 Remove the explicit limits of the active area.
void SetMedium (Medium *medium)
 Set the medium in the active area.
Medium * GetMedium (const double x, const double y, const double z) override
void ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, Medium *&m, int &status) override
void ElectricField (const double x, const double y, const double z, double &ex, double &ey, double &ez, double &v, Medium *&m, int &status) override
bool GetVoltageRange (double &vmin, double &vmax) override
void WeightingField (const double x, const double y, const double z, double &wx, double &wy, double &wz, const std::string &label) override
double WeightingPotential (const double x, const double y, const double z, const std::string &label) override
bool GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) override

Private Member Functions

void Reset () override
void UpdatePeriodicity () override
bool InArea (const double x, const double y, const double z)

Private Attributes

std::array< double, 3 > m_efield = {{0., 0., 0.}}
bool m_hasPotential = false
double m_x0 = 0.
double m_y0 = 0.
double m_z0 = 0.
double m_v0 = 0.
bool m_hasWeightingField = false
std::string m_label = ""
std::array< double, 3 > m_wfield = {{0., 0., 0.}}
bool m_hasWeightingPotential = false
double m_wx0 = 0.
double m_wy0 = 0.
double m_wz0 = 0.
double m_w0 = 0.
std::array< double, 3 > m_xmin = {{0., 0., 0.}}
std::array< double, 3 > m_xmax = {{0., 0., 0.}}
bool m_hasArea = false
Medium * m_medium = nullptr

Detailed Description

Component with constant electric field.

Definition at line 13 of file ComponentConstant.hh.

Constructor & Destructor Documentation

◆ ComponentConstant()

Garfield::ComponentConstant::ComponentConstant ( )

Constructor.

◆ ~ComponentConstant()

Garfield::ComponentConstant::~ComponentConstant ( )
inline

Destructor.

Definition at line 18 of file ComponentConstant.hh.

18{}

Member Function Documentation

◆ ElectricField() [1/2]

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

◆ ElectricField() [2/2]

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

◆ GetBoundingBox()

bool Garfield::ComponentConstant::GetBoundingBox ( double & xmin,
double & ymin,
double & zmin,
double & xmax,
double & ymax,
double & zmax )
override

◆ GetMedium()

Medium * Garfield::ComponentConstant::GetMedium ( const double x,
const double y,
const double z )
override

◆ GetVoltageRange()

bool Garfield::ComponentConstant::GetVoltageRange ( double & vmin,
double & vmax )
override

◆ InArea()

bool Garfield::ComponentConstant::InArea ( const double x,
const double y,
const double z )
inlineprivate

Definition at line 94 of file ComponentConstant.hh.

94 {
95 if (x < m_xmin[0] || x > m_xmax[0] || y < m_xmin[1] || y > m_xmax[1] ||
96 z < m_xmin[2] || z > m_xmax[2]) {
97 return false;
98 }
99 return true;
100 }
std::array< double, 3 > m_xmin
std::array< double, 3 > m_xmax

◆ Reset()

void Garfield::ComponentConstant::Reset ( )
overrideprivate

◆ SetArea()

void Garfield::ComponentConstant::SetArea ( const double xmin,
const double ymin,
const double zmin,
const double xmax,
const double ymax,
const double zmax )

Set the limits of the active area explicitly (instead of using a Geometry object).

◆ SetElectricField()

void Garfield::ComponentConstant::SetElectricField ( const double ex,
const double ey,
const double ez )

Set the components of the electric field [V / cm].

◆ SetMedium()

void Garfield::ComponentConstant::SetMedium ( Medium * medium)
inline

Set the medium in the active area.

Definition at line 40 of file ComponentConstant.hh.

40{ m_medium = medium; }

◆ SetPotential()

void Garfield::ComponentConstant::SetPotential ( const double x,
const double y,
const double z,
const double v = 0. )

Specify the potential at a given point.

◆ SetWeightingField()

void Garfield::ComponentConstant::SetWeightingField ( const double wx,
const double wy,
const double wz,
const std::string label )

Set the components of the weighting field [1 / cm].

◆ SetWeightingPotential()

void Garfield::ComponentConstant::SetWeightingPotential ( const double x,
const double y,
const double z,
const double v = 0. )

Specify the weighting potential at a given point.

◆ UnsetArea()

void Garfield::ComponentConstant::UnsetArea ( )

Remove the explicit limits of the active area.

◆ UpdatePeriodicity()

void Garfield::ComponentConstant::UpdatePeriodicity ( )
overrideprivate

◆ WeightingField()

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

◆ WeightingPotential()

double Garfield::ComponentConstant::WeightingPotential ( const double x,
const double y,
const double z,
const std::string & label )
override

Member Data Documentation

◆ m_efield

std::array<double, 3> Garfield::ComponentConstant::m_efield = {{0., 0., 0.}}
private

Definition at line 61 of file ComponentConstant.hh.

61{{0., 0., 0.}};

◆ m_hasArea

bool Garfield::ComponentConstant::m_hasArea = false
private

Definition at line 87 of file ComponentConstant.hh.

◆ m_hasPotential

bool Garfield::ComponentConstant::m_hasPotential = false
private

Definition at line 64 of file ComponentConstant.hh.

◆ m_hasWeightingField

bool Garfield::ComponentConstant::m_hasWeightingField = false
private

Definition at line 71 of file ComponentConstant.hh.

◆ m_hasWeightingPotential

bool Garfield::ComponentConstant::m_hasWeightingPotential = false
private

Definition at line 77 of file ComponentConstant.hh.

◆ m_label

std::string Garfield::ComponentConstant::m_label = ""
private

Definition at line 73 of file ComponentConstant.hh.

◆ m_medium

Medium* Garfield::ComponentConstant::m_medium = nullptr
private

Definition at line 89 of file ComponentConstant.hh.

◆ m_v0

double Garfield::ComponentConstant::m_v0 = 0.
private

Definition at line 68 of file ComponentConstant.hh.

◆ m_w0

double Garfield::ComponentConstant::m_w0 = 0.
private

Definition at line 81 of file ComponentConstant.hh.

◆ m_wfield

std::array<double, 3> Garfield::ComponentConstant::m_wfield = {{0., 0., 0.}}
private

Definition at line 75 of file ComponentConstant.hh.

75{{0., 0., 0.}};

◆ m_wx0

double Garfield::ComponentConstant::m_wx0 = 0.
private

Definition at line 79 of file ComponentConstant.hh.

◆ m_wy0

double Garfield::ComponentConstant::m_wy0 = 0.
private

Definition at line 79 of file ComponentConstant.hh.

◆ m_wz0

double Garfield::ComponentConstant::m_wz0 = 0.
private

Definition at line 79 of file ComponentConstant.hh.

◆ m_x0

double Garfield::ComponentConstant::m_x0 = 0.
private

Definition at line 66 of file ComponentConstant.hh.

◆ m_xmax

std::array<double, 3> Garfield::ComponentConstant::m_xmax = {{0., 0., 0.}}
private

Definition at line 85 of file ComponentConstant.hh.

85{{0., 0., 0.}};

◆ m_xmin

std::array<double, 3> Garfield::ComponentConstant::m_xmin = {{0., 0., 0.}}
private

Definition at line 84 of file ComponentConstant.hh.

84{{0., 0., 0.}};

◆ m_y0

double Garfield::ComponentConstant::m_y0 = 0.
private

Definition at line 66 of file ComponentConstant.hh.

◆ m_z0

double Garfield::ComponentConstant::m_z0 = 0.
private

Definition at line 66 of file ComponentConstant.hh.


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