Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
SolidTube.hh
Go to the documentation of this file.
1#ifndef G_SOLID_TUBE_H
2#define G_SOLID_TUBE_H
3
4#include "Solid.hh"
5
6namespace Garfield {
7
8/// Cylindrical tube.
9
10class SolidTube : public Solid {
11
12 public:
13 /// Constructor from centre, inner/outer radii, and length.
14 SolidTube(const double cx, const double cy, const double cz,
15 const double rmin, const double rmax, const double lz);
16 /// Constructor from centre, inner/outer radii, length and orientation.
17 SolidTube(const double cx, const double cy, const double cz,
18 const double rmin, const double rmax, const double lz,
19 const double dx, const double dy, const double dz);
20 /// Destructor
22
23 virtual bool IsInside(const double x, const double y, const double z) const;
24 virtual bool GetBoundingBox(double& xmin, double& ymin, double& zmin,
25 double& xmax, double& ymax, double& zmax) const;
26 virtual bool IsTube() const { return true; }
27
28 virtual bool GetCenter(double& x, double& y, double& z) const;
29 virtual bool GetDimensions(double& l1, double& l2, double& l3) const;
30 virtual bool GetOrientation(double& ctheta, double& stheta, double& cphi,
31 double& sphi) const;
32
33 void SetInnerRadius(const double rmin);
34 void SetOuterRadius(const double rmax);
35 void SetHalfLengthZ(const double lz);
36
37 private:
38 // Center of the tube
39 double m_cX, m_cY, m_cZ;
40 // Inner and outer radius
41 double m_rMin, m_rMax;
42 // Length
43 double m_lZ;
44 // Direction
45 double m_dX, m_dY, m_dZ;
46 double m_cPhi, m_sPhi;
47 double m_cTheta, m_sTheta;
48};
49}
50
51#endif
Cylindrical tube.
Definition: SolidTube.hh:10
void SetInnerRadius(const double rmin)
Definition: SolidTube.cc:144
void SetHalfLengthZ(const double lz)
Definition: SolidTube.cc:174
virtual bool GetOrientation(double &ctheta, double &stheta, double &cphi, double &sphi) const
Definition: SolidTube.cc:134
void SetOuterRadius(const double rmax)
Definition: SolidTube.cc:159
virtual bool GetDimensions(double &l1, double &l2, double &l3) const
Definition: SolidTube.cc:126
~SolidTube()
Destructor.
Definition: SolidTube.hh:21
virtual bool GetCenter(double &x, double &y, double &z) const
Definition: SolidTube.cc:118
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const
Return the bounding box of the solid.
Definition: SolidTube.cc:95
virtual bool IsInside(const double x, const double y, const double z) const
Check whether a given point is inside the solid.
Definition: SolidTube.cc:58
virtual bool IsTube() const
Return true if the solid is a tube.
Definition: SolidTube.hh:26
Abstract base class for solids.
Definition: Solid.hh:8