![]() |
Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
|
"Native" geometry, using simple shapes. More...
#include <GeometrySimple.hh>
Public Member Functions | |
| GeometrySimple () | |
| Constructor. | |
| virtual | ~GeometrySimple () |
| Destructor. | |
| Medium * | GetMedium (const double x, const double y, const double z, const bool tesselated=false) const override |
| Retrieve the medium at a given point. | |
| size_t | GetNumberOfSolids () const override |
| Return the number of solids in the geometry. | |
| Solid * | GetSolid (const size_t i) const override |
| Solid * | GetSolid (const size_t i, Medium *&medium) const override |
| void | AddSolid (Solid *s, Medium *m) |
| Add a solid to the geometry, together with the medium inside. | |
| Solid * | GetSolid (const double x, const double y, const double z, const bool tesselated=false) const |
| Get the solid at a given location (x, y, z). | |
| void | SetMedium (Medium *medium) |
| Set a background medium. | |
| void | Clear () |
| Reset the geometry. | |
| void | PrintSolids () |
| Print a summary of the solids present in the geometry. | |
| bool | IsInside (const double x, const double y, const double z, const bool tesselated=false) const override |
| Check if a point is inside the geometry. | |
| bool | IsInBoundingBox (const double x, const double y, const double z) const |
| Determine whether a point is inside the envelope of the geometry. | |
| bool | GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) override |
| Get the bounding box (envelope of the geometry). | |
| void | EnableDebugging (const bool on=true) |
| Switch on/off debugging and warning messages. | |
| Public Member Functions inherited from Garfield::Geometry | |
| Geometry ()=delete | |
| Default constructor. | |
| Geometry (const std::string &name) | |
| Constructor. | |
| virtual | ~Geometry () |
| Destructor. | |
| virtual Solid * | GetSolid (const std::size_t) const |
| Get a solid from the list. | |
| virtual Solid * | GetSolid (const std::size_t, Medium *&) const |
| Get a solid from the list, together with the associated medium. | |
Protected Attributes | |
| std::vector< std::pair< Solid *, Medium * > > | m_solids |
| List of solids and associated media. | |
| Medium * | m_medium = nullptr |
| Background medium. | |
| bool | m_hasBoundingBox = false |
| std::array< double, 3 > | m_bbMin = {{0., 0., 0.}} |
| std::array< double, 3 > | m_bbMax = {{0., 0., 0.}} |
| bool | m_debug = false |
| Switch on/off debugging messages. | |
| Protected Attributes inherited from Garfield::Geometry | |
| std::string | m_className = "Geometry" |
"Native" geometry, using simple shapes.
Definition at line 13 of file GeometrySimple.hh.
| Garfield::GeometrySimple::GeometrySimple | ( | ) |
Constructor.
|
inlinevirtual |
Add a solid to the geometry, together with the medium inside.
| void Garfield::GeometrySimple::Clear | ( | ) |
Reset the geometry.
|
inline |
Switch on/off debugging and warning messages.
Definition at line 57 of file GeometrySimple.hh.
|
inlineoverridevirtual |
Get the bounding box (envelope of the geometry).
Implements Garfield::Geometry.
Definition at line 45 of file GeometrySimple.hh.
|
overridevirtual |
Retrieve the medium at a given point.
Implements Garfield::Geometry.
|
inlineoverridevirtual |
Return the number of solids in the geometry.
Reimplemented from Garfield::Geometry.
Definition at line 23 of file GeometrySimple.hh.
| Solid * Garfield::GeometrySimple::GetSolid | ( | const double | x, |
| const double | y, | ||
| const double | z, | ||
| const bool | tesselated = false ) const |
Get the solid at a given location (x, y, z).
|
override |
| bool Garfield::GeometrySimple::IsInBoundingBox | ( | const double | x, |
| const double | y, | ||
| const double | z ) const |
Determine whether a point is inside the envelope of the geometry.
|
overridevirtual |
Check if a point is inside the geometry.
Implements Garfield::Geometry.
| void Garfield::GeometrySimple::PrintSolids | ( | ) |
Print a summary of the solids present in the geometry.
|
inline |
Set a background medium.
Definition at line 34 of file GeometrySimple.hh.
|
protected |
Definition at line 68 of file GeometrySimple.hh.
|
protected |
Definition at line 67 of file GeometrySimple.hh.
|
protected |
Switch on/off debugging messages.
Definition at line 71 of file GeometrySimple.hh.
|
protected |
Definition at line 66 of file GeometrySimple.hh.
|
protected |
Background medium.
Definition at line 63 of file GeometrySimple.hh.
List of solids and associated media.
Definition at line 61 of file GeometrySimple.hh.