13#ifndef ROOT_Fit_FitData
14#define ROOT_Fit_FitData
60 explicit FitData(
unsigned int maxpoints = 0,
unsigned int dim = 1);
63 explicit FitData(
const DataOptions &opt,
unsigned int maxpoints = 0,
unsigned int dim = 1);
67 explicit FitData(
const DataRange &range,
unsigned int maxpoints = 0,
unsigned int dim = 1);
71 unsigned int maxpoints = 0,
unsigned int dim = 1);
74 FitData(
unsigned int n,
const double *dataX);
77 FitData(
unsigned int n,
const double *dataX,
const double *dataY);
80 FitData(
unsigned int n,
const double *dataX,
const double *dataY,
88 FitData(
const DataRange &range,
unsigned int maxpoints,
const double *dataX);
95 FitData(
const DataRange &range,
unsigned int maxpoints,
const double *dataX,
const double *dataY);
102 FitData(
const DataRange &range,
unsigned int maxpoints,
const double *dataX,
const double *dataY,
103 const double *dataZ);
112 template<
class Iterator>
113 FitData(
unsigned int n,
unsigned int dim, Iterator dataItr) :
122 for (
unsigned int i = 0; i <
fDim; i++) {
139 template<
class Iterator>
140 FitData(
const DataRange &range,
unsigned int maxpoints,
unsigned int dim, Iterator dataItr) :
161 void Append(
unsigned int newPoints,
unsigned int dim = 1);
176 for (
unsigned int i = 0; i <
fDim; i++) {
189 template<
class Iterator>
192 for (
unsigned int i = 0; i <
fMaxPoints; i++) {
193 bool isInside =
true;
194 Iterator tmpItr = dataItr;
196 for (
unsigned int j = 0; j <
fDim; j++)
202 for (
unsigned int k = 0; k <
fDim; k++)
222 assert(icoord <
fDim);
236 const double *
Coords(
unsigned int ipoint)
const
241 for (
unsigned int i = 0; i <
fDim; i++) {
275 for (
unsigned int i = 0; i <
fDim; i++) {
342 for (
unsigned int i = 0; i <
fDim; i++) {
360 unsigned padding = 0;
361 unsigned modP = (dataSize) % vecCore::VectorSize<ROOT::Double_v>();
363 padding = vecCore::VectorSize<ROOT::Double_v>() - modP;
class describing the range in the coordinates it supports multiple range in a coordinate.
bool IsInside(double x, unsigned int icoord=0) const
check if a point is inside the range for the given coordinate
Base class for all the fit data types: Stores the coordinates and the DataOptions.
double * fpTmpCoordVector
FitData(unsigned int n, unsigned int dim, Iterator dataItr)
constructor for multi-dim external data (data are not copied inside) Uses as argument an iterator of ...
unsigned int Size() const
return number of fit points
void InitCoordsVector()
initializer routines to set the corresponding pointers right The vectors must NOT be resized after th...
void Add(double x)
add one dim data with only coordinate and values
void Append(unsigned int newPoints, unsigned int dim=1)
std::vector< std::vector< double > > fCoords
This vector stores the vectorizable data: The inner vectors contain the coordinates data fCoords[0] i...
std::vector< const double * > fCoordsPtr
static constexpr unsigned VectorPadding(const unsigned)
If VecCore is not defined, there is no vectorization available and the SIMD vector size will always b...
const double * GetCoordComponent(unsigned int ipoint, unsigned int icoord) const
returns a single coordinate component of a point.
void InitFromRange(Iterator dataItr)
unsigned int NPoints() const
return number of fit points
void Add(const double *x)
add multi-dim coordinate data with only value
const std::vector< const double * > & GetCoordDataPtrs() const
direct access to coord data ptrs
FitData(const DataRange &range, unsigned int maxpoints, unsigned int dim, Iterator dataItr)
constructor for multi-dim external data and a range (data are copied inside according to the range) U...
unsigned int NDim() const
return coordinate data dimension
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
const DataRange & Range() const
access to range
virtual ~FitData()
dummy virtual destructor
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
DataOptions : simple structure holding the options on how the data are filled.