Garfield++ v1r0
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// Sphere
2
3#ifndef G_SOLID_SPHERE_H
4#define G_SOLID_SPHERE_H
5
6#include "Solid.hh"
7
8namespace Garfield {
9
10class SolidSphere : public Solid {
11
12 public:
13 // Constructors
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:62
virtual bool IsInside(const double &x, const double &y, const double &z) const
Definition: SolidSphere.cc:16
void SetInnerRadius(const double &rmin)
Definition: SolidSphere.cc:88
virtual bool IsSphere() const
Definition: SolidSphere.hh:22
void SetOuterRadius(const double &rmax)
Definition: SolidSphere.cc:103
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const
Definition: SolidSphere.cc:50
virtual bool GetOrientation(double &ctheta, double &stheta, double &cphi, double &sphi) const
Definition: SolidSphere.cc:78
virtual bool GetDimensions(double &l1, double &l2, double &l3) const
Definition: SolidSphere.cc:70