Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
SolidBox.hh
Go to the documentation of this file.
1// Box
2
3#ifndef G_SOLID_BOX_H
4#define G_SOLID_BOX_H
5
6#include "Solid.hh"
7
8namespace Garfield {
9
10class SolidBox : public Solid {
11
12 public:
13 // Constructors
14 SolidBox(const double& cx, const double& cy, const double& cz,
15 const double& lx, const double& ly, const double& lz);
16 SolidBox(const double& cx, const double& cy, const double& cz,
17 const double& lx, const double& ly, 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 IsBox() 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 SetHalfLengthX(const double& lx);
33 void SetHalfLengthY(const double& ly);
34 void SetHalfLengthZ(const double& lz);
35
36 private:
37 // Center of the box
38 double m_cX, m_cY, m_cZ;
39 // Half lengths
40 double m_lX, m_lY, m_lZ;
41 // Direction
42 double m_dX, m_dY, m_dZ;
43 double m_cPhi, m_sPhi;
44 double m_cTheta, m_sTheta;
45};
46}
47
48#endif
void SetHalfLengthY(const double &ly)
Definition: SolidBox.cc:151
void SetHalfLengthX(const double &lx)
Definition: SolidBox.cc:141
virtual bool GetOrientation(double &ctheta, double &stheta, double &cphi, double &sphi) const
Definition: SolidBox.cc:131
virtual bool GetDimensions(double &l1, double &l2, double &l3) const
Definition: SolidBox.cc:123
virtual bool IsInside(const double &x, const double &y, const double &z) const
Definition: SolidBox.cc:62
virtual bool GetCenter(double &x, double &y, double &z) const
Definition: SolidBox.cc:115
void SetHalfLengthZ(const double &lz)
Definition: SolidBox.cc:161
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const
Definition: SolidBox.cc:92
virtual bool IsBox() const
Definition: SolidBox.hh:25