Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
GeometryBase.hh
Go to the documentation of this file.
1// Abstract base class for geometry classes
2
3#ifndef G_GEOMETRY_BASE_H
4#define G_GEOMETRY_BASE_H
5
6#include <string>
7
8#include "Medium.hh"
9
10namespace Garfield {
11
13
14 public:
15 // Constructor
16 GeometryBase() : m_className("GeometryBase") {}
17 // Destructor
18 virtual ~GeometryBase() {}
19
20 virtual Medium* GetMedium(const double x, const double y,
21 const double z) const = 0;
22
23 // Check if a point is inside the geometry
24 virtual bool IsInside(const double x, const double y,
25 const double z) const = 0;
26
27 // Bounding box (envelope of geometry)
28 virtual bool GetBoundingBox(double& xmin, double& ymin, double& zmin,
29 double& xmax, double& ymax, double& zmax) = 0;
30
31 protected:
32 std::string m_className;
33};
34}
35
36#endif
virtual Medium * GetMedium(const double x, const double y, const double z) const =0
virtual bool IsInside(const double x, const double y, const double z) const =0
virtual bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)=0