Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Garfield::Solid Class Referenceabstract

Abstract base class for solids. More...

#include <Solid.hh>

+ Inheritance diagram for Garfield::Solid:

Public Member Functions

 Solid ()
 Constructor.
 
virtual ~Solid ()
 Destructor.
 
virtual bool IsInside (const double x, const double y, const double z) const =0
 Check whether a given point is inside the solid.
 
virtual bool GetBoundingBox (double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const =0
 Return the bounding box of the solid.
 
virtual bool IsBox () const
 Return true if the solid is a box.
 
virtual bool IsTube () const
 Return true if the solid is a tube.
 
virtual bool IsSphere () const
 Return true if the solid is a sphere.
 
virtual bool GetCenter (double &x, double &y, double &z) const =0
 
virtual bool GetDimensions (double &l1, double &l2, double &l3) const =0
 
virtual bool GetOrientation (double &ctheta, double &stheta, double &cphi, double &shpi) const =0
 
void EnableDebugging ()
 Switch on debugging messages.
 
void DisableDebugging ()
 

Protected Attributes

bool m_debug
 

Detailed Description

Abstract base class for solids.

Definition at line 8 of file Solid.hh.

Constructor & Destructor Documentation

◆ Solid()

Garfield::Solid::Solid ( )
inline

Constructor.

Definition at line 12 of file Solid.hh.

12: m_debug(false) {}
bool m_debug
Definition: Solid.hh:39

◆ ~Solid()

virtual Garfield::Solid::~Solid ( )
inlinevirtual

Destructor.

Definition at line 14 of file Solid.hh.

14{}

Member Function Documentation

◆ DisableDebugging()

void Garfield::Solid::DisableDebugging ( )
inline

Definition at line 36 of file Solid.hh.

36{ m_debug = false; }

◆ EnableDebugging()

void Garfield::Solid::EnableDebugging ( )
inline

Switch on debugging messages.

Definition at line 35 of file Solid.hh.

35{ m_debug = true; }

◆ GetBoundingBox()

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

Return the bounding box of the solid.

Implemented in Garfield::SolidBox, Garfield::SolidSphere, and Garfield::SolidTube.

Referenced by Garfield::GeometrySimple::AddSolid().

◆ GetCenter()

virtual bool Garfield::Solid::GetCenter ( double &  x,
double &  y,
double &  z 
) const
pure virtual

◆ GetDimensions()

virtual bool Garfield::Solid::GetDimensions ( double &  l1,
double &  l2,
double &  l3 
) const
pure virtual

◆ GetOrientation()

virtual bool Garfield::Solid::GetOrientation ( double &  ctheta,
double &  stheta,
double &  cphi,
double &  shpi 
) const
pure virtual

◆ IsBox()

virtual bool Garfield::Solid::IsBox ( ) const
inlinevirtual

Return true if the solid is a box.

Reimplemented in Garfield::SolidBox.

Definition at line 23 of file Solid.hh.

23{ return false; }

Referenced by Garfield::ViewGeometry::Plot().

◆ IsInside()

virtual bool Garfield::Solid::IsInside ( const double  x,
const double  y,
const double  z 
) const
pure virtual

Check whether a given point is inside the solid.

Implemented in Garfield::SolidBox, Garfield::SolidSphere, and Garfield::SolidTube.

◆ IsSphere()

virtual bool Garfield::Solid::IsSphere ( ) const
inlinevirtual

Return true if the solid is a sphere.

Reimplemented in Garfield::SolidSphere.

Definition at line 27 of file Solid.hh.

27{ return false; }

Referenced by Garfield::ViewGeometry::Plot().

◆ IsTube()

virtual bool Garfield::Solid::IsTube ( ) const
inlinevirtual

Return true if the solid is a tube.

Reimplemented in Garfield::SolidTube.

Definition at line 25 of file Solid.hh.

25{ return false; }

Referenced by Garfield::ViewGeometry::Plot().

Member Data Documentation

◆ m_debug

bool Garfield::Solid::m_debug
protected

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