Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
SolidSphere.hh
Go to the documentation of this file.
1#ifndef G_SOLID_SPHERE_H
2#define G_SOLID_SPHERE_H
3
4#include "Solid.hh"
5
6namespace Garfield {
7
8/// Sphere.
9
10class SolidSphere : public Solid {
11
12 public:
13 /// Constructor
14 SolidSphere(const double cx, const double cy, const double cz,
15 const double rmin, const double rmax);
16 /// Destructor
18
19 virtual bool IsInside(const double x, const double y, const double z) const;
20 virtual bool GetBoundingBox(double& xmin, double& ymin, double& zmin,
21 double& xmax, double& ymax, double& zmax) const;
22 virtual bool IsSphere() const { return true; }
23
24 virtual bool GetCenter(double& x, double& y, double& z) const;
25 virtual bool GetDimensions(double& l1, double& l2, double& l3) const;
26 virtual bool GetOrientation(double& ctheta, double& stheta, double& cphi,
27 double& sphi) const;
28
29 void SetInnerRadius(const double rmin);
30 void SetOuterRadius(const double rmax);
31
32 private:
33 // Center of the sphere
34 double m_cX, m_cY, m_cZ;
35 // Inner and outer radius
36 double m_rMin, m_rMax;
37};
38}
39
40#endif
virtual bool GetCenter(double &x, double &y, double &z) const
Definition: SolidSphere.cc:63
virtual bool IsSphere() const
Return true if the solid is a sphere.
Definition: SolidSphere.hh:22
void SetOuterRadius(const double rmax)
Definition: SolidSphere.cc:104
virtual bool IsInside(const double x, const double y, const double z) const
Check whether a given point is inside the solid.
Definition: SolidSphere.cc:16
~SolidSphere()
Destructor.
Definition: SolidSphere.hh:17
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const
Return the bounding box of the solid.
Definition: SolidSphere.cc:51
virtual bool GetOrientation(double &ctheta, double &stheta, double &cphi, double &sphi) const
Definition: SolidSphere.cc:79
virtual bool GetDimensions(double &l1, double &l2, double &l3) const
Definition: SolidSphere.cc:71
void SetInnerRadius(const double rmin)
Definition: SolidSphere.cc:89
Abstract base class for solids.
Definition: Solid.hh:8