Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation 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 override |
Retrieve the medium at a given point. | |
unsigned int | GetNumberOfMedia () const |
Get the number of media in the geometry. | |
Medium * | GetMedium (const unsigned int i) const |
Get a medium from the list. | |
unsigned int | GetNumberOfSolids () const override |
Return the number of solids in the geometry. | |
Solid * | GetSolid (const unsigned int i) const override |
Get a solid from the list. | |
Solid * | GetSolid (const unsigned int i, Medium *&medium) const override |
Get a solid from the list, together with the associated medium. | |
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 |
Get the solid at a given location (x, y, z). | |
void | Clear () |
Reset the geometry. | |
void | PrintSolids () |
bool | IsInside (const double x, const double y, const double z) const override |
Check if a point is inside the geometry. | |
bool | IsInBoundingBox (const double x, const double y, const double z) const |
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) |
Public Member Functions inherited from Garfield::GeometryBase | |
GeometryBase ()=default | |
Constructor. | |
virtual | ~GeometryBase () |
Destructor. | |
virtual Medium * | GetMedium (const double x, const double y, const double z) const =0 |
Retrieve the medium at a given point. | |
virtual unsigned int | GetNumberOfSolids () const |
Return the number of solids in the geometry. | |
virtual Solid * | GetSolid (const unsigned int) const |
Get a solid from the list. | |
virtual Solid * | GetSolid (const unsigned int, Medium *&medium) const |
Get a solid from the list, together with the associated medium. | |
virtual bool | IsInside (const double x, const double y, const double z) const =0 |
Check if a point is inside the geometry. | |
virtual bool | GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)=0 |
Get the bounding box (envelope of the geometry). | |
Protected Attributes | |
std::vector< Medium * > | m_media |
List of media. | |
std::vector< std::pair< Solid *, int > > | m_solids |
List of solids. | |
bool | m_hasBoundingBox = false |
double | m_xMinBoundingBox |
double | m_yMinBoundingBox |
double | m_zMinBoundingBox |
double | m_xMaxBoundingBox |
double | m_yMaxBoundingBox |
double | m_zMaxBoundingBox |
bool | m_debug = false |
Switch on/off debugging messages. | |
Protected Attributes inherited from Garfield::GeometryBase | |
std::string | m_className = "GeometryBase" |
"Native" geometry, using simple shapes.
Definition at line 12 of file GeometrySimple.hh.
Garfield::GeometrySimple::GeometrySimple | ( | ) |
|
inlinevirtual |
Add a solid to the geometry, together with the medium inside.
Definition at line 11 of file GeometrySimple.cc.
Referenced by GarfieldPhysics::CreateGeometry().
void Garfield::GeometrySimple::Clear | ( | ) |
Reset the geometry.
Definition at line 109 of file GeometrySimple.cc.
|
inline |
Definition at line 54 of file GeometrySimple.hh.
|
inlineoverridevirtual |
Get the bounding box (envelope of the geometry).
Implements Garfield::GeometryBase.
Definition at line 42 of file GeometrySimple.hh.
Referenced by Garfield::ViewGeometry::Plot().
|
overridevirtual |
Retrieve the medium at a given point.
Implements Garfield::GeometryBase.
Definition at line 68 of file GeometrySimple.cc.
Referenced by Garfield::ViewGeometry::Plot().
Medium * Garfield::GeometrySimple::GetMedium | ( | const unsigned int | i | ) | const |
Get a medium from the list.
Definition at line 100 of file GeometrySimple.cc.
|
inline |
|
inlineoverridevirtual |
Return the number of solids in the geometry.
Reimplemented from Garfield::GeometryBase.
Definition at line 26 of file GeometrySimple.hh.
Referenced by Garfield::ViewGeometry::Plot().
Solid * Garfield::GeometrySimple::GetSolid | ( | const double | x, |
const double | y, | ||
const double | z | ||
) | const |
Get the solid at a given location (x, y, z).
Definition at line 60 of file GeometrySimple.cc.
|
overridevirtual |
Get a solid from the list.
Reimplemented from Garfield::GeometryBase.
Definition at line 79 of file GeometrySimple.cc.
Referenced by Garfield::ViewGeometry::Plot().
|
overridevirtual |
Get a solid from the list, together with the associated medium.
Reimplemented from Garfield::GeometryBase.
Definition at line 89 of file GeometrySimple.cc.
bool Garfield::GeometrySimple::IsInBoundingBox | ( | const double | x, |
const double | y, | ||
const double | z | ||
) | const |
Definition at line 149 of file GeometrySimple.cc.
Referenced by IsInside().
|
overridevirtual |
Check if a point is inside the geometry.
Implements Garfield::GeometryBase.
Definition at line 139 of file GeometrySimple.cc.
void Garfield::GeometrySimple::PrintSolids | ( | ) |
Definition at line 114 of file GeometrySimple.cc.
|
protected |
Switch on/off debugging messages.
Definition at line 69 of file GeometrySimple.hh.
Referenced by EnableDebugging(), and IsInBoundingBox().
|
protected |
Definition at line 64 of file GeometrySimple.hh.
Referenced by AddSolid(), and IsInBoundingBox().
|
protected |
List of media.
Definition at line 58 of file GeometrySimple.hh.
Referenced by AddSolid(), Clear(), GetMedium(), GetNumberOfMedia(), GetSolid(), and PrintSolids().
|
protected |
List of solids.
Definition at line 61 of file GeometrySimple.hh.
Referenced by AddSolid(), Clear(), GetMedium(), GetNumberOfSolids(), GetSolid(), IsInside(), and PrintSolids().
|
protected |
Definition at line 66 of file GeometrySimple.hh.
Referenced by AddSolid(), GetBoundingBox(), and IsInBoundingBox().
|
protected |
Definition at line 65 of file GeometrySimple.hh.
Referenced by AddSolid(), GetBoundingBox(), and IsInBoundingBox().
|
protected |
Definition at line 66 of file GeometrySimple.hh.
Referenced by AddSolid(), GetBoundingBox(), and IsInBoundingBox().
|
protected |
Definition at line 65 of file GeometrySimple.hh.
Referenced by AddSolid(), GetBoundingBox(), and IsInBoundingBox().
|
protected |
Definition at line 66 of file GeometrySimple.hh.
Referenced by AddSolid(), GetBoundingBox(), and IsInBoundingBox().
|
protected |
Definition at line 65 of file GeometrySimple.hh.
Referenced by AddSolid(), GetBoundingBox(), and IsInBoundingBox().