31 fDataErrorPtr( nullptr ), fDataErrorHighPtr( nullptr ), fDataErrorLowPtr( nullptr ),
32 fpTmpCoordErrorVector( nullptr ), fpTmpBinEdgeVector( nullptr )
47 fDataErrorPtr( nullptr ), fDataErrorHighPtr( nullptr ), fDataErrorLowPtr( nullptr ),
48 fpTmpCoordErrorVector( nullptr ), fpTmpBinEdgeVector( nullptr )
59 unsigned int maxpoints,
unsigned int dim,
ErrorType err ) :
60 FitData( opt, range, maxpoints, dim ),
63 fDataErrorPtr( nullptr ), fDataErrorHighPtr( nullptr ), fDataErrorLowPtr( nullptr ),
64 fpTmpCoordErrorVector( nullptr ), fpTmpBinEdgeVector( nullptr )
76 const double *
ex ,
const double * eval ) :
79 fDataErrorPtr( nullptr ), fDataErrorHighPtr( nullptr ), fDataErrorLowPtr( nullptr ),
80 fpTmpCoordErrorVector( nullptr ), fpTmpBinEdgeVector( nullptr )
85 if (
nullptr != eval )
114 const double * val,
const double *
ex ,
const double *
ey,
115 const double * eval ) :
117 fDataErrorPtr( nullptr ), fDataErrorHighPtr( nullptr ), fDataErrorLowPtr( nullptr ),
118 fpTmpCoordErrorVector( nullptr ), fpTmpBinEdgeVector( nullptr )
123 if (
nullptr != eval )
129 if (
nullptr !=
ex ||
nullptr !=
ey )
152 const double * dataZ,
const double * val,
const double *
ex ,
153 const double *
ey ,
const double * ez ,
const double * eval ) :
155 fDataErrorPtr( nullptr ), fDataErrorHighPtr( nullptr ), fDataErrorLowPtr( nullptr ),
156 fpTmpCoordErrorVector( nullptr ), fpTmpBinEdgeVector( nullptr )
161 if (
nullptr != eval )
167 if (
nullptr !=
ex ||
nullptr !=
ey ||
nullptr != ez )
202 for (
unsigned int i=0; i <
fDim; i++ )
226 fDataErrorPtr(nullptr), fDataErrorHighPtr(nullptr), fDataErrorLowPtr(nullptr),
227 fpTmpCoordErrorVector(nullptr), fpTmpBinEdgeVector(nullptr)
238 assert(
Opt().fIntegral );
275 if ( !
fData.empty() )
283 for (
unsigned int i = 0; i <
fDim; i++) {
307 if (
Opt().fIntegral )
345 Append( newPoints, dim, err );
371 for (
unsigned int i=0; i <
fNPoints; i++ )
373 double val =
fData[i];
377 MATH_ERROR_MSG(
"BinData::TransformLog",
"Some points have negative values - cannot apply a log transformation");
381 fData[i] = std::log( val );
505 if (
y != 0 || eyl != 1.0 || eyh != 1.0)
fSumError2 += (eyl+eyh)*(eyl+eyh)/4;
546 if (val != 0 || eval != 1.0)
fSumError2 += eval*eval;
548 if (val != 0 && std::abs( eval*eval/val - 1.0) > 1.E-12)
fIsWeighted =
true;
566 for(
unsigned int i=0; i<
fDim; i++ )
577 if (val != 0 || eval != 1.0)
fSumError2 += eval*eval;
579 if (val != 0 && std::abs( eval*eval/val - 1.0) > 1.E-12)
fIsWeighted =
true;
585 void BinData::Add(
const double*
x,
double val,
const double*
ex,
double elval,
double ehval )
598 for(
unsigned int i=0; i<
fDim; i++ )
610 if (val != 0 || elval != 1.0 || ehval != 1.0 )
628 for (
unsigned int i=0; i<
fDim; i++ )
639 double binVolume = 1.0;
640 for (
unsigned int j = 0; j <
fDim; j++ )
642 binVolume *= ( xup[j] - xlow[j] );
691 for(
unsigned int i=0; i <
fDim; i++ )
737 for(
unsigned int i=0; i<
fDim; i++ )
761 assert(
fData.empty() );
769 for (
unsigned int i=0; i <
fDim; i++ )
787 for (
unsigned int i=0; i <
fNPoints; i++ )
796 for(
unsigned int i=0; i <
fDim; i++ )
823 unsigned int n =
Size();
827 for (
unsigned int i = 0; i <
n; ++i) {
829 double err =
Error(i);
835 for (
unsigned int i = 0; i <
n; ++i) {
838 double elval,ehval = 0;
840 if (
y != 0 || elval != 1.0 || ehval != 1.0)
#define MATH_ERROR_MSG(loc, str)
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
const double * fDataErrorHighPtr
std::vector< double > fData
Stores the data values the same way as the coordinates.
std::vector< const double * > fCoordErrorsPtr
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...
std::vector< double > fDataErrorLow
void AddBinUpEdge(const double *xup)
add the bin width data, a pointer to an array with the bin upper edge information.
const double * fDataErrorLowPtr
std::vector< double > fDataErrorHigh
BinData & LogTransform()
apply a Log transformation of the data values can be used for example when fitting an exponential or ...
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...
virtual ~BinData()
destructor
double * fpTmpCoordErrorVector
std::vector< std::vector< double > > fCoordErrors
void Add(double x, double y)
add one dim data with only coordinate and values
void Initialize(unsigned int newPoints, unsigned int dim=1, ErrorType err=kValueError)
BinData & operator=(const BinData &rhs)
std::vector< std::vector< double > > fBinEdge
void GetAsymError(unsigned int ipoint, double &lowError, double &highError) const
const double * fDataErrorPtr
double * fpTmpBinEdgeVector
std::vector< double > fDataError
double Error(unsigned int ipoint) const
class describing the range in the coordinates it supports multiple range in a coordinate.
Base class for all the fit data types: Stores the coordinates and the DataOptions.
unsigned int Size() const
return number of fit points
void Add(double x)
add one dim data with only coordinate and values
void Append(unsigned int newPoints, unsigned int dim=1)
static constexpr unsigned VectorPadding(const unsigned)
If VecCore is not defined, there is no vectorization available and the SIMD vector size will always b...
FitData & operator=(const FitData &rhs)
const DataOptions & Opt() const
access to options
const double * Coords(unsigned int ipoint) const
return a pointer to the coordinates data for the given fit point
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
DataOptions : simple structure holding the options on how the data are filled.