36 void SetArea(
const double xmin,
const double ymin,
const double xmax,
45 void SetPlane(
const double fx,
const double fy,
const double fz,
46 const double x0,
const double y0,
const double z0);
50 void Rotate(
const double angle);
76 void Plot(
const std::string& option =
"v",
77 const std::string& drawopt =
"arr");
83 void PlotProfile(
const double x0,
const double y0,
const double z0,
84 const double x1,
const double y1,
const double z1,
85 const std::string& option =
"v");
92 const std::string& option);
98 const std::string& option) {
107 const std::string& drawopt);
116 const double y0,
const double z0,
117 const double x1,
const double y1,
119 const std::string& option =
"v");
142 enum PlotType { Potential = 0, Magnitude, Ex, Ey, Ez, Unknown };
144 static const unsigned int m_nMaxContours = 50;
146 bool m_useAutoRange =
true;
147 bool m_useStatus =
false;
151 Sensor* m_sensor =
nullptr;
155 double m_project[3][3];
157 char m_xLabel[50], m_yLabel[50], m_description[50];
160 bool m_hasUserArea =
false;
161 double m_xmin = -1., m_ymin = -1.;
162 double m_xmax = 1., m_ymax = 1.;
165 double m_vmin = 0., m_vmax = 100.;
166 double m_emin = 0., m_emax = 10000.;
167 double m_wmin = 0., m_wmax = 100.;
170 unsigned int m_nContours = m_nMaxContours;
172 unsigned int m_nSamples1d = 1000;
173 unsigned int m_nSamples2dX = 200;
174 unsigned int m_nSamples2dY = 200;
176 std::string m_electrode =
"";
179 TF2* m_f2d =
nullptr;
180 TF2* m_f2dW =
nullptr;
181 TF1* m_fProfile =
nullptr;
182 TF1* m_fProfileW =
nullptr;
185 void CreateFunction();
186 bool SetupFunction(
const std::string& option,
TF2*& f,
const bool contour,
187 const bool wfield =
false);
188 bool SetupProfile(
const double x0,
const double y0,
const double z0,
189 const double x1,
const double y1,
const double z1,
190 const std::string& option,
TF1*& f,
const bool wfield);
192 PlotType GetPlotType(
const std::string& option, std::string& title)
const;
Abstract base class for components.
Base class for visualization classes.
Visualize the potential or electric field of a component or sensor.
void SetPlane(const double fx, const double fy, const double fz, const double x0, const double y0, const double z0)
void SetElectricFieldRange(const double emin, const double emax)
Set the plot limits for the electric field.
double Evaluate2D(double *pos, double *par)
void PlotWeightingField(const std::string &label, const std::string &option, const std::string &drawopt)
void PlotProfileWeightingField(const std::string &label, const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, const std::string &option="v")
void SetNumberOfSamples2d(const unsigned int nx, const unsigned int ny)
Set the number of points used for drawing 2D functions.
void Rotate(const double angle)
Rotate the viewing plane (angle in radian).
void EnableAcknowledgeStatus(const double v0=0.)
void SetArea()
Set the viewing area based on the bounding box of the sensor/component.
void DisableAcknowledgeStatus()
Ignore the status flag returned by the sensor/component.
void SetComponent(ComponentBase *c)
Set the component from which to retrieve the field.
void SetNumberOfSamples1d(const unsigned int n)
Set the number of points used for drawing 1D functions.
void SetVoltageRange(const double vmin, const double vmax)
Set the plot limits for the potential.
void PlotContour(const std::string &option="v")
void PlotSurface(const std::string &option="v")
void Plot(const std::string &option="v", const std::string &drawopt="arr")
void SetNumberOfContours(const unsigned int n)
Set the number of contour levels (at most 50).
void EnableAutoRange(const bool on=true)
void SetWeightingFieldRange(const double wmin, const double wmax)
Set the plot limits for the weighting field.
void PlotSurfaceWeightingField(const std::string &label, const std::string &option)
void SetSensor(Sensor *s)
Set the sensor from which to retrieve the field.
void SetDefaultProjection()
Set the default viewing plane ( - at ).
double EvaluateProfile(double *pos, double *par)
void PlotContourWeightingField(const std::string &label, const std::string &option)
void PlotProfile(const double x0, const double y0, const double z0, const double x1, const double y1, const double z1, const std::string &option="v")