Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
SolidWire.hh
Go to the documentation of this file.
1#ifndef G_SOLID_WIRE_H
2#define G_SOLID_WIRE_H
3
4#include "Solid.hh"
5
6namespace Garfield {
7
8/// Wire.
9
10class SolidWire : public Solid {
11 public:
12 /// Constructor from centre, radius, and half-length.
13 SolidWire(const double cx, const double cy, const double cz, const double r,
14 const double lz);
15 /// Constructor from centre, radius, half-length and orientation.
16 SolidWire(const double cx, const double cy, const double cz, const double r,
17 const double lz, const double dx, const double dy, const double dz);
18 /// Destructor
20
21 bool IsInside(const double x, const double y, const double z,
22 const bool tesselated) const override;
23 bool GetBoundingBox(double& xmin, double& ymin, double& zmin, double& xmax,
24 double& ymax, double& zmax) const override;
25 bool IsWire() const override { return true; }
26
27 void SetHalfLength(const double lz);
28 void SetRadius(const double r);
29
30 double GetHalfLengthZ() const override { return m_lZ; }
31 double GetRadius() const override { return m_r; }
32
33 bool SolidPanels(std::vector<Panel>& panels) override;
34 void SetDiscretisationLevel(const double dis) override { m_dis = dis; }
35 double GetDiscretisationLevel(const Panel& panel) override;
36
37 void Cut(const double x0, const double y0, const double z0,
38 const double xn, const double yn, const double zn,
39 std::vector<Panel>& panels) override;
40
41 private:
42 /// Radius.
43 double m_r;
44 /// Half-length
45 double m_lZ;
46
47 /// Discretisation level.
48 double m_dis = -1.;
49};
50}
51
52#endif
~SolidWire()
Destructor.
Definition: SolidWire.hh:19
double GetHalfLengthZ() const override
Return the half-length along z.
Definition: SolidWire.hh:30
bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const override
Return the bounding box of the solid.
Definition: SolidWire.cc:34
double GetRadius() const override
Return the radius.
Definition: SolidWire.hh:31
bool SolidPanels(std::vector< Panel > &panels) override
Retrieve the surface panels of the solid.
Definition: SolidWire.cc:72
bool IsInside(const double x, const double y, const double z, const bool tesselated) const override
Definition: SolidWire.cc:22
void SetHalfLength(const double lz)
Definition: SolidWire.cc:64
void SetRadius(const double r)
Definition: SolidWire.cc:56
void Cut(const double x0, const double y0, const double z0, const double xn, const double yn, const double zn, std::vector< Panel > &panels) override
Definition: SolidWire.cc:80
bool IsWire() const override
Return true if the solid is a wire.
Definition: SolidWire.hh:25
double GetDiscretisationLevel(const Panel &panel) override
Retrieve the discretisation level of a panel.
Definition: SolidWire.cc:76
void SetDiscretisationLevel(const double dis) override
Set the discretisation level (for all panels).
Definition: SolidWire.hh:34
Abstract base class for solids.
Definition: Solid.hh:28
Surface panel.
Definition: Solid.hh:11