Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Cylindrical tube. More...
#include <SolidTube.hh>
Public Member Functions | |
SolidTube (const double cx, const double cy, const double cz, const double rmin, const double rmax, const double lz) | |
Constructor from centre, inner/outer radii, and half-length. | |
SolidTube (const double cx, const double cy, const double cz, const double r, const double lz) | |
Constructor from centre, outer radius, and half-length. | |
SolidTube (const double cx, const double cy, const double cz, const double rmin, const double rmax, const double lz, const double dx, const double dy, const double dz) | |
Constructor from centre, inner/outer radii, half-length and orientation. | |
SolidTube (const double cx, const double cy, const double cz, const double r, const double lz, const double dx, const double dy, const double dz) | |
Constructor from centre, outer radius, half-length and orientation. | |
~SolidTube () | |
Destructor. | |
bool | IsInside (const double x, const double y, const double z) const override |
Check whether a given point is inside the solid. | |
bool | GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const override |
Return the bounding box of the solid. | |
bool | IsTube () const override |
Return true if the solid is a tube. | |
void | SetHalfLength (const double lz) |
void | SetInnerRadius (const double rmin) |
void | SetOuterRadius (const double rmax) |
void | SetRadius (const double r) |
double | GetHalfLengthZ () const override |
Return the half-length along z. | |
double | GetInnerRadius () const override |
Return the inner radius. | |
double | GetOuterRadius () const override |
Return the outer radius. | |
double | GetRadius () const override |
Return the radius. | |
void | SetSectors (const unsigned int n) |
void | SetRotation (const double angle) |
void | SetAverageRadius (const bool average) |
void | SetToplid (const bool toplid) |
Request the cylinder to be closed with a (polygonal) lid at +z. | |
void | SetBottomlid (const bool bottomlid) |
Request the cylinder to be closed with a (polygonal) lid at -z. | |
unsigned int | GetSectors () const |
double | GetRotation () const |
bool | GetAverage () const |
bool | SolidPanels (std::vector< Panel > &panels) override |
Retrieve the surface panels of the solid. | |
double | GetDiscretisationLevel (const Panel &panel) override |
Retrieve the discretization level of a panel. | |
Public Member Functions inherited from Garfield::Solid | |
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. | |
Additional Inherited Members | |
Public Types inherited from Garfield::Solid | |
enum | BoundaryCondition { Voltage = 1 , Charge , Float , Dielectric , DielectricCharge , ParallelField , PerpendicularField } |
Protected Member Functions inherited from Garfield::Solid | |
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 inherited from Garfield::Solid | |
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. | |
Cylindrical tube.
Definition at line 10 of file SolidTube.hh.
Garfield::SolidTube::SolidTube | ( | const double | cx, |
const double | cy, | ||
const double | cz, | ||
const double | rmin, | ||
const double | rmax, | ||
const double | lz | ||
) |
Constructor from centre, inner/outer radii, and half-length.
Definition at line 9 of file SolidTube.cc.
Garfield::SolidTube::SolidTube | ( | const double | cx, |
const double | cy, | ||
const double | cz, | ||
const double | r, | ||
const double | lz | ||
) |
Constructor from centre, outer radius, and half-length.
Definition at line 24 of file SolidTube.cc.
Garfield::SolidTube::SolidTube | ( | const double | cx, |
const double | cy, | ||
const double | cz, | ||
const double | rmin, | ||
const double | rmax, | ||
const double | lz, | ||
const double | dx, | ||
const double | dy, | ||
const double | dz | ||
) |
Constructor from centre, inner/outer radii, half-length and orientation.
Definition at line 17 of file SolidTube.cc.
Garfield::SolidTube::SolidTube | ( | const double | cx, |
const double | cy, | ||
const double | cz, | ||
const double | r, | ||
const double | lz, | ||
const double | dx, | ||
const double | dy, | ||
const double | dz | ||
) |
Constructor from centre, outer radius, half-length and orientation.
Definition at line 28 of file SolidTube.cc.
|
inline |
|
inline |
Definition at line 65 of file SolidTube.hh.
|
overridevirtual |
Return the bounding box of the solid.
Implements Garfield::Solid.
Definition at line 62 of file SolidTube.cc.
|
overridevirtual |
Retrieve the discretization level of a panel.
Implements Garfield::Solid.
Definition at line 260 of file SolidTube.cc.
|
inlineoverridevirtual |
Return the half-length along z.
Reimplemented from Garfield::Solid.
Definition at line 38 of file SolidTube.hh.
|
inlineoverridevirtual |
Return the inner radius.
Reimplemented from Garfield::Solid.
Definition at line 39 of file SolidTube.hh.
|
inlineoverridevirtual |
Return the outer radius.
Reimplemented from Garfield::Solid.
Definition at line 40 of file SolidTube.hh.
|
inlineoverridevirtual |
Return the radius.
Reimplemented from Garfield::Solid.
Definition at line 41 of file SolidTube.hh.
|
inline |
Definition at line 64 of file SolidTube.hh.
|
inline |
Definition at line 63 of file SolidTube.hh.
|
overridevirtual |
Check whether a given point is inside the solid.
Implements Garfield::Solid.
Definition at line 33 of file SolidTube.cc.
|
inlineoverridevirtual |
Return true if the solid is a tube.
Reimplemented from Garfield::Solid.
Definition at line 31 of file SolidTube.hh.
|
inline |
By default, the polygon used for approximating the cylinder when calculating surface panels is inscribed in a circle of the specified radius. If the "average-radius" flag is activated, then the radius will be interpreted as the mean radius of the polygon that approximates the cylinder.
Definition at line 57 of file SolidTube.hh.
|
inline |
Request the cylinder to be closed with a (polygonal) lid at -z.
Definition at line 61 of file SolidTube.hh.
void Garfield::SolidTube::SetHalfLength | ( | const double | lz | ) |
Definition at line 118 of file SolidTube.cc.
void Garfield::SolidTube::SetInnerRadius | ( | const double | rmin | ) |
Definition at line 84 of file SolidTube.cc.
void Garfield::SolidTube::SetOuterRadius | ( | const double | rmax | ) |
Definition at line 97 of file SolidTube.cc.
void Garfield::SolidTube::SetRadius | ( | const double | r | ) |
Definition at line 110 of file SolidTube.cc.
|
inline |
Specify a rotation angle (radian) of the cylinder. Such a rotation is meaningful only if the number of sectors (when approximating the circle with a polygon) has been chosen small.
Definition at line 51 of file SolidTube.hh.
void Garfield::SolidTube::SetSectors | ( | const unsigned int | n | ) |
When calculating the surface panels, the cylinder is approximated as a polygon with a finite number of panels. The number of corners of the polygon equals . Thus, will produce a square, an octagon etc.
Definition at line 126 of file SolidTube.cc.
|
inline |
Request the cylinder to be closed with a (polygonal) lid at +z.
Definition at line 59 of file SolidTube.hh.
|
overridevirtual |
Retrieve the surface panels of the solid.
Implements Garfield::Solid.
Definition at line 134 of file SolidTube.cc.