1#ifndef G_GEOMETRY_ROOT_H
2#define G_GEOMETRY_ROOT_H
6#include <TGeoManager.h>
7#include <TGeoMaterial.h>
25 Medium*
GetMedium(
const double x,
const double y,
const double z)
const override;
38 bool IsInside(
const double x,
const double y,
const double z)
const override {
46 bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
double& xmax,
47 double& ymax,
double& zmax)
override;
Abstract base class for geometry classes.
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.
std::vector< material > m_materials
GeometryRoot()
Constructor.
void SetMedium(const unsigned int imat, Medium *med)
Associate a ROOT material with Garfield medium.
void PrintGeoNotDefined(const std::string &fcn) const
void EnableDebugging(const bool on=true)
Switch debugging and warning messages on/off.
bool IsInside(const double x, const double y, const double z) const override
Check if a point is inside the geometry.
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.
TGeoMaterial * GetMaterial(const unsigned int i)
Get pointer to ROOT material with 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.
Abstract base class for media.