Garfield++ v2r0
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 <string>
5
6#include <TCanvas.h>
7#include <TGeoManager.h>
8
9namespace Garfield {
10
11class GeometrySimple;
12
13/// Visualize a geometry defined using the "native" shapes.
14
16
17 public:
18 /// Constructor
20 /// Destructor
22
23 /// Set the canvas to be painted on.
24 void SetCanvas(TCanvas* c);
25 /// Set the geometry to be drawn.
26 void SetGeometry(GeometrySimple* geo);
27 /// Draw the geometry.
28 void Plot();
29
30 /// Enable/disable debugging messages.
31 void EnableDebugging(const bool on = true) { m_debug = on; }
32
33 private:
34 std::string m_className;
35
36 // Options
37 bool m_debug;
38
39 // Canvas
40 TCanvas* m_canvas;
41 bool m_hasExternalCanvas;
42
43 GeometrySimple* m_geometry;
44
45 std::vector<TGeoVolume*> m_volumes;
46 std::vector<TGeoMedium*> m_media;
47
48 TGeoManager* m_geoManager;
49
50 void Reset();
51
52};
53}
54#endif
"Native" geometry, using simple shapes.
Visualize a geometry defined using the "native" shapes.
Definition: ViewGeometry.hh:15
void Plot()
Draw the geometry.
Definition: ViewGeometry.cc:51
void EnableDebugging(const bool on=true)
Enable/disable debugging messages.
Definition: ViewGeometry.hh:31
void SetCanvas(TCanvas *c)
Set the canvas to be painted on.
Definition: ViewGeometry.cc:40
void SetGeometry(GeometrySimple *geo)
Set the geometry to be drawn.
Definition: ViewGeometry.cc:30
~ViewGeometry()
Destructor.
Definition: ViewGeometry.cc:24
ViewGeometry()
Constructor.
Definition: ViewGeometry.cc:13