Garfield 0.3
Toolkit for the detailed simulation of particle detectors based on ionization measurement in gases and semiconductors
Loading...
Searching...
No Matches
Garfield::Geometry Class Referenceabstract

Abstract base class for geometry classes. More...

#include <Geometry.hh>

Inheritance diagram for Garfield::Geometry:
Garfield::GeometryRoot Garfield::GeometrySimple

Public Member Functions

 Geometry ()=delete
 Default constructor.
 Geometry (const std::string &name)
 Constructor.
virtual ~Geometry ()
 Destructor.
virtual Medium * GetMedium (const double x, const double y, const double z, const bool tesselated=false) const =0
 Retrieve the medium at a given point.
virtual std::size_t GetNumberOfSolids () const
 Return the number of solids in the geometry.
virtual SolidGetSolid (const std::size_t) const
 Get a solid from the list.
virtual SolidGetSolid (const std::size_t, 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 bool tesselated=false) 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::string m_className = "Geometry"

Detailed Description

Abstract base class for geometry classes.

Definition at line 13 of file Geometry.hh.

Constructor & Destructor Documentation

◆ Geometry() [1/2]

Garfield::Geometry::Geometry ( )
delete

Default constructor.

◆ Geometry() [2/2]

Garfield::Geometry::Geometry ( const std::string & name)
inline

Constructor.

Definition at line 18 of file Geometry.hh.

18: m_className(name) {}
std::string m_className
Definition Geometry.hh:43

◆ ~Geometry()

virtual Garfield::Geometry::~Geometry ( )
inlinevirtual

Destructor.

Definition at line 20 of file Geometry.hh.

20{}

Member Function Documentation

◆ GetBoundingBox()

virtual bool Garfield::Geometry::GetBoundingBox ( double & xmin,
double & ymin,
double & zmin,
double & xmax,
double & ymax,
double & zmax )
pure virtual

Get the bounding box (envelope of the geometry).

Implemented in Garfield::GeometryRoot, and Garfield::GeometrySimple.

◆ GetMedium()

virtual Medium * Garfield::Geometry::GetMedium ( const double x,
const double y,
const double z,
const bool tesselated = false ) const
pure virtual

Retrieve the medium at a given point.

Implemented in Garfield::GeometryRoot, and Garfield::GeometrySimple.

◆ GetNumberOfSolids()

virtual std::size_t Garfield::Geometry::GetNumberOfSolids ( ) const
inlinevirtual

Return the number of solids in the geometry.

Reimplemented in Garfield::GeometrySimple.

Definition at line 27 of file Geometry.hh.

27{ return 0; }

◆ GetSolid() [1/2]

virtual Solid * Garfield::Geometry::GetSolid ( const std::size_t ) const
inlinevirtual

Get a solid from the list.

Definition at line 29 of file Geometry.hh.

29{ return nullptr; }

◆ GetSolid() [2/2]

virtual Solid * Garfield::Geometry::GetSolid ( const std::size_t ,
Medium *&  ) const
inlinevirtual

Get a solid from the list, together with the associated medium.

Definition at line 31 of file Geometry.hh.

31 {
32 return nullptr;
33 }

◆ IsInside()

virtual bool Garfield::Geometry::IsInside ( const double x,
const double y,
const double z,
const bool tesselated = false ) const
pure virtual

Check if a point is inside the geometry.

Implemented in Garfield::GeometryRoot, and Garfield::GeometrySimple.

Member Data Documentation

◆ m_className

std::string Garfield::Geometry::m_className = "Geometry"
protected

Definition at line 43 of file Geometry.hh.


The documentation for this class was generated from the following file:
  • /builds/garfield/docs/source/Include/Garfield/Geometry.hh