Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation 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:

Public Member Functions

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

◆ ~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

◆ GetMedium()

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

◆ GetNumberOfSolids()

virtual 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; }

Referenced by Garfield::ComponentNeBem3d::GetVolume(), and Garfield::ComponentNeBem3d::Initialise().

◆ GetSolid() [1/2]

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

Get a solid from the list.

Reimplemented in Garfield::GeometrySimple.

Definition at line 29 of file Geometry.hh.

29{ return nullptr; }

Referenced by Garfield::ComponentNeBem3d::GetVolume(), and Garfield::ComponentNeBem3d::Initialise().

◆ GetSolid() [2/2]

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

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

Reimplemented in Garfield::GeometrySimple.

Definition at line 31 of file Geometry.hh.

31 {
32 medium = nullptr;
33 return nullptr;
34 }

◆ 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


The documentation for this class was generated from the following file: