Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
ViewCell.hh
Go to the documentation of this file.
1#ifndef G_VIEW_CELL
2#define G_VIEW_CELL
3
4#include <string>
5
6#include <TCanvas.h>
7#include <TGeoManager.h>
8
9namespace Garfield {
10
11class ComponentAnalyticField;
12
13class ViewCell {
14
15 public:
16 // Constructor
17 ViewCell();
18 // Destructor
19 ~ViewCell();
20
21 void SetCanvas(TCanvas* c);
22
24
25 // Set area to be plotted
26 void SetArea(const double& xmin, const double& ymin, const double& zmin,
27 const double& xmax, const double& ymax, const double& zmax);
28 void SetArea();
29
30 void Plot2d();
31 void Plot3d();
32
33 void EnableDebugging() { m_debug = true; }
34 void DisableDebugging() { m_debug = false; }
35
36 void EnableWireMarkers() { m_useWireMarker = true; }
37 void DisableWireMarkers() { m_useWireMarker = false; }
38
39 private:
40 std::string m_className;
41
42 // Options
43 bool m_debug;
44 bool m_useWireMarker;
45
46 std::string m_label;
47
48 // Canvas
49 TCanvas* m_canvas;
50 bool m_hasExternalCanvas;
51
52 // Box dimensions
53 bool m_hasUserArea;
54 double m_xMin, m_yMin, m_zMin;
55 double m_xMax, m_yMax, m_zMax;
56
57 ComponentAnalyticField* m_component;
58
59 // 3d objects
60 std::vector<TGeoVolume*> m_volumes;
61 std::vector<TGeoMedium*> m_media;
62
63 TGeoManager* m_geoManager;
64
65 bool Plot(const bool use3d);
66 void PlotWire(const double& x, const double& y, const double& d,
67 const int& type);
68 void PlotLine(const double& x0, const double& y0,
69 const double& x1, const double& y1);
70 void PlotTube(const double& x0, const double& y0, const double& r,
71 const int& n);
72
73 void Reset();
74
75};
76}
77#endif
void DisableDebugging()
Definition: ViewCell.hh:34
void EnableWireMarkers()
Definition: ViewCell.hh:36
void SetCanvas(TCanvas *c)
Definition: ViewCell.cc:54
void EnableDebugging()
Definition: ViewCell.hh:33
void SetComponent(ComponentAnalyticField *comp)
Definition: ViewCell.cc:43
void DisableWireMarkers()
Definition: ViewCell.hh:37