Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
|
Use a geometry defined using the ROOT TGeo package. More...
#include <GeometryRoot.hh>
Classes | |
struct | material |
Public Member Functions | |
GeometryRoot () | |
Constructor. | |
~GeometryRoot () | |
Destructor. | |
void | SetGeometry (TGeoManager *geoman) |
Set the geometry (pointer to ROOT TGeoManager). | |
Medium * | GetMedium (const double x, const double y, const double z) const override |
Retrieve the medium at a given point. | |
unsigned int | GetNumberOfMaterials () |
Get the number of materials defined in the ROOT geometry. | |
TGeoMaterial * | GetMaterial (const unsigned int i) |
Get pointer to ROOT material with given index. | |
TGeoMaterial * | GetMaterial (const char *name) |
Get pointer to ROOT material with given name. | |
void | SetMedium (const unsigned int imat, Medium *med) |
Associate a ROOT material with Garfield medium. | |
void | SetMedium (const char *mat, Medium *med) |
Associate a ROOT material with Garfield medium. | |
bool | IsInside (const double x, const double y, const double z) const override |
Check if a point is inside 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 debugging and warning messages on/off. | |
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 Member Functions | |
void | PrintGeoNotDefined (const std::string &fcn) const |
Protected Attributes | |
TGeoManager * | m_geoManager = nullptr |
std::vector< material > | m_materials |
bool | m_debug = false |
Protected Attributes inherited from Garfield::GeometryBase | |
std::string | m_className = "GeometryBase" |
Use a geometry defined using the ROOT TGeo package.
Definition at line 15 of file GeometryRoot.hh.
Garfield::GeometryRoot::GeometryRoot | ( | ) |
|
inline |
|
inline |
Switch debugging and warning messages on/off.
Definition at line 50 of file GeometryRoot.hh.
|
overridevirtual |
Get the bounding box (envelope of the geometry).
Implements Garfield::GeometryBase.
Definition at line 141 of file GeometryRoot.cc.
TGeoMaterial * Garfield::GeometryRoot::GetMaterial | ( | const char * | name | ) |
Get pointer to ROOT material with given name.
Definition at line 59 of file GeometryRoot.cc.
TGeoMaterial * Garfield::GeometryRoot::GetMaterial | ( | const unsigned int | i | ) |
Get pointer to ROOT material with given index.
Definition at line 50 of file GeometryRoot.cc.
|
overridevirtual |
Retrieve the medium at a given point.
Implements Garfield::GeometryBase.
Definition at line 24 of file GeometryRoot.cc.
unsigned int Garfield::GeometryRoot::GetNumberOfMaterials | ( | ) |
Get the number of materials defined in the ROOT geometry.
Definition at line 41 of file GeometryRoot.cc.
|
inlineoverridevirtual |
Check if a point is inside the geometry.
Implements Garfield::GeometryBase.
Definition at line 38 of file GeometryRoot.hh.
|
protected |
Definition at line 164 of file GeometryRoot.cc.
Referenced by GetMaterial(), GetNumberOfMaterials(), and SetMedium().
void Garfield::GeometryRoot::SetGeometry | ( | TGeoManager * | geoman | ) |
Set the geometry (pointer to ROOT TGeoManager).
Definition at line 14 of file GeometryRoot.cc.
void Garfield::GeometryRoot::SetMedium | ( | const char * | mat, |
Medium * | med | ||
) |
Associate a ROOT material with Garfield medium.
Definition at line 120 of file GeometryRoot.cc.
void Garfield::GeometryRoot::SetMedium | ( | const unsigned int | imat, |
Medium * | med | ||
) |
Associate a ROOT material with Garfield medium.
Definition at line 68 of file GeometryRoot.cc.
Referenced by SetMedium().
|
protected |
Definition at line 64 of file GeometryRoot.hh.
Referenced by EnableDebugging().
|
protected |
Definition at line 54 of file GeometryRoot.hh.
Referenced by GetBoundingBox(), GetMaterial(), GetMedium(), GetNumberOfMaterials(), IsInside(), SetGeometry(), and SetMedium().
|
protected |
Definition at line 61 of file GeometryRoot.hh.
Referenced by GetMedium(), SetGeometry(), and SetMedium().