Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y values and error on coordinates The dimension of the coordinate is free There are 4 different options: - only coordinates and values (for binned likelihood fits) : kNoError - coordinate, values and error on values (for normal least square fits) : kValueError - coordinate, values, error on values and coordinates (for effective least square fits) : kCoordError - corrdinate, values, error on coordinates and asymmettric error on valyes : kAsymError In addition there is the option to construct Bindata copying the data in (using the DataVector class) or using pointer to external data (DataWrapper) class. In general is found to be more efficient to copy the data. In case of really large data sets for limiting memory consumption then the other option can be used Specialized constructor exists for data up to 3 dimensions. When the data are copying in the number of points can be set later (or re-set) using Initialize and the data are inserted one by one using the Add method. It is mandatory to set the size before using the Add method. @ingroup FitData
virtual | ~BinData() |
void | Add(double x, double y) |
void | Add(const double* x, double val) |
void | Add(double x, double y, double ey) |
void | Add(const double* x, double val, double eval) |
void | Add(double x, double y, double ex, double ey) |
void | Add(const double* x, double val, const double* ex, double eval) |
void | Add(double x, double y, double ex, double eyl, double eyh) |
void | Add(const double* x, double val, const double* ex, double elval, double ehval) |
void | AddBinUpEdge(const double* xup) |
ROOT::Fit::BinData | BinData(const ROOT::Fit::BinData&) |
ROOT::Fit::BinData | BinData(unsigned int maxpoints = 0, unsigned int dim = 1, ROOT::Fit::BinData::ErrorType err = kValueError) |
ROOT::Fit::BinData | BinData(const ROOT::Fit::DataOptions& opt, unsigned int maxpoints = 0, unsigned int dim = 1, ROOT::Fit::BinData::ErrorType err = kValueError) |
ROOT::Fit::BinData | BinData(const ROOT::Fit::DataOptions& opt, const ROOT::Fit::DataRange& range, unsigned int maxpoints = 0, unsigned int dim = 1, ROOT::Fit::BinData::ErrorType err = kValueError) |
ROOT::Fit::BinData | BinData(unsigned int n, const double* dataX, const double* val, const double* ex, const double* eval) |
ROOT::Fit::BinData | BinData(unsigned int n, const double* dataX, const double* dataY, const double* val, const double* ex, const double* ey, const double* eval) |
ROOT::Fit::BinData | BinData(unsigned int n, const double* dataX, const double* dataY, const double* dataZ, const double* val, const double* ex, const double* ey, const double* ez, const double* eval) |
const double* | BinUpEdge(unsigned int icoord) const |
const double* | CoordErrors(unsigned int ipoint) const |
const double* | Coords(unsigned int ipoint) const |
unsigned int | DataSize() const |
double | Error(unsigned int ipoint) const |
ROOT::Fit::FitData | ROOT::Fit::FitData::FitData() |
ROOT::Fit::FitData | ROOT::Fit::FitData::FitData(const ROOT::Fit::DataOptions& opt) |
ROOT::Fit::FitData | ROOT::Fit::FitData::FitData(const ROOT::Fit::DataRange& range) |
ROOT::Fit::FitData | ROOT::Fit::FitData::FitData(const ROOT::Fit::FitData&) |
ROOT::Fit::FitData | ROOT::Fit::FitData::FitData(const ROOT::Fit::DataOptions& opt, const ROOT::Fit::DataRange& range) |
ROOT::Fit::BinData::ErrorType | GetErrorType() const |
const double* | GetPoint(unsigned int ipoint, double& value) const |
const double* | GetPoint(unsigned int ipoint, double& value, double& invError) const |
const double* | GetPointError(unsigned int ipoint, double& errvalue) const |
const double* | GetPointError(unsigned int ipoint, double& errlow, double& errhigh) const |
static unsigned int | GetPointSize(ROOT::Fit::BinData::ErrorType err, unsigned int dim) |
bool | HasBinEdges() const |
bool | HaveAsymErrors() const |
bool | HaveCoordErrors() const |
void | Initialize(unsigned int maxpoints, unsigned int dim = 1, ROOT::Fit::BinData::ErrorType err = kValueError) |
double | InvError(unsigned int ipoint) const |
ROOT::Fit::BinData& | LogTransform() |
static unsigned int | ROOT::Fit::FitData::MaxSize() |
unsigned int | NDim() const |
unsigned int | NPoints() const |
ROOT::Fit::BinData& | operator=(const ROOT::Fit::BinData&) |
const ROOT::Fit::DataOptions& | ROOT::Fit::FitData::Opt() const |
ROOT::Fit::DataOptions& | ROOT::Fit::FitData::Opt() |
unsigned int | PointSize() const |
const ROOT::Fit::DataRange& | ROOT::Fit::FitData::Range() const |
double | RefVolume() const |
void | Resize(unsigned int npoints) |
void | SetRefVolume(double value) |
unsigned int | Size() const |
double | SumOfContent() const |
double | SumOfError2() const |
double | Value(unsigned int ipoint) const |
void | SetNPoints(unsigned int n) |
vector<double> | fBinEdge | vector containing the bin upper edge (coordinate will contain low edge) |
ROOT::Fit::DataVector* | fDataVector | pointer to the copied in data vector |
ROOT::Fit::DataWrapper* | fDataWrapper | pointer to the external data wrapper structure |
unsigned int | fDim | coordinate dimension |
unsigned int | fNPoints | number of contained points in the data set (can be different than size of vector) |
unsigned int | fPointSize | total point size including value and errors (= fDim + 2 for error in only Y ) |
double | fRefVolume | reference bin volume - used to normalize the bins in case of variable bins data |
double | fSumContent | total sum of the bin data content |
double | fSumError2 | total sum square of the errors |
constructor from dimension of point and max number of points (to pre-allocate vector) Give a zero value and then use Initialize later one if the size is not known
constructor from option and default range
constructor from options and range efault is 1D and value errors
constructurs using external data constructor from external data for 1D with errors on coordinate and value
constructor from external data for 2D with errors on coordinate and value
constructor from external data for 3D with errors on coordinate and value
preallocate a data set with given size , dimension and error type (to get the full point size) If the data set already exists and it is having the compatible point size space for the new points is created in the data sets, while if not compatible the old data are erased and new space of new size is allocated. (i.e if exists initialize is equivalent to a resize( NPoints() + maxpoints)
return the size of a fit point (is the coordinate dimension + 1 for the value and eventually the number of all errors
return the size of internal data (number of fit points) if data are not copied in but used externally the size is 0
add one dim data with no error in the coordinate (x) in this case store the inverse of the error in the value (y)
add one dim data with error in the coordinate (x) in this case store the value (y) error and not the inverse
add one dim data with error in the coordinate (x) and asymmetric errors in the value (y) in this case store the y errors and not the inverse
add multi-dim coordinate data with only error in value
add multi-dim coordinate data with both error in coordinates and value
add multi-dim coordinate data with both error in coordinates and value
return a pointer to the coordinates data for the given fit point
return error on the value for the given fit point Safe (but slower) method returning correctly the error on the value in case of asymm errors return the average 0.5(eu + el)
Return the inverse of error on the value for the given fit point useful when error in the coordinates are not stored and then this is used directly this as the weight in the least square function
Return a pointer to the errors in the coordinates for the given fit point
retrieve in a single call a pointer to the coordinate data, value and inverse error for the given fit point. To be used only when type is kValueError or kNoError. In the last case the value 1 is returned for the error.
Retrieve the errors on the point (coordinate and value) for the given fit point It must be called only when the coordinate errors are stored otherwise it will produce an assert.
Get errors on the point (coordinate errors and asymmetric value errors) for the given fit point. It must be called only when the coordinate errors and asymmetric errors are stored otherwise it will produce an assert.
resize the vector to the new given npoints if vector does not exists is created using existing point size
apply a Log transformation of the data values can be used for example when fitting an exponential or gaussian Transform the data in place need to copy if want to preserve original data The data sets must not contain negative values. IN case it does, an empty data set is returned
return an array containing the upper edge of the bin for coordinate i In case of empty bin they could be merged in a single larger bin Return a NULL pointer if the bin width is not stored
retrieve the reference volume used to normalize the data when the option bin volume is set
{ return fRefVolume; }
set the reference volume used to normalize the data when the option bin volume is set
{ fRefVolume = value; }
compute the total sum of the data content (sum of weights in cse of weighted data set)
{ return fSumContent; }
compute the total sum of the error square (sum of weight square in case of a weighted data set)
{ return fSumError2;}