Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
ViewGeometry.hh
Go to the documentation of this file.
1#ifndef G_VIEW_GEOMETRY
2#define G_VIEW_GEOMETRY
3
4#include <memory>
5#include <string>
6#include <vector>
7
8#include <TGeoManager.h>
9
10#include "ViewBase.hh"
11
12namespace Garfield {
13
14class GeometrySimple;
15
16/// Visualize a geometry defined using the "native" shapes.
17
18class ViewGeometry : public ViewBase {
19 public:
20 /// Constructor.
22 /// Destructor.
24
25 /// Set the geometry to be drawn.
26 void SetGeometry(GeometrySimple* geo);
27 /// Draw the geometry.
28 void Plot(const bool twod = false);
29 /// Draw a cut through the geometry at the current viewing plane.
30 void Plot2d();
31 /// Draw a three-dimensional view of the geometry.
32 void Plot3d();
33
34 private:
35 GeometrySimple* m_geometry = nullptr;
36
37 std::vector<TGeoVolume*> m_volumes;
38 std::vector<TGeoMedium*> m_media;
39
40 std::unique_ptr<TGeoManager> m_geoManager;
41
42 void Reset();
43};
44}
45#endif
"Native" geometry, using simple shapes.
Base class for visualization classes.
Definition: ViewBase.hh:18
Visualize a geometry defined using the "native" shapes.
Definition: ViewGeometry.hh:18
void Plot3d()
Draw a three-dimensional view of the geometry.
Definition: ViewGeometry.cc:45
void SetGeometry(GeometrySimple *geo)
Set the geometry to be drawn.
Definition: ViewGeometry.cc:27
~ViewGeometry()
Destructor.
Definition: ViewGeometry.cc:23
void Plot(const bool twod=false)
Draw the geometry.
Definition: ViewGeometry.cc:36
void Plot2d()
Draw a cut through the geometry at the current viewing plane.
ViewGeometry()
Constructor.
Definition: ViewGeometry.cc:21