Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
ViewMedium.hh
Go to the documentation of this file.
1#ifndef G_VIEW_MEDIUM
2#define G_VIEW_MEDIUM
3
4#include <string>
5#include <vector>
6
7#include <TCanvas.h>
8#include <TF1.h>
9#include <TGraph.h>
10
11namespace Garfield {
12
13class Medium;
14
16
17 public:
18 // Constructor
19 ViewMedium();
20 // Destructor
22
23 void SetCanvas(TCanvas* c);
24
25 void SetMedium(Medium* m);
26
27 void SetElectricFieldRange(const double emin, const double emax);
28 void SetMagneticFieldRange(const double bmin, const double bmax);
29 void SetBAngleRange(const double amin, const double amax);
30 void SetFunctionRange(const double vmin, const double vmax);
31 void SetFunctionRange();
32
33 void PlotElectronVelocity(const char xaxis, const double e, const double b,
34 const double a);
35 void PlotHoleVelocity(const char xaxis, const double e, const double b,
36 const double a);
37 void PlotIonVelocity(const char xaxis, const double e, const double b,
38 const double a);
39 void PlotElectronDiffusion(const char xaxis, const double e, const double b,
40 const double a);
41 void PlotHoleDiffusion(const char xaxis, const double e, const double b,
42 const double a);
43 void PlotIonDiffusion(const char xaxis, const double e, const double b,
44 const double a);
45 void PlotElectronTownsend(const char xaxis, const double e, const double b,
46 const double a);
47 void PlotHoleTownsend(const char xaxis, const double e, const double b,
48 const double a);
49 void PlotElectronAttachment(const char xaxis, const double e, const double b,
50 const double a);
51 void PlotHoleAttachment(const char xaxis, const double e, const double b,
52 const double a);
54 double EvaluateFunction(double* pos, double* par);
55
56 private:
57 std::string m_className;
58
59 // Options
60 bool m_debug;
61
62 // Canvas
63 TCanvas* m_canvas;
64 bool m_hasExternalCanvas;
65
66 Medium* m_medium;
67
68 // Ranges for variable parameters
69 double m_eMin, m_eMax;
70 double m_bMin, m_bMax;
71 double m_aMin, m_aMax;
72 double m_vMin, m_vMax;
73
74 // Fixed parameters
75 double m_efield;
76 double m_bfield;
77 double m_angle;
78
79 // Tolerances for marker plotting
80 double m_etolerance;
81 double m_btolerance;
82 double m_atolerance;
83
84 // Functions
85 std::vector<TF1> m_functions;
86 int m_nFunctions;
87 // Graphs
88 std::vector<TGraph> m_graphs;
89 int m_nGraphs;
90
91 void SetupCanvas();
92 void AddFunction(const double xmin, const double xmax, const double ymin,
93 const double ymax, const bool keep, const std::string xlabel,
94 const std::string ylabel, const int type, const char xaxis,
95 const double e, const double b, const double a);
96};
97}
98#endif
double EvaluateFunction(double *pos, double *par)
Definition: ViewMedium.cc:632
void PlotElectronVelocity(const char xaxis, const double e, const double b, const double a)
Definition: ViewMedium.cc:121
void PlotHoleDiffusion(const char xaxis, const double e, const double b, const double a)
Definition: ViewMedium.cc:207
void PlotElectronTownsend(const char xaxis, const double e, const double b, const double a)
Definition: ViewMedium.cc:233
void SetMedium(Medium *m)
Definition: ViewMedium.cc:60
void SetElectricFieldRange(const double emin, const double emax)
Definition: ViewMedium.cc:71
void PlotElectronAttachment(const char xaxis, const double e, const double b, const double a)
Definition: ViewMedium.cc:253
void PlotElectronDiffusion(const char xaxis, const double e, const double b, const double a)
Definition: ViewMedium.cc:193
void PlotElectronCrossSections()
Definition: ViewMedium.cc:273
void SetCanvas(TCanvas *c)
Definition: ViewMedium.cc:49
void PlotHoleVelocity(const char xaxis, const double e, const double b, const double a)
Definition: ViewMedium.cc:152
void SetMagneticFieldRange(const double bmin, const double bmax)
Definition: ViewMedium.cc:83
void PlotIonVelocity(const char xaxis, const double e, const double b, const double a)
Definition: ViewMedium.cc:183
void PlotIonDiffusion(const char xaxis, const double e, const double b, const double a)
Definition: ViewMedium.cc:220
void SetBAngleRange(const double amin, const double amax)
Definition: ViewMedium.cc:95
void PlotHoleTownsend(const char xaxis, const double e, const double b, const double a)
Definition: ViewMedium.cc:243
void PlotHoleAttachment(const char xaxis, const double e, const double b, const double a)
Definition: ViewMedium.cc:263