Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Solid.hh
Go to the documentation of this file.
1// Abstract base class for solids
2
3#ifndef G_SOLID_H
4#define G_SOLID_H
5
6namespace Garfield {
7
8class Solid {
9
10 public:
11 // Constructor
12 Solid() : m_debug(false) {}
13 // Destructor
14 virtual ~Solid() {}
15
16 virtual bool IsInside(const double& x, const double& y,
17 const double& z) const = 0;
18 virtual bool GetBoundingBox(double& xmin, double& ymin, double& zmin,
19 double& xmax, double& ymax, double& zmax) const = 0;
20 // Solid type
21 virtual bool IsBox() const { return false; }
22 virtual bool IsTube() const { return false; }
23 virtual bool IsSphere() const { return false; }
24
25 virtual bool GetCenter(double& x, double& y, double& z) const = 0;
26 virtual bool GetDimensions(double& l1, double& l2, double& l3) const = 0;
27 virtual bool GetOrientation(double& ctheta, double& stheta, double& cphi,
28 double& shpi) const = 0;
29
30 // Switch on/off debugging messages
31 void EnableDebugging() { m_debug = true; }
32 void DisableDebugging() { m_debug = false; }
33
34 protected:
35 bool m_debug;
36};
37}
38
39#endif
virtual bool IsTube() const
Definition: Solid.hh:22
virtual ~Solid()
Definition: Solid.hh:14
virtual bool IsBox() const
Definition: Solid.hh:21
virtual bool GetOrientation(double &ctheta, double &stheta, double &cphi, double &shpi) const =0
void EnableDebugging()
Definition: Solid.hh:31
void DisableDebugging()
Definition: Solid.hh:32
virtual bool IsInside(const double &x, const double &y, const double &z) const =0
virtual bool GetCenter(double &x, double &y, double &z) const =0
virtual bool GetDimensions(double &l1, double &l2, double &l3) const =0
bool m_debug
Definition: Solid.hh:35
virtual bool IsSphere() const
Definition: Solid.hh:23
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const =0