Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
#include <ComponentAnalyticField.hh>
Public Types | |
enum | Cell { A00 , B1X , B1Y , B2X , B2Y , C10 , C2X , C2Y , C30 , D10 , D20 , D30 , D40 , Unknown } |
Public Member Functions | |
ComponentAnalyticField () | |
Constructor. | |
~ComponentAnalyticField () | |
Destructor. | |
Medium * | GetMedium (const double x, const double y, const double z) override |
Get the medium at a given location (x, y, z). | |
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 |
Calculate the drift field [V/cm] and potential [V] at (x, y, z). | |
bool | GetVoltageRange (double &pmin, double &pmax) override |
Calculate the voltage range [V]. | |
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 &x0, double &y0, double &z0, double &x1, double &y1, double &z1) override |
Get the bounding box coordinates. | |
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) override |
bool | IsInTrapRadius (const double q0, const double x0, const double y0, const double z0, double &xw, double &yx, double &rw) override |
void | SetMedium (Medium *medium) |
Set the medium inside the cell. | |
void | AddWire (const double x, const double y, const double diameter, const double voltage, const std::string &label, const double length=100., const double tension=50., const double rho=19.3, const int ntrap=5) |
Add a wire at (x, y) . | |
void | AddTube (const double radius, const double voltage, const int nEdges, const std::string &label) |
Add a tube. | |
void | AddPlaneX (const double x, const double voltage, const std::string &label) |
Add a plane at constant x. | |
void | AddPlaneY (const double y, const double voltage, const std::string &label) |
Add a plane at constant y. | |
void | AddPlaneR (const double r, const double voltage, const std::string &label) |
Add a plane at constant radius. | |
void | AddPlanePhi (const double phi, const double voltage, const std::string &label) |
Add a plane at constant phi. | |
void | AddStripOnPlaneX (const char direction, const double x, const double smin, const double smax, const std::string &label, const double gap=-1.) |
Add a strip in the y or z direction on an existing plane at constant x. | |
void | AddStripOnPlaneY (const char direction, const double y, const double smin, const double smax, const std::string &label, const double gap=-1.) |
Add a strip in the x or z direction on an existing plane at constant y. | |
void | AddStripOnPlaneR (const char direction, const double r, const double smin, const double smax, const std::string &label, const double gap=-1.) |
Add a strip in the phi or z direction on an existing plane at constant radius. | |
void | AddStripOnPlanePhi (const char direction, const double phi, const double smin, const double smax, const std::string &label, const double gap=-1.) |
Add a strip in the r or z direction on an existing plane at constant phi. | |
void | AddPixelOnPlaneX (const double x, const double ymin, const double ymax, const double zmin, const double zmax, const std::string &label, const double gap=-1.) |
Add a pixel on an existing plane at constant x. | |
void | AddPixelOnPlaneY (const double y, const double xmin, const double xmax, const double zmin, const double zmax, const std::string &label, const double gap=-1.) |
Add a pixel on an existing plane at constant y. | |
void | AddPixelOnPlaneR (const double r, const double phimin, const double phimax, const double zmin, const double zmax, const std::string &label, const double gap=-1.) |
Add a pixel on an existing plane at constant radius. | |
void | AddPixelOnPlanePhi (const double phi, const double rmin, const double rmax, const double zmin, const double zmax, const std::string &label, const double gap=-1.) |
Add a pixel on an existing plane at constant phi. | |
void | SetPeriodicityX (const double s) |
Set the periodic length [cm] in the x-direction. | |
void | SetPeriodicityY (const double s) |
Set the periodic length [cm] in the y-direction. | |
void | SetPeriodicityPhi (const double phi) |
Set the periodicity [degree] in phi. | |
bool | GetPeriodicityX (double &s) |
Get the periodic length in the x-direction. | |
bool | GetPeriodicityY (double &s) |
Get the periodic length in the y-direction. | |
bool | GetPeriodicityPhi (double &s) |
Get the periodicity [degree] in phi. | |
void | SetCartesianCoordinates () |
Use Cartesian coordinates (default). | |
void | SetPolarCoordinates () |
Use polar coordinates. | |
bool | IsPolar () const |
Are polar coordinates being used? | |
void | PrintCell () |
Print all available information on the cell. | |
void | AddCharge (const double x, const double y, const double z, const double q) |
Add a point charge. | |
void | ClearCharges () |
Remove all point charges. | |
void | PrintCharges () const |
Print a list of the point charges. | |
std::string | GetCellType () |
void | AddReadout (const std::string &label) |
Setup the weighting field for a given group of wires or planes. | |
bool | MultipoleMoments (const unsigned int iw, const unsigned int order=4, const bool print=false, const bool plot=false, const double rmult=1., const double eps=1.e-4, const unsigned int nMaxIter=20) |
void | EnableDipoleTerms (const bool on=true) |
Request dipole terms be included for each of the wires (default: off). | |
void | EnableChargeCheck (const bool on=true) |
Check the quality of the capacitance matrix inversion (default: off). | |
unsigned int | GetNumberOfWires () const |
Get the number of wires. | |
bool | GetWire (const unsigned int i, double &x, double &y, double &diameter, double &voltage, std::string &label, double &length, double &charge, int &ntrap) const |
Retrieve the parameters of a wire. | |
unsigned int | GetNumberOfPlanesX () const |
Get the number of equipotential planes at constant x. | |
unsigned int | GetNumberOfPlanesY () const |
Get the number of equipotential planes at constant y. | |
unsigned int | GetNumberOfPlanesR () const |
Get the number of equipotential planes at constant radius. | |
unsigned int | GetNumberOfPlanesPhi () const |
Get the number of equipotential planes at constant phi. | |
bool | GetPlaneX (const unsigned int i, double &x, double &voltage, std::string &label) const |
Retrieve the parameters of a plane at constant x. | |
bool | GetPlaneY (const unsigned int i, double &y, double &voltage, std::string &label) const |
Retrieve the parameters of a plane at constant y. | |
bool | GetPlaneR (const unsigned int i, double &r, double &voltage, std::string &label) const |
Retrieve the parameters of a plane at constant radius. | |
bool | GetPlanePhi (const unsigned int i, double &phi, double &voltage, std::string &label) const |
Retrieve the parameters of a plane at constant phi. | |
bool | GetTube (double &r, double &voltage, int &nEdges, std::string &label) const |
Retrieve the tube parameters. | |
bool | ElectricFieldAtWire (const unsigned int iw, double &ex, double &ey) |
void | SetScanningGrid (const unsigned int nX, const unsigned int nY) |
void | SetScanningArea (const double xmin, const double xmax, const double ymin, const double ymax) |
void | SetScanningAreaLargest () |
void | SetScanningAreaFirstOrder (const double scale=2.) |
void | EnableExtrapolation (const bool on=true) |
void | SetGravity (const double dx, const double dy, const double dz) |
Set the gravity orientation. | |
void | GetGravity (double &dx, double &dy, double &dz) const |
Get the gravity orientation. | |
bool | ForcesOnWire (const unsigned int iw, std::vector< double > &xMap, std::vector< double > &yMap, std::vector< std::vector< double > > &fxMap, std::vector< std::vector< double > > &fyMap) |
bool | WireDisplacement (const unsigned int iw, const bool detailed, std::vector< double > &csag, std::vector< double > &xsag, std::vector< double > &ysag, double &stretch, const bool print=true) |
void | SetNumberOfShots (const unsigned int n) |
void | SetNumberOfSteps (const unsigned int n) |
Set the number of integration steps within each shot (must be >= 1). | |
Public Member Functions inherited from Garfield::ComponentBase | |
ComponentBase () | |
Constructor. | |
virtual | ~ComponentBase () |
Destructor. | |
virtual void | SetGeometry (GeometryBase *geo) |
Define the geometry. | |
virtual void | Clear () |
Reset. | |
virtual Medium * | GetMedium (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 direction. | |
void | DisablePeriodicityX () |
void | EnablePeriodicityY (const bool on=true) |
Enable simple periodicity in the direction. | |
void | DisablePeriodicityY () |
void | EnablePeriodicityZ (const bool on=true) |
Enable simple periodicity in the direction. | |
void | DisablePeriodicityZ () |
void | EnableMirrorPeriodicityX (const bool on=true) |
Enable mirror periodicity in the direction. | |
void | DisableMirrorPeriodicityX () |
void | EnableMirrorPeriodicityY (const bool on=true) |
Enable mirror periodicity in the direction. | |
void | DisableMirrorPeriodicityY () |
void | EnableMirrorPeriodicityZ (const bool on=true) |
Enable mirror periodicity in the direction. | |
void | DisableMirrorPeriodicityZ () |
void | EnableAxialPeriodicityX (const bool on=true) |
Enable axial periodicity in the direction. | |
void | DisableAxialPeriodicityX () |
void | EnableAxialPeriodicityY (const bool on=true) |
Enable axial periodicity in the direction. | |
void | DisableAxialPeriodicityY () |
void | EnableAxialPeriodicityZ (const bool on=true) |
Enable axial periodicity in the direction. | |
void | DisableAxialPeriodicityZ () |
void | EnableRotationSymmetryX (const bool on=true) |
Enable rotation symmetry around the axis. | |
void | DisableRotationSymmetryX () |
void | EnableRotationSymmetryY (const bool on=true) |
Enable rotation symmetry around the axis. | |
void | DisableRotationSymmetryY () |
void | EnableRotationSymmetryZ (const bool on=true) |
Enable rotation symmetry around the 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) |
Additional Inherited Members | |
virtual void | Reset ()=0 |
Reset the component. | |
virtual void | UpdatePeriodicity ()=0 |
Verify periodicities. | |
Protected Attributes inherited from Garfield::ComponentBase | |
std::string | m_className = "ComponentBase" |
Class name. | |
GeometryBase * | m_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. | |
Semi-analytic calculation of two-dimensional configurations consisting of wires, planes, and tubes.
Definition at line 15 of file ComponentAnalyticField.hh.
Garfield::ComponentAnalyticField::ComponentAnalyticField | ( | ) |
Constructor.
Definition at line 240 of file ComponentAnalyticField.cc.
|
inline |
void Garfield::ComponentAnalyticField::AddCharge | ( | const double | x, |
const double | y, | ||
const double | z, | ||
const double | q | ||
) |
Add a point charge.
Definition at line 1581 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddPixelOnPlanePhi | ( | const double | phi, |
const double | rmin, | ||
const double | rmax, | ||
const double | zmin, | ||
const double | zmax, | ||
const std::string & | label, | ||
const double | gap = -1. |
||
) |
Add a pixel on an existing plane at constant phi.
Definition at line 1373 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddPixelOnPlaneR | ( | const double | r, |
const double | phimin, | ||
const double | phimax, | ||
const double | zmin, | ||
const double | zmax, | ||
const std::string & | label, | ||
const double | gap = -1. |
||
) |
Add a pixel on an existing plane at constant radius.
Definition at line 1335 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddPixelOnPlaneX | ( | const double | x, |
const double | ymin, | ||
const double | ymax, | ||
const double | zmin, | ||
const double | zmax, | ||
const std::string & | label, | ||
const double | gap = -1. |
||
) |
Add a pixel on an existing plane at constant x.
Definition at line 1267 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddPixelOnPlaneY | ( | const double | y, |
const double | xmin, | ||
const double | xmax, | ||
const double | zmin, | ||
const double | zmax, | ||
const std::string & | label, | ||
const double | gap = -1. |
||
) |
Add a pixel on an existing plane at constant y.
Definition at line 1301 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddPlanePhi | ( | const double | phi, |
const double | voltage, | ||
const std::string & | label | ||
) |
Add a plane at constant phi.
Definition at line 1029 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddPlaneR | ( | const double | r, |
const double | voltage, | ||
const std::string & | label | ||
) |
Add a plane at constant radius.
Definition at line 991 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddPlaneX | ( | const double | x, |
const double | voltage, | ||
const std::string & | label | ||
) |
Add a plane at constant x.
Definition at line 927 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddPlaneY | ( | const double | y, |
const double | voltage, | ||
const std::string & | label | ||
) |
Add a plane at constant y.
Definition at line 959 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddReadout | ( | const std::string & | label | ) |
Setup the weighting field for a given group of wires or planes.
Definition at line 3512 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddStripOnPlanePhi | ( | const char | direction, |
const double | phi, | ||
const double | smin, | ||
const double | smax, | ||
const std::string & | label, | ||
const double | gap = -1. |
||
) |
Add a strip in the r or z direction on an existing plane at constant phi.
Definition at line 1208 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddStripOnPlaneR | ( | const char | direction, |
const double | r, | ||
const double | smin, | ||
const double | smax, | ||
const std::string & | label, | ||
const double | gap = -1. |
||
) |
Add a strip in the phi or z direction on an existing plane at constant radius.
Definition at line 1155 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddStripOnPlaneX | ( | const char | direction, |
const double | x, | ||
const double | smin, | ||
const double | smax, | ||
const std::string & | label, | ||
const double | gap = -1. |
||
) |
Add a strip in the y or z direction on an existing plane at constant x.
Definition at line 1065 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddStripOnPlaneY | ( | const char | direction, |
const double | y, | ||
const double | smin, | ||
const double | smax, | ||
const std::string & | label, | ||
const double | gap = -1. |
||
) |
Add a strip in the x or z direction on an existing plane at constant y.
Definition at line 1110 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::AddTube | ( | const double | radius, |
const double | voltage, | ||
const int | nEdges, | ||
const std::string & | label | ||
) |
Add a tube.
Definition at line 887 of file ComponentAnalyticField.cc.
Referenced by GarfieldPhysics::CreateGeometry().
void Garfield::ComponentAnalyticField::AddWire | ( | const double | x, |
const double | y, | ||
const double | diameter, | ||
const double | voltage, | ||
const std::string & | label, | ||
const double | length = 100. , |
||
const double | tension = 50. , |
||
const double | rho = 19.3 , |
||
const int | ntrap = 5 |
||
) |
Add a wire at (x, y) .
Definition at line 820 of file ComponentAnalyticField.cc.
Referenced by GarfieldPhysics::CreateGeometry().
void Garfield::ComponentAnalyticField::ClearCharges | ( | ) |
Remove all point charges.
Definition at line 1592 of file ComponentAnalyticField.cc.
|
inlineoverridevirtual |
Calculate the drift field [V/cm] and potential [V] at (x, y, z).
Implements Garfield::ComponentBase.
Definition at line 40 of file ComponentAnalyticField.hh.
|
inlineoverridevirtual |
Calculate the drift field at given point.
x,y,z | coordinates [cm]. |
ex,ey,ez | components of the electric field [V/cm]. |
m | pointer to the medium at this location. |
status | status 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)
Implements Garfield::ComponentBase.
Definition at line 23 of file ComponentAnalyticField.hh.
bool Garfield::ComponentAnalyticField::ElectricFieldAtWire | ( | const unsigned int | iw, |
double & | ex, | ||
double & | ey | ||
) |
Calculate the electric field at a given wire position, as if the wire itself were not there, but with the presence of its mirror images.
Definition at line 1750 of file ComponentAnalyticField.cc.
Referenced by ForcesOnWire(), and WireDisplacement().
|
inline |
Check the quality of the capacitance matrix inversion (default: off).
Definition at line 223 of file ComponentAnalyticField.hh.
void Garfield::ComponentAnalyticField::EnableDipoleTerms | ( | const bool | on = true | ) |
Request dipole terms be included for each of the wires (default: off).
Definition at line 1414 of file ComponentAnalyticField.cc.
|
inline |
Switch on/off extrapolation of electrostatic forces beyond the scanning area (default: off).
Definition at line 275 of file ComponentAnalyticField.hh.
bool Garfield::ComponentAnalyticField::ForcesOnWire | ( | const unsigned int | iw, |
std::vector< double > & | xMap, | ||
std::vector< double > & | yMap, | ||
std::vector< std::vector< double > > & | fxMap, | ||
std::vector< std::vector< double > > & | fyMap | ||
) |
Calculate a table of the forces acting on a wire.
iw | index of the wire |
xMap | coordinates of the grid lines in x |
yMap | coordinates of the grid lines in y |
fxMap | x-components of the force at the grid points |
fyMap | y-components of the force at the grid points |
Definition at line 1895 of file ComponentAnalyticField.cc.
Referenced by WireDisplacement().
|
overridevirtual |
Get the bounding box coordinates.
Reimplemented from Garfield::ComponentBase.
Definition at line 311 of file ComponentAnalyticField.cc.
|
inline |
Return the cell type. Cells are classified according to the number and orientation of planes, the presence of periodicities and the location of the wires as one of the following types:
A non-periodic cells with at most 1 x- and 1 y-plane B1X x-periodic cells without x-planes and at most 1 y-plane B1Y y-periodic cells without y-planes and at most 1 x-plane B2X cells with 2 x-planes and at most 1 y-plane B2Y cells with 2 y-planes and at most 1 x-plane C1 doubly periodic cells without planes C2X doubly periodic cells with x-planes C2Y doubly periodic cells with y-planes C3 double periodic cells with x- and y-planes D1 round tubes without axial periodicity D2 round tubes with axial periodicity D3 polygonal tubes without axial periodicity
Definition at line 196 of file ComponentAnalyticField.hh.
Referenced by GetCellType(), and PrintCell().
void Garfield::ComponentAnalyticField::GetGravity | ( | double & | dx, |
double & | dy, | ||
double & | dz | ||
) | const |
Get the gravity orientation.
Definition at line 1887 of file ComponentAnalyticField.cc.
|
overridevirtual |
Get the medium at a given location (x, y, z).
Reimplemented from Garfield::ComponentBase.
Definition at line 245 of file ComponentAnalyticField.cc.
unsigned int Garfield::ComponentAnalyticField::GetNumberOfPlanesPhi | ( | ) | const |
Get the number of equipotential planes at constant phi.
Definition at line 1645 of file ComponentAnalyticField.cc.
unsigned int Garfield::ComponentAnalyticField::GetNumberOfPlanesR | ( | ) | const |
Get the number of equipotential planes at constant radius.
Definition at line 1634 of file ComponentAnalyticField.cc.
unsigned int Garfield::ComponentAnalyticField::GetNumberOfPlanesX | ( | ) | const |
Get the number of equipotential planes at constant x.
Definition at line 1612 of file ComponentAnalyticField.cc.
unsigned int Garfield::ComponentAnalyticField::GetNumberOfPlanesY | ( | ) | const |
Get the number of equipotential planes at constant y.
Definition at line 1623 of file ComponentAnalyticField.cc.
|
inline |
Get the number of wires.
Definition at line 226 of file ComponentAnalyticField.hh.
bool Garfield::ComponentAnalyticField::GetPeriodicityPhi | ( | double & | s | ) |
Get the periodicity [degree] in phi.
Definition at line 1493 of file ComponentAnalyticField.cc.
bool Garfield::ComponentAnalyticField::GetPeriodicityX | ( | double & | s | ) |
Get the periodic length in the x-direction.
Definition at line 1473 of file ComponentAnalyticField.cc.
bool Garfield::ComponentAnalyticField::GetPeriodicityY | ( | double & | s | ) |
Get the periodic length in the y-direction.
Definition at line 1483 of file ComponentAnalyticField.cc.
bool Garfield::ComponentAnalyticField::GetPlanePhi | ( | const unsigned int | i, |
double & | phi, | ||
double & | voltage, | ||
std::string & | label | ||
) | const |
Retrieve the parameters of a plane at constant phi.
Definition at line 1726 of file ComponentAnalyticField.cc.
bool Garfield::ComponentAnalyticField::GetPlaneR | ( | const unsigned int | i, |
double & | r, | ||
double & | voltage, | ||
std::string & | label | ||
) | const |
Retrieve the parameters of a plane at constant radius.
Definition at line 1712 of file ComponentAnalyticField.cc.
bool Garfield::ComponentAnalyticField::GetPlaneX | ( | const unsigned int | i, |
double & | x, | ||
double & | voltage, | ||
std::string & | label | ||
) | const |
Retrieve the parameters of a plane at constant x.
Definition at line 1684 of file ComponentAnalyticField.cc.
bool Garfield::ComponentAnalyticField::GetPlaneY | ( | const unsigned int | i, |
double & | y, | ||
double & | voltage, | ||
std::string & | label | ||
) | const |
Retrieve the parameters of a plane at constant y.
Definition at line 1698 of file ComponentAnalyticField.cc.
bool Garfield::ComponentAnalyticField::GetTube | ( | double & | r, |
double & | voltage, | ||
int & | nEdges, | ||
std::string & | label | ||
) | const |
Retrieve the tube parameters.
Definition at line 1740 of file ComponentAnalyticField.cc.
|
overridevirtual |
Calculate the voltage range [V].
Implements Garfield::ComponentBase.
Definition at line 299 of file ComponentAnalyticField.cc.
bool Garfield::ComponentAnalyticField::GetWire | ( | const unsigned int | i, |
double & | x, | ||
double & | y, | ||
double & | diameter, | ||
double & | voltage, | ||
std::string & | label, | ||
double & | length, | ||
double & | charge, | ||
int & | ntrap | ||
) | const |
Retrieve the parameters of a wire.
Definition at line 1656 of file ComponentAnalyticField.cc.
|
overridevirtual |
Determine whether a particle is inside the trap radius of a wire.
q0 | charge of the particle [in elementary charges]. |
x0,y0,z0 | position [cm] of the particle. |
xw,yw | coordinates of the wire (if applicable). |
rw | radius of the wire (if applicable). |
Reimplemented from Garfield::ComponentBase.
Definition at line 737 of file ComponentAnalyticField.cc.
|
inline |
Are polar coordinates being used?
Definition at line 164 of file ComponentAnalyticField.hh.
|
overridevirtual |
Determine whether the line between two points crosses a wire.
x0,y0,z0 | first point [cm]. |
x1,y1,z1 | second point [cm] |
xc,yc,zc | point [cm] where the line crosses the wire or the coordinates of the wire centre. |
centre | flag whether to return the coordinates of the line-wire crossing point or of the wire centre. |
rc | radius [cm] of the wire. |
Reimplemented from Garfield::ComponentBase.
Definition at line 636 of file ComponentAnalyticField.cc.
bool Garfield::ComponentAnalyticField::MultipoleMoments | ( | const unsigned int | iw, |
const unsigned int | order = 4 , |
||
const bool | print = false , |
||
const bool | plot = false , |
||
const double | rmult = 1. , |
||
const double | eps = 1.e-4 , |
||
const unsigned int | nMaxIter = 20 |
||
) |
Calculate multipole moments for a given wire.
iw | Index of the wire. |
order | Order of the highest multipole moment. |
Print information about the fitting process. | |
plot | Plot the potential and multipole fit around the wire. |
rmult | Distance in multiples of the wire radius at which the decomposition is to be carried out. |
eps | Used in the fit for calculating the covariance matrix. |
nMaxIter | Maximum number of iterations in the fit. |
Definition at line 9783 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::PrintCell | ( | ) |
Print all available information on the cell.
Definition at line 338 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::PrintCharges | ( | ) | const |
Print a list of the point charges.
Definition at line 1598 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetCartesianCoordinates | ( | ) |
Use Cartesian coordinates (default).
Definition at line 1560 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetGravity | ( | const double | dx, |
const double | dy, | ||
const double | dz | ||
) |
Set the gravity orientation.
Definition at line 1873 of file ComponentAnalyticField.cc.
|
inline |
Set the medium inside the cell.
Definition at line 90 of file ComponentAnalyticField.hh.
|
inline |
Set the number of shots used for numerically solving the wire sag differential equation.
Definition at line 309 of file ComponentAnalyticField.hh.
void Garfield::ComponentAnalyticField::SetNumberOfSteps | ( | const unsigned int | n | ) |
Set the number of integration steps within each shot (must be >= 1).
Definition at line 2104 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetPeriodicityPhi | ( | const double | phi | ) |
Set the periodicity [degree] in phi.
Definition at line 1455 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetPeriodicityX | ( | const double | s | ) |
Set the periodic length [cm] in the x-direction.
Definition at line 1421 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetPeriodicityY | ( | const double | s | ) |
Set the periodic length [cm] in the y-direction.
Definition at line 1438 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetPolarCoordinates | ( | ) |
Use polar coordinates.
Definition at line 1569 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetScanningArea | ( | const double | xmin, |
const double | xmax, | ||
const double | ymin, | ||
const double | ymax | ||
) |
Specify explicitly the boundaries of the the scanning area (i. e. the area in which the electrostatic force acting on a wire is computed).
Definition at line 1847 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetScanningAreaFirstOrder | ( | const double | scale = 2. | ) |
Set the scanning area based on the zeroth-order estimates of the wire shift, enlarged by a scaling factor. This is the default behaviour.
Definition at line 1863 of file ComponentAnalyticField.cc.
|
inline |
Set the scanning area to the largest area around each wire which is free from other cell elements.
Definition at line 269 of file ComponentAnalyticField.hh.
void Garfield::ComponentAnalyticField::SetScanningGrid | ( | const unsigned int | nX, |
const unsigned int | nY | ||
) |
Set the number of grid lines at which the electrostatic force as function of the wire displacement is computed.
Definition at line 1831 of file ComponentAnalyticField.cc.
|
inlineoverridevirtual |
Calculate the weighting field at a given point and for a given electrode.
x,y,z | coordinates [cm]. |
wx,wy,wz | components of the weighting field [1/cm]. |
label | name of the electrode |
Reimplemented from Garfield::ComponentBase.
Definition at line 59 of file ComponentAnalyticField.hh.
|
inlineoverridevirtual |
Calculate the weighting potential at a given point.
x,y,z | coordinates [cm]. |
label | name of the electrode. |
Reimplemented from Garfield::ComponentBase.
Definition at line 67 of file ComponentAnalyticField.hh.
bool Garfield::ComponentAnalyticField::WireDisplacement | ( | const unsigned int | iw, |
const bool | detailed, | ||
std::vector< double > & | csag, | ||
std::vector< double > & | xsag, | ||
std::vector< double > & | ysag, | ||
double & | stretch, | ||
const bool | print = true |
||
) |
Compute the sag profile of a wire.
iw | index of the wire |
detailed | flag to request a detailed calculation of the profile or only a fast one. |
csag | coordinate along the wire. |
xsag | x components of the sag profile. |
ysag | y components of the sag profile. |
stretch | relative elongation. |
flag to print the calculation results or not. |
Definition at line 2113 of file ComponentAnalyticField.cc.