26 BinData::BinData(
unsigned int maxpoints,
unsigned int dim,
31 fDataErrorPtr(
NULL ), fDataErrorHighPtr(
NULL ), fDataErrorLowPtr(
NULL ),
32 fpTmpCoordErrorVector(
NULL ), fpTmpBinEdgeVector(
NULL )
59 unsigned int maxpoints,
unsigned int dim,
ErrorType err ) :
60 FitData( opt, range, maxpoints, dim ),
76 const double *
ex ,
const double * eval ) :
112 const double * val,
const double *
ex ,
const double *
ey,
113 const double * eval ) :
149 const double * dataZ,
const double * val,
const double *
ex ,
150 const double *
ey ,
const double * ez ,
const double * eval ) :
151 FitData( n, dataX, dataY, dataZ ),
198 for (
unsigned int i=0; i <
fDim; i++ )
231 assert(
Opt().fIntegral );
268 if ( !
fData.empty() )
281 for (
unsigned int i=0; i<
fDim; i++ )
309 if (
Opt().fIntegral )
347 Append( newPoints, dim, err );
373 for (
unsigned int i=0; i <
fNPoints; i++ )
375 double val =
fData[i];
379 MATH_ERROR_MSG(
"BinData::TransformLog",
"Some points have negative values - cannot apply a log transformation");
548 for(
unsigned int i=0; i<
fDim; i++ )
563 void BinData::Add(
const double*
x,
double val,
const double*
ex,
double elval,
double ehval )
576 for(
unsigned int i=0; i<
fDim; i++ )
603 for (
unsigned int i=0; i<
fDim; i++ )
614 double binVolume = 1.0;
615 for (
unsigned int j = 0; j <
fDim; j++ )
617 binVolume *= ( xup[j] - xlow[j] );
666 for(
unsigned int i=0; i <
fDim; i++ )
712 for(
unsigned int i=0; i<
fDim; i++ )
736 assert(
fData.empty() );
743 for (
unsigned int i=0; i <
fDim; i++ )
761 for (
unsigned int i=0; i <
fNPoints; i++ )
770 for(
unsigned int i=0; i <
fDim; i++ )
Namespace for new ROOT classes and functions.
double * fpTmpBinEdgeVector
Base class for all the fit data types: Stores the coordinates and the DataOptions.
const double * fDataErrorPtr
void AddBinUpEdge(const double *xup)
add the bin width data, a pointer to an array with the bin upper edge information.
std::vector< const double *> fCoordErrorsPtr
const double * Coords(unsigned int ipoint) const
return a pointer to the coordinates data for the given fit point
double * fpTmpCoordErrorVector
std::vector< double > fData
Stores the data values the same way as the coordinates.
std::vector< std::vector< double > > fBinEdge
void Append(unsigned int newPoints, unsigned int dim=1)
void Initialize(unsigned int newPoints, unsigned int dim=1, ErrorType err=kValueError)
#define MATH_ERROR_MSG(loc, str)
DataOptions : simple structure holding the options on how the data are filled.
void Add(double x)
add one dim data with only coordinate and values
std::vector< double > fDataError
const DataOptions & Opt() const
access to options
std::vector< double > fDataErrorHigh
virtual ~BinData()
destructor
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
BinData(unsigned int maxpoints=0, unsigned int dim=1, ErrorType err=kValueError)
constructor from dimension of point and max number of points (to pre-allocate vector) Give a zero val...
class describing the range in the coordinates it supports multiple range in a coordinate.
const double * fDataErrorLowPtr
void Add(double x, double y)
add one dim data with only coordinate and values
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
std::vector< double > fDataErrorLow
std::vector< std::vector< double > > fCoordErrors
BinData & operator=(const BinData &rhs)
BinData & LogTransform()
apply a Log transformation of the data values can be used for example when fitting an exponential or ...
FitData & operator=(const FitData &rhs)
void Append(unsigned int newPoints, unsigned int dim=1, ErrorType err=kValueError)
preallocate a data set with given size , dimension and error type (to get the full point size) If the...
const double * fDataErrorHighPtr