36 void SetArea(
const double xmin,
const double ymin,
const double xmax,
39 virtual void SetArea(
const double xmin,
const double ymin,
const double zmin,
40 const double xmax,
const double ymax,
const double zmax);
52 virtual void SetPlane(
const double fx,
const double fy,
const double fz,
53 const double x0,
const double y0,
const double z0);
55 virtual void SetPlane(
const double fx,
const double fy,
const double fz,
56 const double x0,
const double y0,
const double z0,
57 const double hx,
const double hy,
const double hz);
59 void Rotate(
const double angle);
100 std::array<std::array<double, 3>, 3>
m_proj{{
101 {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 0}}
105 std::array<std::array<double, 3>, 3>
m_prmat{{
106 {{1, 0, 0}}, {{0, 1, 0}}, {{0, 0, 1}}
113 void ToPlane(
const T x,
const T y,
const T z, T& xp, T& yp)
const {
119 bool InBox(
const std::array<T, 3>& x)
const {
127 void Clip(
const std::array<float, 3>& x0,
128 const std::array<float, 3>& x1, std::array<float, 3>& xc)
const;
130 void DrawLine(
const std::vector<std::array<float, 3> >& xl,
131 const short col,
const short lw);
141 double& xmax,
double& ymax)
const;
143 double& xmax,
double& ymax)
const;
145 double& xmax,
double& ymax)
const;
147 std::array<double, 3>& bbmax,
148 double& xmin,
double& ymin,
149 double& xmax,
double& ymax)
const;
152 static void SetRange(TVirtualPad* pad,
const double x0,
const double y0,
153 const double x1,
const double y1);
156 TPad* m_pad =
nullptr;
157 std::unique_ptr<TCanvas> m_canvas;
Abstract base class for components.
std::array< double, 4 > m_plane
void EnableDebugging(const bool on=true)
Switch on/off debugging output.
static void SetRange(TVirtualPad *pad, const double x0, const double y0, const double x1, const double y1)
std::array< std::array< double, 3 >, 3 > m_prmat
void Clip(const std::array< float, 3 > &x0, const std::array< float, 3 > &x1, std::array< float, 3 > &xc) const
bool InBox(const std::array< T, 3 > &x) const
void DrawLine(const std::vector< std::array< float, 3 > > &xl, const short col, const short lw)
void SetCanvas(TPad *pad)
Set the canvas to be painted on.
static std::string FindUnusedHistogramName(const std::string &s)
Find an unused histogram name.
void SetPlaneZX()
Set the viewing plane to z-x.
void SetPlaneYZ()
Set the viewing plane to y-z.
static std::string FindUnusedCanvasName(const std::string &s)
Find an unused canvas name.
std::array< std::array< double, 3 >, 3 > m_proj
TPad * GetCanvas()
Retrieve the canvas.
static bool RangeSet(TVirtualPad *)
void SetPlaneXZ()
Set the viewing plane to x-z.
bool PlotLimits(Sensor *sensor, double &xmin, double &ymin, double &xmax, double &ymax) const
void SetPlaneXY()
Set the viewing plane to x-y.
virtual ~ViewBase()=default
Destructor.
void ToPlane(const T x, const T y, const T z, T &xp, T &yp) const
void SetCanvas()
Unset an external canvas.
std::string PlaneDescription()
void SetPlaneZY()
Set the viewing plane to z-y.
bool PlotLimitsFromUserBox(double &xmin, double &ymin, double &xmax, double &ymax) const
static std::string FindUnusedFunctionName(const std::string &s)
Find an unused function name.
void Rotate(const double angle)
Rotate the viewing plane (angle in radian).
ViewBase()=delete
Default constructor.
void UpdateProjectionMatrix()
virtual void SetPlane(const double fx, const double fy, const double fz, const double x0, const double y0, const double z0)