Garfield++ 3.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();
29
30 private:
31 GeometrySimple* m_geometry = nullptr;
32
33 std::vector<TGeoVolume*> m_volumes;
34 std::vector<TGeoMedium*> m_media;
35
36 std::unique_ptr<TGeoManager> m_geoManager;
37
38 void Reset();
39};
40}
41#endif
"Native" geometry, using simple shapes.
Base class for visualization classes.
Definition: ViewBase.hh:10
Visualize a geometry defined using the "native" shapes.
Definition: ViewGeometry.hh:18
void Plot()
Draw the geometry.
Definition: ViewGeometry.cc:36
void SetGeometry(GeometrySimple *geo)
Set the geometry to be drawn.
Definition: ViewGeometry.cc:27
~ViewGeometry()
Destructor.
Definition: ViewGeometry.cc:23
ViewGeometry()
Constructor.
Definition: ViewGeometry.cc:19