![]() |
Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
|
Component for parallel-plate geometries. More...
#include <ComponentParallelPlate.hh>
Classes | |
struct | Electrode |
Structure that captures the information of the electrodes under study. More... |
Public Member Functions | |
ComponentParallelPlate () | |
Constructor. | |
~ComponentParallelPlate () | |
Destructor. | |
void | Setup (const unsigned int N, std::vector< double > eps, std::vector< double > d, const double V, std::vector< int > sigmaIndex={}) |
Define the geometry. | |
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 |
double | WeightingPotential (const double x, const double y, const double z, const std::string &label) override |
bool | GetVoltageRange (double &vmin, double &vmax) override |
void | AddPixel (double x, double z, double lx, double lz, const std::string &label, bool fromAnode=true) |
Add a pixel electrode. | |
void | AddStrip (double z, double lz, const std::string &label, bool fromAnode=true) |
Add strip electrode. | |
void | AddPlane (const std::string &label, bool fromAnode=true) |
Add plane electrode, if you want to read the signal from the cathode set the second argument to false. | |
void | SetMedium (Medium *medium) |
Setting the medium. | |
void | SetWeightingPotentialGrid (const double xmin, const double xmax, const double xsteps, const double ymin, const double ymax, const double ysteps, const double zmin, const double zmax, const double zsteps, const std::string &label) |
Calculate time-dependent weighting potential on a grid. | |
void | SetWeightingPotentialGrids (const double xmin, const double xmax, const double xsteps, const double ymin, const double ymax, const double ysteps, const double zmin, const double zmax, const double zsteps) |
This will calculate all electrodes time-dependent weighting potential on the specified grid. | |
void | LoadWeightingPotentialGrid (const std::string &label) |
This will load a previously calculated grid of time-dependent weighting potential values. | |
Medium * | GetMedium (const double x, const double y, const double z) override |
bool | GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) override |
bool | getLayer (const double y, int &m, double &epsM) |
void | getPermittivityFromLayer (int m, double &eps) |
void | getZBoundFromLayer (int m, double &zbottom, double &ztop) |
int | NumberOfLayers () |
void | IndexOfGasGaps (std::vector< int > &indexGasGap) |
void | SetIntegrationPrecision (const double eps) |
void | SetIntegrationUpperbound (const double p) |
void | DisablePotentialCalculationOutsideGasGap () |
Private Types | |
enum | structureelectrode { NotSet = -1 , Plane , Strip , Pixel } |
Possible readout groups. More... |
Private Member Functions | |
double | IntegratePromptPotential (const Electrode &el, const double x, const double y, const double z) |
void | CalculateDynamicalWeightingPotential (const Electrode &el) |
double | FindWeightingPotentialInGrid (Electrode &el, const double x, const double y, const double z) |
bool | Nsigma (int N, std::vector< std::vector< int > > &sigmaMatrix) |
bool | Ntheta (int N, std::vector< std::vector< int > > &thetaMatrix, std::vector< std::vector< int > > &sigmaMatrix) |
void | constructGeometryMatrices (const int N) |
void | constructGeometryFunction (const int N, const std::vector< double > &d) |
void | setHIntegrand () |
void | setwpPixelIntegrand () |
void | setwpStripIntegrand () |
double | constWEFieldLayer (const int indexLayer) |
double | wpPlane (const double z) |
double | constEFieldLayer (const int indexLayer) |
bool | decToBinary (int n, std::vector< int > &binaryNum) |
void | LayerUpdate (const double z, const int im, const double epsM) |
void | UpdatePeriodicity () override |
void | Reset () override |
Private Attributes | |
double | m_precision = 1.e-12 |
double | m_V = 0. |
Voltage difference between the parallel plates. | |
bool | m_getPotentialInPlate = true |
int | m_N = 0 |
Number of layers. | |
double | m_upperBoundIntegration = 30 |
std::vector< double > | m_eps |
relative permittivity of each layer | |
std::vector< double > | m_epsHolder |
std::vector< double > | m_d |
thickness of each layer | |
std::vector< double > | m_z |
std::vector< bool > | m_conductive |
Flag whether a layer is conductive. | |
TF2 | m_hIntegrand |
TF1 | m_wpStripIntegral |
Weighting potential integrand for strips. | |
TF2 | m_wpPixelIntegral |
Weighting potential integrand for pixels. | |
std::vector< std::vector< std::vector< int > > > | m_sigmaMatrix |
std::vector< std::vector< std::vector< int > > > | m_thetaMatrix |
std::vector< std::vector< double > > | m_cMatrix |
c-matrixl. | |
std::vector< std::vector< double > > | m_vMatrix |
v-matrixl. | |
std::vector< std::vector< double > > | m_gMatrix |
g-matrixl. | |
std::vector< std::vector< double > > | m_wMatrix |
w-matrixl. | |
int | m_currentLayer = 0 |
Index of the current layer. | |
double | m_currentPosition = -1 |
Medium * | m_medium = nullptr |
std::vector< std::string > | m_readout |
std::vector< Electrode > | m_readout_p |
Static Private Attributes | |
static constexpr double | m_Vw = 1. |
Component for parallel-plate geometries.
Definition at line 19 of file ComponentParallelPlate.hh.
|
private |
Possible readout groups.
Enumerator | |
---|---|
NotSet | |
Plane | |
Strip | |
Pixel |
Definition at line 214 of file ComponentParallelPlate.hh.
Garfield::ComponentParallelPlate::ComponentParallelPlate | ( | ) |
Constructor.
|
inline |
void Garfield::ComponentParallelPlate::AddPixel | ( | double | x, |
double | z, | ||
double | lx, | ||
double | lz, | ||
const std::string & | label, | ||
bool | fromAnode = true ) |
Add a pixel electrode.
x,z | position of the center of the electrode in the xz-plane. |
lx | width in the along ![]() |
lz | width in the along ![]() |
label | give name using a string. |
fromAnode | is ![]() ![]() |
void Garfield::ComponentParallelPlate::AddPlane | ( | const std::string & | label, |
bool | fromAnode = true ) |
Add plane electrode, if you want to read the signal from the cathode set the second argument to false.
void Garfield::ComponentParallelPlate::AddStrip | ( | double | z, |
double | lz, | ||
const std::string & | label, | ||
bool | fromAnode = true ) |
Add strip electrode.
|
private |
|
inlineprivate |
Definition at line 278 of file ComponentParallelPlate.hh.
|
private |
|
private |
|
inlineprivate |
Definition at line 256 of file ComponentParallelPlate.hh.
|
private |
|
inline |
Definition at line 155 of file ComponentParallelPlate.hh.
|
override |
|
override |
|
private |
|
override |
|
inline |
Definition at line 119 of file ComponentParallelPlate.hh.
|
override |
|
inline |
Definition at line 133 of file ComponentParallelPlate.hh.
|
override |
|
inline |
Definition at line 137 of file ComponentParallelPlate.hh.
|
inline |
Definition at line 144 of file ComponentParallelPlate.hh.
|
private |
|
inlineprivate |
Definition at line 293 of file ComponentParallelPlate.hh.
|
inline |
This will load a previously calculated grid of time-dependent weighting potential values.
Definition at line 97 of file ComponentParallelPlate.hh.
|
private |
|
private |
|
inline |
Definition at line 142 of file ComponentParallelPlate.hh.
|
overrideprivate |
|
private |
|
inline |
Definition at line 151 of file ComponentParallelPlate.hh.
|
inline |
Definition at line 153 of file ComponentParallelPlate.hh.
|
inline |
Setting the medium.
Definition at line 72 of file ComponentParallelPlate.hh.
void Garfield::ComponentParallelPlate::Setup | ( | const unsigned int | N, |
std::vector< double > | eps, | ||
std::vector< double > | d, | ||
const double | V, | ||
std::vector< int > | sigmaIndex = {} ) |
Define the geometry.
N | amount of layers in the geometry, this includes the gas gaps ![]() |
d | thickness of the layers starting from the bottom to the top layer along ![]() |
eps | relative permittivities of the layers starting from the bottom to the top layer along ![]() |
sigmaIndex | Indices of the resistive layers (optional). |
V | applied potential difference between the parallel plates. |
void Garfield::ComponentParallelPlate::SetWeightingPotentialGrid | ( | const double | xmin, |
const double | xmax, | ||
const double | xsteps, | ||
const double | ymin, | ||
const double | ymax, | ||
const double | ysteps, | ||
const double | zmin, | ||
const double | zmax, | ||
const double | zsteps, | ||
const std::string & | label ) |
Calculate time-dependent weighting potential on a grid.
xmin,ymin,zmin | minimum value of the interval in the ![]() ![]() ![]() |
xmax,ymax,zmax | maximum value of the interval in the ![]() ![]() ![]() |
xsteps,ysteps,zsteps | mumber of grid nodes in the ![]() ![]() ![]() |
label | give name using a string. |
void Garfield::ComponentParallelPlate::SetWeightingPotentialGrids | ( | const double | xmin, |
const double | xmax, | ||
const double | xsteps, | ||
const double | ymin, | ||
const double | ymax, | ||
const double | ysteps, | ||
const double | zmin, | ||
const double | zmax, | ||
const double | zsteps ) |
This will calculate all electrodes time-dependent weighting potential on the specified grid.
|
private |
|
private |
|
overrideprivate |
|
override |
|
inlineprivate |
Definition at line 265 of file ComponentParallelPlate.hh.
|
private |
c-matrixl.
Definition at line 191 of file ComponentParallelPlate.hh.
|
private |
Flag whether a layer is conductive.
Definition at line 177 of file ComponentParallelPlate.hh.
|
private |
Index of the current layer.
Definition at line 196 of file ComponentParallelPlate.hh.
|
private |
Definition at line 197 of file ComponentParallelPlate.hh.
|
private |
thickness of each layer
Definition at line 173 of file ComponentParallelPlate.hh.
|
private |
relative permittivity of each layer
Definition at line 171 of file ComponentParallelPlate.hh.
|
private |
Definition at line 172 of file ComponentParallelPlate.hh.
|
private |
Definition at line 165 of file ComponentParallelPlate.hh.
|
private |
g-matrixl.
Definition at line 193 of file ComponentParallelPlate.hh.
|
private |
Definition at line 179 of file ComponentParallelPlate.hh.
|
private |
Definition at line 199 of file ComponentParallelPlate.hh.
|
private |
Number of layers.
Definition at line 167 of file ComponentParallelPlate.hh.
|
private |
Definition at line 160 of file ComponentParallelPlate.hh.
|
private |
Definition at line 217 of file ComponentParallelPlate.hh.
|
private |
Definition at line 218 of file ComponentParallelPlate.hh.
|
private |
Definition at line 184 of file ComponentParallelPlate.hh.
|
private |
Definition at line 187 of file ComponentParallelPlate.hh.
|
private |
Definition at line 169 of file ComponentParallelPlate.hh.
|
private |
Voltage difference between the parallel plates.
Definition at line 163 of file ComponentParallelPlate.hh.
|
private |
v-matrixl.
Definition at line 192 of file ComponentParallelPlate.hh.
|
staticconstexprprivate |
Definition at line 161 of file ComponentParallelPlate.hh.
|
private |
w-matrixl.
Definition at line 194 of file ComponentParallelPlate.hh.
|
private |
Weighting potential integrand for pixels.
Definition at line 182 of file ComponentParallelPlate.hh.
|
private |
Weighting potential integrand for strips.
Definition at line 181 of file ComponentParallelPlate.hh.
|
private |
Definition at line 174 of file ComponentParallelPlate.hh.