1#ifndef G_GEOMETRY_ROOT_H
2#define G_GEOMETRY_ROOT_H
6#include <TGeoManager.h>
7#include <TGeoMaterial.h>
26 const bool tesselated =
false)
const override;
39 bool IsInside(
const double x,
const double y,
const double z,
40 const bool tesselated =
false)
const override;
41 bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
double& xmax,
42 double& ymax,
double& zmax)
override;
Use a geometry defined using the ROOT TGeo package.
TGeoManager * m_geoManager
unsigned int GetNumberOfMaterials()
Get the number of materials defined in the ROOT geometry.
GeometryRoot()
Constructor.
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.
void SetMedium(const unsigned int imat, Medium *med)
Associate a ROOT material with a Garfield medium.
void PrintGeoNotDefined(const std::string &fcn) const
void EnableDebugging(const bool on=true)
Switch debugging and warning messages on/off.
std::map< std::string, Medium * > m_materials
void SetGeometry(TGeoManager *geoman)
Set the geometry (pointer to ROOT TGeoManager).
TGeoMaterial * GetMaterial(const unsigned int i)
Get a pointer to the ROOT material with a given index.
bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) override
Get the bounding box (envelope of the geometry).
~GeometryRoot()
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.
Abstract base class for geometry classes.
Abstract base class for media.