Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Garfield::ViewCell Class Reference

#include <ViewCell.hh>

Public Member Functions

 ViewCell ()
 
 ~ViewCell ()
 
void SetCanvas (TCanvas *c)
 
void SetComponent (ComponentAnalyticField *comp)
 
void SetArea (const double &xmin, const double &ymin, const double &zmin, const double &xmax, const double &ymax, const double &zmax)
 
void SetArea ()
 
void Plot2d ()
 
void Plot3d ()
 
void EnableDebugging ()
 
void DisableDebugging ()
 
void EnableWireMarkers ()
 
void DisableWireMarkers ()
 

Detailed Description

Definition at line 13 of file ViewCell.hh.

Constructor & Destructor Documentation

◆ ViewCell()

Garfield::ViewCell::ViewCell ( )

Definition at line 16 of file ViewCell.cc.

17 : m_className("ViewCell"),
18 m_debug(false),
19 m_useWireMarker(true),
20 m_label("Cell Layout"),
21 m_canvas(NULL),
22 m_hasExternalCanvas(false),
23 m_hasUserArea(false),
24 m_xMin(-1.),
25 m_yMin(-1.),
26 m_zMin(-1.),
27 m_xMax(1.),
28 m_yMax(1.),
29 m_zMax(1.),
30 m_component(NULL),
31 m_geoManager(NULL) {
32
34}
PlottingEngineRoot plottingEngine

◆ ~ViewCell()

Garfield::ViewCell::~ViewCell ( )

Definition at line 36 of file ViewCell.cc.

36 {
37
38 if (!m_hasExternalCanvas && m_canvas != NULL) delete m_canvas;
39 Reset();
40
41}

Member Function Documentation

◆ DisableDebugging()

void Garfield::ViewCell::DisableDebugging ( )
inline

Definition at line 34 of file ViewCell.hh.

34{ m_debug = false; }

◆ DisableWireMarkers()

void Garfield::ViewCell::DisableWireMarkers ( )
inline

Definition at line 37 of file ViewCell.hh.

37{ m_useWireMarker = false; }

◆ EnableDebugging()

void Garfield::ViewCell::EnableDebugging ( )
inline

Definition at line 33 of file ViewCell.hh.

33{ m_debug = true; }

◆ EnableWireMarkers()

void Garfield::ViewCell::EnableWireMarkers ( )
inline

Definition at line 36 of file ViewCell.hh.

36{ m_useWireMarker = true; }

◆ Plot2d()

void Garfield::ViewCell::Plot2d ( )

Definition at line 87 of file ViewCell.cc.

87 {
88
89 if (!Plot(false)) {
90 std::cerr << m_className << "::Plot2d:\n";
91 std::cerr << " Error creating 2d plot.\n";
92 }
93}

◆ Plot3d()

void Garfield::ViewCell::Plot3d ( )

Definition at line 95 of file ViewCell.cc.

95 {
96
97 if (!Plot(true)) {
98 std::cerr << m_className << "::Plot3d:\n";
99 std::cerr << " Error creating 3d plot.\n";
100 }
101}

◆ SetArea() [1/2]

void Garfield::ViewCell::SetArea ( )

Definition at line 85 of file ViewCell.cc.

85{ m_hasUserArea = false; }

◆ SetArea() [2/2]

void Garfield::ViewCell::SetArea ( const double &  xmin,
const double &  ymin,
const double &  zmin,
const double &  xmax,
const double &  ymax,
const double &  zmax 
)

Definition at line 65 of file ViewCell.cc.

68 {
69
70 // Check range, assign if non-null
71 if (xmin == xmax || ymin == ymax || zmin == zmax) {
72 std::cout << m_className << "::SetArea:\n";
73 std::cout << " Null area range not permitted.\n";
74 return;
75 }
76 m_xMin = std::min(xmin, xmax);
77 m_yMin = std::min(ymin, ymax);
78 m_zMin = std::min(zmin, zmax);
79 m_xMax = std::max(xmin, xmax);
80 m_yMax = std::max(ymin, ymax);
81 m_zMax = std::max(zmin, zmax);
82 m_hasUserArea = true;
83}

◆ SetCanvas()

void Garfield::ViewCell::SetCanvas ( TCanvas *  c)

Definition at line 54 of file ViewCell.cc.

54 {
55
56 if (c == NULL) return;
57 if (!m_hasExternalCanvas && m_canvas != NULL) {
58 delete m_canvas;
59 m_canvas = NULL;
60 }
61 m_canvas = c;
62 m_hasExternalCanvas = true;
63}

◆ SetComponent()

void Garfield::ViewCell::SetComponent ( ComponentAnalyticField comp)

Definition at line 43 of file ViewCell.cc.

43 {
44
45 if (comp == NULL) {
46 std::cerr << m_className << "::SetComponent:\n";
47 std::cerr << " Component pointer is null.\n";
48 return;
49 }
50
51 m_component = comp;
52}

The documentation for this class was generated from the following files: