1 #ifndef PROBABILITYCONTOUR_HH
2 #define PROBABILITYCONTOUR_HH
14 #include "TPolyLine.h"
22 #include "AlphaComplex.hh"
44 const std::string algo =
"hull");
52 const std::string algo =
"rectangle");
62 const std::vector<Vertex>& mcvertices,
90 TH2F*
Contour2D(
size_t idx=0,
size_t idy=1)
const;
100 TH3F*
Contour3D(
size_t idx=0,
size_t idy=1,
size_t idz=2)
const;
109 void Evaluate(
double alpha,
double eps = 1e-3);
168 void MCMethod(
double alpha,
double eps);
std::vector< Vertex > _vertices
Density estimation input vertices.
Definition: ProbabilityContour.hh:191
Grid _grid
Grid of points are their value.
Definition: ProbabilityContour.hh:186
void AlphaComplexMethod(double alpha, double eps)
Computes the optimal contour using the "alphac" method.
Definition: ProbabilityContour.cc:244
double _boxvol
Volume of the box in which the MC is run.
Definition: ProbabilityContour.hh:193
void HullMethod(double alpha, double eps)
Computes the optimal contour using the "hull" method.
Definition: ProbabilityContour.cc:264
std::vector< Vertex > _mcvertices
Monte Carlo vertices on a box.
Definition: ProbabilityContour.hh:192
~ProbabilityContour()
Destructor.
Definition: ProbabilityContour.cc:68
double _volume
Volume of the contour.
Definition: ProbabilityContour.hh:189
Data structure for a grid of points and their mapping onto a scalar field.
Definition: Grid.hh:19
double GetContourVolumeError() const
Returns the volume of the current contour.
Definition: ProbabilityContour.cc:230
const double & GetBoxVolume() const
Returns the volume of the box containing the MC vertices.
Definition: ProbabilityContour.hh:118
const std::vector< std::vector< size_t > > & GetIndexArray() const
Returns the array of indices of grid cells used to build the contour.
Definition: ProbabilityContour.hh:127
const double & GetAlpha() const
Returns the fraction of the function for which the contour was computed.
Definition: ProbabilityContour.hh:115
const double & GetContourVolume() const
Returns the volume of the current contour.
Definition: ProbabilityContour.hh:121
TH3F * Contour3D(size_t idx=0, size_t idy=1, size_t idz=2) const
Returns the requested 2D contour on a function.
Definition: ProbabilityContour.cc:157
ProbabilityContour & operator=(const ProbabilityContour &cont)
Equality operator.
Definition: ProbabilityContour.cc:51
TH1F * Contour1D(size_t idx=0) const
Returns segments that represent the 1D contour on a function.
Definition: ProbabilityContour.cc:70
TH2F * Contour2D(size_t idx=0, size_t idy=1) const
Returns the requested 2D contour on a function.
Definition: ProbabilityContour.cc:114
double _level
Level of the contour.
Definition: ProbabilityContour.hh:190
std::string _algo
Contour computation algorithm.
Definition: ProbabilityContour.hh:185
bool IsInitialized() const
Returns the array of indices of the vertices used.
Definition: ProbabilityContour.hh:112
void SetVertexArray(const std::vector< Vertex > &vertices)
Sets the array of input vertices.
Definition: ProbabilityContour.hh:142
Reconstructs the optimal α-contour of a Probability Density Function.
Definition: ProbabilityContour.hh:31
const std::vector< Vertex > & GetMCVertexArray() const
Returns the array of MC vertices used to determine the contour.
Definition: ProbabilityContour.hh:130
void TrapezoidMethod(double alpha, double eps=1e-3)
Computes the optimal contour using the "trapezoid" method.
Definition: ProbabilityContour.cc:334
void SetMCVertexArray(const std::vector< Vertex > &mcvertices)
Sets the array of MC vertices used to determine the contour.
Definition: ProbabilityContour.hh:139
void Evaluate(double alpha, double eps=1e-3)
Computes the optimal contour using the specified algorithm.
Definition: ProbabilityContour.cc:203
void SetBoxVolume(const double &boxvol)
Sets the array of input vertices.
Definition: ProbabilityContour.hh:145
double _alpha
Fraction of the function.
Definition: ProbabilityContour.hh:188
void RectangleMethod(double alpha, double)
Computes the optimal contour using the "rectangle" method.
Definition: ProbabilityContour.cc:298
std::vector< std::vector< size_t > > _indices
Vector of indices of the vertices used.
Definition: ProbabilityContour.hh:187
const double & GetVolume() const
Returns the volume of the contour.
Definition: ProbabilityContour.hh:136
const std::vector< Vertex > & GetVertexArray() const
Returns the array of input vertices.
Definition: ProbabilityContour.hh:133
ProbabilityContour()
Default constructor, initilizes everything to 0.
Definition: ProbabilityContour.cc:3
void MCMethod(double alpha, double eps)
Computes the optimal contour using the "mc" method.
Definition: ProbabilityContour.cc:282