Garfield++ 4.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 | GetElementaryCell (double &x0, double &y0, double &z0, double &x1, double &y1, double &z1) override |
Get the coordinates of the elementary cell. | |
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.) |
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., const double rot=0.) |
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., const double rot=0.) |
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::Component | |
Component ()=delete | |
Default constructor. | |
Component (const std::string &name) | |
Constructor. | |
virtual | ~Component () |
Destructor. | |
virtual void | SetGeometry (Geometry *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 double | DelayedWeightingPotential (const double x, const double y, const double z, const double t, 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. | |
virtual bool | GetElementaryCell (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) |
Get the coordinates of the elementary cell. | |
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 | IntegrateFluxParallelogram (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) |
double | IntegrateWeightingFluxParallelogram (const std::string &label, 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) |
double | IntegrateFluxLine (const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, const double xp, const double yp, const double zp, const unsigned int nI, const int isign=0) |
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 | EnablePeriodicityY (const bool on=true) |
Enable simple periodicity in the direction. | |
void | EnablePeriodicityZ (const bool on=true) |
Enable simple periodicity in the direction. | |
void | IsPeriodic (bool &perx, bool &pery, bool &perz) |
Return periodicity flags. | |
void | EnableMirrorPeriodicityX (const bool on=true) |
Enable mirror periodicity in the direction. | |
void | EnableMirrorPeriodicityY (const bool on=true) |
Enable mirror periodicity in the direction. | |
void | EnableMirrorPeriodicityZ (const bool on=true) |
Enable mirror periodicity in the direction. | |
void | IsMirrorPeriodic (bool &perx, bool &pery, bool &perz) |
Return mirror periodicity flags. | |
void | EnableAxialPeriodicityX (const bool on=true) |
Enable axial periodicity in the direction. | |
void | EnableAxialPeriodicityY (const bool on=true) |
Enable axial periodicity in the direction. | |
void | EnableAxialPeriodicityZ (const bool on=true) |
Enable axial periodicity in the direction. | |
void | IsAxiallyPeriodic (bool &perx, bool &pery, bool &perz) |
Return axial periodicity flags. | |
void | EnableRotationSymmetryX (const bool on=true) |
Enable rotation symmetry around the axis. | |
void | EnableRotationSymmetryY (const bool on=true) |
Enable rotation symmetry around the axis. | |
void | EnableRotationSymmetryZ (const bool on=true) |
Enable rotation symmetry around the axis. | |
void | IsRotationSymmetric (bool &rotx, bool &roty, bool &rotz) |
Return rotation symmetry flags. | |
void | EnableDebugging () |
Switch on debugging messages. | |
void | DisableDebugging () |
Switch off debugging messages. | |
virtual bool | HasAttachmentMap () const |
Does the component have attachment maps? | |
virtual bool | HasVelocityMap () const |
Does the component have velocity maps? | |
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 bool | ElectronVelocity (const double, const double, const double, double &vx, double &vy, double &vz) |
Get the electron drift velocity. | |
virtual bool | HoleVelocity (const double, const double, const double, double &vx, double &vy, double &vz) |
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::Component | |
std::string | m_className = "Component" |
Class name. | |
Geometry * | m_geometry = nullptr |
Pointer to the geometry. | |
std::array< double, 3 > | m_b0 = {{0., 0., 0.}} |
Constant magnetic field. | |
bool | m_ready = false |
Ready for use? | |
bool | m_debug = false |
Switch on/off debugging messages. | |
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. | |
Semi-analytic calculation of two-dimensional configurations consisting of wires, planes, and tubes.
Definition at line 16 of file ComponentAnalyticField.hh.
Garfield::ComponentAnalyticField::ComponentAnalyticField | ( | ) |
|
inline |
void Garfield::ComponentAnalyticField::AddCharge | ( | const double | x, |
const double | y, | ||
const double | z, | ||
const double | q | ||
) |
Add a point charge.
Definition at line 1605 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 1397 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 1359 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. , |
||
const double | rot = 0. |
||
) |
Add a pixel on an existing plane at constant x.
x | coordinate of the plane. |
ymin | lower limit of the pixel cell in y, |
ymax | upper limit of the pixel cell in y. |
zmin | lower limit of the pixel cell in z. |
zmax | upper limit of the pixel cell in z. |
label | weighting field identifier. |
gap | distance to the opposite plane (optional). |
rot | rotation angle (rad) of the pixel (optional). |
Definition at line 1281 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. , |
||
const double | rot = 0. |
||
) |
Add a pixel on an existing plane at constant y.
Definition at line 1320 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 1043 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 1005 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 941 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 973 of file ComponentAnalyticField.cc.
Referenced by main().
void Garfield::ComponentAnalyticField::AddReadout | ( | const std::string & | label | ) |
Setup the weighting field for a given group of wires or planes.
Definition at line 3535 of file ComponentAnalyticField.cc.
Referenced by main().
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 1222 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 1169 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.
direction | 'y' or 'z'. |
x | coordinate of the plane. |
smin | lower limit of the strip in y or z. |
smax | upper limit of the strip in y or z. |
label | weighting field identifier. |
gap | distance to the opposite plane (optional). |
Definition at line 1079 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 1124 of file ComponentAnalyticField.cc.
Referenced by main().
void Garfield::ComponentAnalyticField::AddTube | ( | const double | radius, |
const double | voltage, | ||
const int | nEdges, | ||
const std::string & | label | ||
) |
Add a tube.
Definition at line 901 of file ComponentAnalyticField.cc.
Referenced by GarfieldPhysics::InitializePhysics().
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 834 of file ComponentAnalyticField.cc.
Referenced by GarfieldPhysics::InitializePhysics().
void Garfield::ComponentAnalyticField::ClearCharges | ( | ) |
Remove all point charges.
Definition at line 1616 of file ComponentAnalyticField.cc.
|
inlineoverridevirtual |
Calculate the drift field [V/cm] and potential [V] at (x, y, z).
Implements Garfield::Component.
Definition at line 41 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::Component.
Definition at line 24 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 1774 of file ComponentAnalyticField.cc.
Referenced by ForcesOnWire(), and WireDisplacement().
|
inline |
Check the quality of the capacitance matrix inversion (default: off).
Definition at line 240 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 1438 of file ComponentAnalyticField.cc.
|
inline |
Switch on/off extrapolation of electrostatic forces beyond the scanning area (default: off).
Definition at line 292 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 1918 of file ComponentAnalyticField.cc.
Referenced by WireDisplacement().
|
overridevirtual |
Get the bounding box coordinates.
Reimplemented from Garfield::Component.
Definition at line 319 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 213 of file ComponentAnalyticField.hh.
Referenced by GetCellType(), and PrintCell().
|
overridevirtual |
Get the coordinates of the elementary cell.
Reimplemented from Garfield::Component.
Definition at line 330 of file ComponentAnalyticField.cc.
Referenced by GetBoundingBox().
void Garfield::ComponentAnalyticField::GetGravity | ( | double & | dx, |
double & | dy, | ||
double & | dz | ||
) | const |
Get the gravity orientation.
Definition at line 1910 of file ComponentAnalyticField.cc.
|
overridevirtual |
Get the medium at a given location (x, y, z).
Reimplemented from Garfield::Component.
Definition at line 253 of file ComponentAnalyticField.cc.
unsigned int Garfield::ComponentAnalyticField::GetNumberOfPlanesPhi | ( | ) | const |
Get the number of equipotential planes at constant phi.
Definition at line 1669 of file ComponentAnalyticField.cc.
unsigned int Garfield::ComponentAnalyticField::GetNumberOfPlanesR | ( | ) | const |
Get the number of equipotential planes at constant radius.
Definition at line 1658 of file ComponentAnalyticField.cc.
unsigned int Garfield::ComponentAnalyticField::GetNumberOfPlanesX | ( | ) | const |
Get the number of equipotential planes at constant x.
Definition at line 1636 of file ComponentAnalyticField.cc.
unsigned int Garfield::ComponentAnalyticField::GetNumberOfPlanesY | ( | ) | const |
Get the number of equipotential planes at constant y.
Definition at line 1647 of file ComponentAnalyticField.cc.
|
inline |
Get the number of wires.
Definition at line 243 of file ComponentAnalyticField.hh.
bool Garfield::ComponentAnalyticField::GetPeriodicityPhi | ( | double & | s | ) |
Get the periodicity [degree] in phi.
Definition at line 1517 of file ComponentAnalyticField.cc.
bool Garfield::ComponentAnalyticField::GetPeriodicityX | ( | double & | s | ) |
Get the periodic length in the x-direction.
Definition at line 1497 of file ComponentAnalyticField.cc.
bool Garfield::ComponentAnalyticField::GetPeriodicityY | ( | double & | s | ) |
Get the periodic length in the y-direction.
Definition at line 1507 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 1750 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 1736 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 1708 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 1722 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 1764 of file ComponentAnalyticField.cc.
|
overridevirtual |
Calculate the voltage range [V].
Implements Garfield::Component.
Definition at line 307 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 1680 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::Component.
Definition at line 751 of file ComponentAnalyticField.cc.
|
inline |
Are polar coordinates being used?
Definition at line 181 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::Component.
Definition at line 650 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 10400 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::PrintCell | ( | ) |
Print all available information on the cell.
Definition at line 352 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::PrintCharges | ( | ) | const |
Print a list of the point charges.
Definition at line 1622 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetCartesianCoordinates | ( | ) |
Use Cartesian coordinates (default).
Definition at line 1584 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetGravity | ( | const double | dx, |
const double | dy, | ||
const double | dz | ||
) |
Set the gravity orientation.
Definition at line 1896 of file ComponentAnalyticField.cc.
|
inline |
Set the medium inside the cell.
Definition at line 89 of file ComponentAnalyticField.hh.
Referenced by GarfieldPhysics::InitializePhysics(), and main().
|
inline |
Set the number of shots used for numerically solving the wire sag differential equation.
Definition at line 326 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 2127 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetPeriodicityPhi | ( | const double | phi | ) |
Set the periodicity [degree] in phi.
Definition at line 1479 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetPeriodicityX | ( | const double | s | ) |
Set the periodic length [cm] in the x-direction.
Definition at line 1445 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetPeriodicityY | ( | const double | s | ) |
Set the periodic length [cm] in the y-direction.
Definition at line 1462 of file ComponentAnalyticField.cc.
void Garfield::ComponentAnalyticField::SetPolarCoordinates | ( | ) |
Use polar coordinates.
Definition at line 1593 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 1870 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 1886 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 286 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 1854 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::Component.
Definition at line 60 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::Component.
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 2136 of file ComponentAnalyticField.cc.