13#ifndef ROOT_Fit_DataRange
14#define ROOT_Fit_DataRange
38 typedef std::vector<std::pair<double,double> >
RangeSet;
70 unsigned int Size(
unsigned int icoord = 0)
const {
80 for (
unsigned int icoord = 0; icoord <
fRanges.size(); ++icoord)
81 if (
fRanges[icoord].size() > 0)
return true;
97 std::pair<double, double>
operator() (
unsigned int icoord = 0,
unsigned int irange = 0)
const;
103 void GetRange(
unsigned int irange,
unsigned int icoord,
double &
xmin,
double &
xmax)
const {
134 void GetRange(
double &
xmin,
double &
xmax,
double &
ymin,
double &
ymax,
double & zmin,
double & zmax,
unsigned int irange=0)
const {
141 for (
unsigned int i = 0; i <
fRanges.size(); ++i)
200 void Clear (
unsigned int icoord = 0 );
205 bool IsInside(
double x,
unsigned int icoord = 0)
const;
212 for (
unsigned int idim = 0; idim <
fRanges.size(); ++idim) {
214 if (!ret)
return ret;
static const double x2[5]
static const double x1[5]
class describing the range in the coordinates it supports multiple range in a coordinate.
static void GetInfRange(double &x1, double &x2)
void AddRange(double xmin, double xmax)
add a range [xmin,xmax] for the first coordinate icoord
std::vector< std::pair< double, double > > RangeSet
void AddRange(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
add a range [xmin,xmax] for the first and [ymin,ymax] for the second coordinate and [zmin,...
bool IsInside(const double *x) const
check if a multi-dimpoint is inside the range
void GetRange(double &xmin, double &xmax, double &ymin, double &ymax, unsigned int irange=0) const
get range for the x and y coordinates
std::vector< RangeSet > RangeIntervals
void AddRange(double xmin, double xmax, double ymin, double ymax)
add a range [xmin,xmax] for the first and [ymin,ymax] for the second coordinate
void SetRange(double xmin, double xmax, double ymin, double ymax)
set a range [xmin,xmax] for the first and [ymin,ymax] for the second coordinate
void GetRange(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax, unsigned int irange=0) const
get range for the x and y and z coordinates
void CleanRangeSet(unsigned int icoord, double xmin, double xmax)
internal function to remove all the existing ranges between xmin and xmax called when a new range is ...
bool IsInside(double x, unsigned int icoord=0) const
check if a point is inside the range for the given coordinate
void GetRange(double &xmin, double &xmax, unsigned int irange=0) const
get first range for the x - coordinate
const RangeSet & Ranges(unsigned int icoord=0) const
return the vector of ranges for the coordinate icoord
bool IsSet() const
return true if a range has been set in any of the coordinates i.e.
unsigned int NDim() const
get range dimension
void Clear(unsigned int icoord=0)
clear all ranges in one coordinate (is now -inf, +inf)
void AddRange(unsigned int icoord, double xmin, double xmax)
add a range [xmin,xmax] for the new coordinate icoord Adding a range does not delete existing one,...
DataRange(unsigned int dim=1)
Default constructor (infinite range)
unsigned int Size(unsigned int icoord=0) const
return range size for coordinate icoord (starts from zero) Size == 0 indicates no range is present [-...
void GetRange(double *xmin, double *xmax, unsigned int irange=0) const
get range for coordinates and fill the vector
void GetRange(unsigned int icoord, double &xmin, double &xmax) const
get the first range for given coordinate.
std::pair< double, double > operator()(unsigned int icoord=0, unsigned int irange=0) const
return the i-th range for the coordinate icoord.
void GetRange(unsigned int irange, unsigned int icoord, double &xmin, double &xmax) const
get the i-th range for given coordinate.
void SetRange(unsigned int icoord, double xmin, double xmax)
set a range [xmin,xmax] for the new coordinate icoord If more range exists for other coordinates,...
void SetRange(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
set a range [xmin,xmax] for the first and [ymin,ymax] for the second coordinate and [zmin,...
void SetRange(double xmin, double xmax)
set a range [xmin,xmax] for the first coordinate icoord
~DataRange()
Destructor (no operations)
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)