Garfield++ v1r0
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// Cylindrical tube
2
3#ifndef G_SOLID_TUBE_H
4#define G_SOLID_TUBE_H
5
6#include "Solid.hh"
7
8namespace Garfield {
9
10class SolidTube : public Solid {
11
12 public:
13 // Constructors
14 SolidTube(const double& cx, const double& cy, const double& cz,
15 const double& rmin, const double& rmax, const double& lz);
16 SolidTube(const double& cx, const double& cy, const double& cz,
17 const double& rmin, const double& rmax, const double& lz,
18 const double& dx, const double& dy, const double& dz);
19 // Destructor
21
22 virtual bool IsInside(const double& x, const double& y, const double& z) const;
23 virtual bool GetBoundingBox(double& xmin, double& ymin, double& zmin,
24 double& xmax, double& ymax, double& zmax) const;
25 virtual bool IsTube() const { return true; }
26
27 virtual bool GetCenter(double& x, double& y, double& z) const;
28 virtual bool GetDimensions(double& l1, double& l2, double& l3) const;
29 virtual bool GetOrientation(double& ctheta, double& stheta, double& cphi,
30 double& sphi) const;
31
32 void SetInnerRadius(const double& rmin);
33 void SetOuterRadius(const double& rmax);
34 void SetHalfLengthZ(const double& lz);
35
36 private:
37 // Center of the tube
38 double m_cX, m_cY, m_cZ;
39 // Inner and outer radius
40 double m_rMin, m_rMax;
41 // Length
42 double m_lZ;
43 // Direction
44 double m_dX, m_dY, m_dZ;
45 double m_cPhi, m_sPhi;
46 double m_cTheta, m_sTheta;
47};
48}
49
50#endif
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
virtual bool GetDimensions(double &l1, double &l2, double &l3) const
Definition: SolidTube.cc:126
virtual bool IsInside(const double &x, const double &y, const double &z) const
Definition: SolidTube.cc:58
void SetOuterRadius(const double &rmax)
Definition: SolidTube.cc:159
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
Definition: SolidTube.cc:95
virtual bool IsTube() const
Definition: SolidTube.hh:25