Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Abstract base class for solids. More...
#include <Solid.hh>
Public Types | |
enum | BoundaryCondition { Voltage = 1 , Charge , Float , Dielectric , DielectricCharge , ParallelField , PerpendicularField } |
Public Member Functions | |
Solid ()=delete | |
Default constructor. | |
Solid (const double cx, const double cy, const double cz, const std::string &name) | |
Constructor. | |
virtual | ~Solid () |
Destructor. | |
virtual bool | IsInside (const double x, const double y, const double z) const =0 |
Check whether a given point is inside the solid. | |
virtual bool | GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const =0 |
Return the bounding box of the solid. | |
virtual bool | IsBox () const |
Return true if the solid is a box. | |
virtual bool | IsTube () const |
Return true if the solid is a tube. | |
virtual bool | IsSphere () const |
Return true if the solid is a sphere. | |
virtual bool | IsHole () const |
Return true if the solid is a hole. | |
virtual bool | IsRidge () const |
Return true if the solid is a ridge. | |
bool | GetCentre (double &x, double &y, double &z) const |
Retrieve the centre point of the solid. | |
bool | GetOrientation (double &ctheta, double &stheta, double &cphi, double &sphi) const |
Retrieve the orientation (azimuthal and polar angles) of the solid. | |
virtual double | GetHalfLengthX () const |
Return the half-length along x. | |
virtual double | GetHalfLengthY () const |
Return the half-length along y. | |
virtual double | GetHalfLengthZ () const |
Return the half-length along z. | |
virtual double | GetInnerRadius () const |
Return the inner radius. | |
virtual double | GetOuterRadius () const |
Return the outer radius. | |
virtual double | GetRadius () const |
Return the radius. | |
virtual double | GetLowerRadius () const |
Return the lower radius (of a hole). | |
virtual double | GetUpperRadius () const |
Return the upper radius (of a hole). | |
virtual double | GetRidgeOffset () const |
Return the x-offset of a ridge. | |
virtual double | GetRidgeHeight () const |
Return the height of a ridge. | |
unsigned int | GetId () const |
Get the ID of the solid. | |
virtual bool | SolidPanels (std::vector< Panel > &panels)=0 |
Retrieve the surface panels of the solid. | |
virtual double | GetDiscretisationLevel (const Panel &panel)=0 |
Retrieve the discretization level of a panel. | |
void | SetBoundaryPotential (const double v) |
Apply Dirichlet boundary conditions (fixed voltage). | |
void | SetBoundaryChargeDensity (const double q) |
Apply fixed-charge boundary conditions. | |
void | SetBoundaryFloat () |
Make the potential at the surface of the solid floating. | |
void | SetBoundaryDielectric () |
Make the surfaces of the solid dielectric-dielectric interfaces. | |
void | SetBoundaryParallelField () |
void | SetBoundaryPerpendicularField () |
BoundaryCondition | GetBoundaryConditionType () const |
Retrieve the type of boundary condition. | |
double | GetBoundaryPotential () const |
Retrieve the potential. | |
double | GetBoundaryChargeDensity () const |
Retrieve the surface charge density. | |
void | EnableDebugging (const bool on=true) |
Switch debugging messages on/off. | |
Protected Member Functions | |
void | ToLocal (const double x, const double y, const double z, double &u, double &v, double &w) const |
void | ToGlobal (const double u, const double v, const double w, double &x, double &y, double &z) const |
void | VectorToLocal (const double x, const double y, const double z, double &u, double &v, double &w) |
Transform a vector from global to local coordinates. | |
void | SetDirection (const double dx, const double dy, const double dz) |
Protected Attributes | |
double | m_cX = 0. |
Centre of the solid. | |
double | m_cY = 0. |
double | m_cZ = 0. |
double | m_dX = 0. |
Direction vector. | |
double | m_dY = 0. |
double | m_dZ = 1. |
double | m_cPhi = 1. |
Azimuthal angle. | |
double | m_sPhi = 0. |
double | m_cTheta = 1. |
Polar angle. | |
double | m_sTheta = 0. |
std::string | m_className = "Solid" |
Class name. | |
bool | m_debug = false |
Debug flag. | |
BoundaryCondition | m_bctype = Voltage |
Type of boundary condition. | |
double | m_volt = 0. |
Potential at the surface. | |
double | m_charge = 0. |
Surface charge density. | |
double | m_eps = 0. |
Dielectric constant. | |
Enumerator | |
---|---|
Voltage | |
Charge | |
Float | |
Dielectric | |
DielectricCharge | |
ParallelField | |
PerpendicularField |
Definition at line 125 of file Solid.hh.
|
delete |
Default constructor.
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
Retrieve the type of boundary condition.
Definition at line 153 of file Solid.hh.
|
inline |
|
pure virtual |
Return the bounding box of the solid.
Implemented in Garfield::SolidBox, Garfield::SolidHole, Garfield::SolidRidge, Garfield::SolidSphere, and Garfield::SolidTube.
Referenced by Garfield::GeometrySimple::AddSolid().
|
inline |
Retrieve the centre point of the solid.
Definition at line 61 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
pure virtual |
Retrieve the discretization level of a panel.
Implemented in Garfield::SolidBox, Garfield::SolidHole, Garfield::SolidRidge, Garfield::SolidSphere, and Garfield::SolidTube.
|
inlinevirtual |
Return the half-length along x.
Reimplemented in Garfield::SolidBox, Garfield::SolidHole, and Garfield::SolidRidge.
Definition at line 78 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inlinevirtual |
Return the half-length along y.
Reimplemented in Garfield::SolidBox, Garfield::SolidHole, and Garfield::SolidRidge.
Definition at line 82 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inlinevirtual |
Return the half-length along z.
Reimplemented in Garfield::SolidBox, Garfield::SolidHole, and Garfield::SolidTube.
Definition at line 86 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inline |
Get the ID of the solid.
Definition at line 117 of file Solid.hh.
Referenced by Garfield::SolidBox::SolidPanels(), Garfield::SolidHole::SolidPanels(), Garfield::SolidRidge::SolidPanels(), Garfield::SolidSphere::SolidPanels(), and Garfield::SolidTube::SolidPanels().
|
inlinevirtual |
Return the inner radius.
Reimplemented in Garfield::SolidTube.
Definition at line 90 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inlinevirtual |
Return the lower radius (of a hole).
Reimplemented in Garfield::SolidHole.
Definition at line 100 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inline |
|
inlinevirtual |
Return the outer radius.
Reimplemented in Garfield::SolidTube.
Definition at line 94 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inlinevirtual |
Return the radius.
Reimplemented in Garfield::SolidSphere, and Garfield::SolidTube.
Definition at line 98 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inlinevirtual |
Return the height of a ridge.
Reimplemented in Garfield::SolidRidge.
Definition at line 112 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inlinevirtual |
Return the x-offset of a ridge.
Reimplemented in Garfield::SolidRidge.
Definition at line 108 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inlinevirtual |
Return the upper radius (of a hole).
Reimplemented in Garfield::SolidHole.
Definition at line 104 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inlinevirtual |
Return true if the solid is a box.
Reimplemented in Garfield::SolidBox.
Definition at line 50 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inlinevirtual |
Return true if the solid is a hole.
Reimplemented in Garfield::SolidHole.
Definition at line 56 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
pure virtual |
Check whether a given point is inside the solid.
Implemented in Garfield::SolidBox, Garfield::SolidHole, Garfield::SolidRidge, Garfield::SolidSphere, and Garfield::SolidTube.
|
inlinevirtual |
Return true if the solid is a ridge.
Reimplemented in Garfield::SolidRidge.
Definition at line 58 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inlinevirtual |
Return true if the solid is a sphere.
Reimplemented in Garfield::SolidSphere.
Definition at line 54 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inlinevirtual |
Return true if the solid is a tube.
Reimplemented in Garfield::SolidTube.
Definition at line 52 of file Solid.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
Definition at line 12 of file Solid.cc.
Referenced by Garfield::SolidBox::SolidBox(), Garfield::SolidHole::SolidHole(), Garfield::SolidRidge::SolidRidge(), and Garfield::SolidTube::SolidTube().
|
pure virtual |
Retrieve the surface panels of the solid.
Implemented in Garfield::SolidBox, Garfield::SolidHole, Garfield::SolidRidge, Garfield::SolidSphere, and Garfield::SolidTube.
Referenced by Garfield::ComponentNeBem3d::Initialise().
|
inlineprotected |
Transform a point from local coordinates (u, v, w) to global coordinates (x, y, z).
Definition at line 202 of file Solid.hh.
Referenced by Garfield::SolidBox::SolidPanels(), Garfield::SolidHole::SolidPanels(), Garfield::SolidRidge::SolidPanels(), and Garfield::SolidTube::SolidPanels().
|
inlineprotected |
Transform a point from global coordinates (x, y, z) to local coordinates (u, v, w).
Definition at line 190 of file Solid.hh.
Referenced by Garfield::SolidHole::GetDiscretisationLevel(), Garfield::SolidBox::IsInside(), Garfield::SolidHole::IsInside(), Garfield::SolidRidge::IsInside(), and Garfield::SolidTube::IsInside().
|
inlineprotected |
Transform a vector from global to local coordinates.
Definition at line 209 of file Solid.hh.
Referenced by Garfield::SolidBox::GetDiscretisationLevel(), Garfield::SolidHole::GetDiscretisationLevel(), Garfield::SolidRidge::GetDiscretisationLevel(), and Garfield::SolidTube::GetDiscretisationLevel().
|
protected |
Type of boundary condition.
Definition at line 180 of file Solid.hh.
Referenced by GetBoundaryConditionType(), SetBoundaryChargeDensity(), SetBoundaryDielectric(), SetBoundaryFloat(), SetBoundaryParallelField(), SetBoundaryPerpendicularField(), and SetBoundaryPotential().
|
protected |
Surface charge density.
Definition at line 184 of file Solid.hh.
Referenced by GetBoundaryChargeDensity(), and SetBoundaryChargeDensity().
|
protected |
Class name.
Definition at line 174 of file Solid.hh.
Referenced by Garfield::SolidBox::GetDiscretisationLevel(), Garfield::SolidHole::GetDiscretisationLevel(), Garfield::SolidRidge::GetDiscretisationLevel(), and SetDirection().
|
protected |
Azimuthal angle.
Definition at line 169 of file Solid.hh.
Referenced by Garfield::SolidBox::GetBoundingBox(), Garfield::SolidHole::GetBoundingBox(), Garfield::SolidRidge::GetBoundingBox(), Garfield::SolidTube::GetBoundingBox(), GetOrientation(), SetDirection(), Garfield::SolidBox::SolidPanels(), Garfield::SolidHole::SolidPanels(), Garfield::SolidRidge::SolidPanels(), Garfield::SolidTube::SolidPanels(), ToGlobal(), ToLocal(), and VectorToLocal().
|
protected |
Polar angle.
Definition at line 171 of file Solid.hh.
Referenced by Garfield::SolidBox::GetBoundingBox(), Garfield::SolidHole::GetBoundingBox(), Garfield::SolidRidge::GetBoundingBox(), Garfield::SolidTube::GetBoundingBox(), GetOrientation(), SetDirection(), Garfield::SolidBox::SolidPanels(), Garfield::SolidHole::SolidPanels(), Garfield::SolidRidge::SolidPanels(), Garfield::SolidTube::SolidPanels(), ToGlobal(), ToLocal(), and VectorToLocal().
|
protected |
Centre of the solid.
Definition at line 164 of file Solid.hh.
Referenced by Garfield::SolidBox::GetBoundingBox(), Garfield::SolidHole::GetBoundingBox(), Garfield::SolidRidge::GetBoundingBox(), Garfield::SolidSphere::GetBoundingBox(), Garfield::SolidTube::GetBoundingBox(), GetCentre(), Garfield::SolidSphere::IsInside(), Garfield::SolidSphere::SolidPanels(), ToGlobal(), and ToLocal().
|
protected |
Definition at line 164 of file Solid.hh.
Referenced by Garfield::SolidBox::GetBoundingBox(), Garfield::SolidHole::GetBoundingBox(), Garfield::SolidRidge::GetBoundingBox(), Garfield::SolidSphere::GetBoundingBox(), Garfield::SolidTube::GetBoundingBox(), GetCentre(), Garfield::SolidSphere::IsInside(), Garfield::SolidSphere::SolidPanels(), ToGlobal(), and ToLocal().
|
protected |
Definition at line 164 of file Solid.hh.
Referenced by Garfield::SolidBox::GetBoundingBox(), Garfield::SolidHole::GetBoundingBox(), Garfield::SolidRidge::GetBoundingBox(), Garfield::SolidSphere::GetBoundingBox(), Garfield::SolidTube::GetBoundingBox(), GetCentre(), Garfield::SolidSphere::IsInside(), Garfield::SolidSphere::SolidPanels(), ToGlobal(), and ToLocal().
|
protected |
Debug flag.
Definition at line 177 of file Solid.hh.
Referenced by EnableDebugging(), Garfield::SolidBox::GetDiscretisationLevel(), Garfield::SolidHole::GetDiscretisationLevel(), Garfield::SolidRidge::GetDiscretisationLevel(), Garfield::SolidBox::IsInside(), Garfield::SolidHole::IsInside(), Garfield::SolidRidge::IsInside(), Garfield::SolidSphere::IsInside(), and Garfield::SolidTube::IsInside().
|
protected |
Direction vector.
Definition at line 167 of file Solid.hh.
Referenced by SetDirection(), Garfield::SolidHole::SolidPanels(), Garfield::SolidRidge::SolidPanels(), and Garfield::SolidTube::SolidPanels().
|
protected |
Definition at line 167 of file Solid.hh.
Referenced by SetDirection(), Garfield::SolidHole::SolidPanels(), Garfield::SolidRidge::SolidPanels(), and Garfield::SolidTube::SolidPanels().
|
protected |
Definition at line 167 of file Solid.hh.
Referenced by SetDirection(), Garfield::SolidHole::SolidPanels(), Garfield::SolidRidge::SolidPanels(), and Garfield::SolidTube::SolidPanels().
|
protected |
|
protected |
Definition at line 169 of file Solid.hh.
Referenced by GetOrientation(), SetDirection(), Garfield::SolidBox::SolidPanels(), Garfield::SolidHole::SolidPanels(), Garfield::SolidRidge::SolidPanels(), Garfield::SolidTube::SolidPanels(), ToGlobal(), ToLocal(), and VectorToLocal().
|
protected |
Definition at line 171 of file Solid.hh.
Referenced by GetOrientation(), SetDirection(), Garfield::SolidBox::SolidPanels(), Garfield::SolidHole::SolidPanels(), Garfield::SolidRidge::SolidPanels(), Garfield::SolidTube::SolidPanels(), ToGlobal(), ToLocal(), and VectorToLocal().
|
protected |
Potential at the surface.
Definition at line 182 of file Solid.hh.
Referenced by GetBoundaryPotential(), and SetBoundaryPotential().