30 void SetRangeE(
const double emin,
const double emax,
const bool logscale);
32 void SetRangeB(
const double bmin,
const double bmax,
const bool logscale);
34 void SetRangeA(
const double amin,
const double amax,
const bool logscale);
38 void SetRangeY(
const double ymin,
const double ymax,
39 const bool logscale =
false);
46 void SetAngle(
const double angle) { m_angle = angle; }
56 PlotVelocity(GetAxis(xaxis), Charge::Electron, same);
60 PlotVelocity(GetAxis(xaxis), Charge::Hole, same);
64 PlotVelocity(GetAxis(xaxis), Charge::Ion, same);
68 PlotDiffusion(GetAxis(xaxis), Charge::Electron, same);
72 PlotDiffusion(GetAxis(xaxis), Charge::Hole, same);
76 PlotDiffusion(GetAxis(xaxis), Charge::Ion, same);
80 Plot(GetAxis(xaxis), Charge::Electron, Parameter::Townsend, same);
84 Plot(GetAxis(xaxis), Charge::Hole, Parameter::Townsend, same);
88 Plot(GetAxis(xaxis), Charge::Electron, Parameter::Attachment, same);
92 Plot(GetAxis(xaxis), Charge::Hole, Parameter::Attachment, same);
96 PlotLorentzAngle(GetAxis(xaxis), Charge::Electron, same);
101 void SetColours(
const std::vector<short>& cols) { m_colours = cols; }
103 void SetLabels(
const std::vector<std::string>& labels) { m_labels = labels; }
107 enum class Parameter {
112 LongitudinalDiffusion,
131 Medium* m_medium =
nullptr;
134 double m_eMin = 100., m_eMax = 100000.;
135 double m_bMin = 0., m_bMax = 2.;
136 double m_aMin = 0., m_aMax = Pi;
141 bool m_autoRangeX =
true;
142 Axis m_xaxis = Axis::None;
145 double m_yMin = 0., m_yMax = 1.;
147 bool m_autoRangeY =
true;
150 double m_efield = 1000.;
152 double m_bfield = 0.;
154 double m_angle = HalfPi;
156 std::vector<double> m_xPlot;
157 std::vector<std::vector<double> > m_yPlot;
158 std::vector<Parameter> m_par;
159 std::vector<Charge> m_q;
161 std::vector<std::vector<double> > m_xGraph;
162 std::vector<std::vector<double> > m_yGraph;
164 std::vector<short> m_colours;
165 std::vector<std::string> m_labels;
167 void PlotVelocity(
const Axis xaxis,
const Charge particle,
169 void PlotDiffusion(
const Axis xaxis,
const Charge particle,
171 void Plot(
const Axis xaxis,
const Charge particle,
172 const Parameter par,
const bool same);
173 void PlotLorentzAngle(
const Axis xaxis,
const Charge particle,
177 void ResetX(
const Axis xaxis);
180 Axis GetAxis(
const char xaxis)
const;
181 bool GetGrid(std::array<std::vector<double>, 3>& grid,
182 int& ie,
int& ib,
int& ia,
const Axis xaxis)
const;
Abstract base class for media.
Base class for visualization classes.
Plot transport coefficients as function of electric and magnetic field.
void SetRangeY(const double ymin, const double ymax, const bool logscale=false)
Set the range of the function (velocity etc.) to be plotted.
void SetAngle(const double angle)
Set the angle to use when plotting as function of E or B.
void SetRangeB(const double bmin, const double bmax, const bool logscale)
Set the limits of the magnetic field.
void SetLabels(const std::vector< std::string > &labels)
Set user-defined plot labels.
void PlotIonVelocity(const char xaxis, const bool same=false)
Plot the ion drift velocity in the gas.
void PlotElectronTownsend(const char xaxis, const bool same=false)
Plot the Townsend coefficient for electrons.
void SetMedium(Medium *m)
Set the medium from which to retrieve the transport coefficients.
void PlotHoleVelocity(const char xaxis, const bool same=false)
Plot the drift velocity components of holes in the medium.
void SetMagneticField(const double bfield)
Set the magnetic field to use when plotting as function of E or angle.
void PlotHoleDiffusion(const char xaxis, const bool same=false)
Plot the diffusion coefficients of holes in the medium.
~ViewMedium()=default
Destructor.
void PlotElectronAttachment(const char xaxis, const bool same=false)
Plot the attachment coefficient for electrons.
void SetColours(const std::vector< short > &cols)
Set the (ROOT) colours to be used in the plots.
void PlotIonDiffusion(const char xaxis, const bool same=false)
Plot the diffusion coefficients of ions in the gas.
void PlotElectronCrossSections()
void PlotElectronLorentzAngle(const char xaxis, const bool same=false)
Plot the angle between drift velocity and field.
void PlotElectronVelocity(const char xaxis, const bool same=false)
void EnableAutoRangeY(const bool on=true)
Choose the y-axis range based on the function's minima/maxima.
void SetRangeE(const double emin, const double emax, const bool logscale)
Set the limits of the electric field.
void SetElectricField(const double efield)
Set the electric field to use when plotting as function of B or angle.
void PlotHoleAttachment(const char xaxis, const bool same=false)
Plot the attachment coefficient for holes.
void SetRangeA(const double amin, const double amax, const bool logscale)
Set the limits of the angle between electric and magnetic field.
void EnableAutoRangeX(const bool on=true)
Try to choose the x-axis range based on the field grid.
void PlotElectronDiffusion(const char xaxis, const bool same=false)
Plot the diffusion coefficients in the medium.
void PlotHoleTownsend(const char xaxis, const bool same=false)
Plot the Townsend coefficient for holes.