13 #ifndef ROOT_Fit_FitData
14 #define ROOT_Fit_FitData
70 explicit FitData(
unsigned int maxpoints = 0,
unsigned int dim = 1);
73 explicit FitData(
const DataOptions &opt,
unsigned int maxpoints = 0,
unsigned int dim = 1);
77 explicit FitData(
const DataRange &range,
unsigned int maxpoints = 0,
unsigned int dim = 1);
81 unsigned int maxpoints = 0,
unsigned int dim = 1);
84 FitData(
unsigned int n,
const double *dataX);
87 FitData(
unsigned int n,
const double *dataX,
const double *dataY);
90 FitData(
unsigned int n,
const double *dataX,
const double *dataY,
98 FitData(
const DataRange &range,
unsigned int maxpoints,
const double *dataX);
105 FitData(
const DataRange &range,
unsigned int maxpoints,
const double *dataX,
const double *dataY);
112 FitData(
const DataRange &range,
unsigned int maxpoints,
const double *dataX,
const double *dataY,
113 const double *dataZ);
122 template<
class Iterator>
123 FitData(
unsigned int n,
unsigned int dim, Iterator dataItr) :
132 for (
unsigned int i = 0; i <
fDim; i++) {
149 template<
class Iterator>
150 FitData(
const DataRange &range,
unsigned int maxpoints,
unsigned int dim, Iterator dataItr) :
171 void Append(
unsigned int newPoints,
unsigned int dim = 1);
186 for (
unsigned int i = 0; i <
fDim; i++) {
199 template<
class Iterator>
202 for (
unsigned int i = 0; i <
fMaxPoints; i++) {
203 bool isInside =
true;
204 Iterator tmpItr = dataItr;
206 for (
unsigned int j = 0; j <
fDim; j++)
212 for (
unsigned int k = 0; k <
fDim; k++)
232 assert(icoord <
fDim);
246 const double *
Coords(
unsigned int ipoint)
const
251 for (
unsigned int i = 0; i <
fDim; i++) {
285 for (
unsigned int i = 0; i <
fDim; i++) {
352 for (
unsigned int i = 0; i <
fDim; i++) {
363 #ifdef R__HAS_VECCORE
370 unsigned padding = 0;
371 unsigned modP = (dataSize) % vecCore::VectorSize<ROOT::Double_v>();
373 padding = vecCore::VectorSize<ROOT::Double_v>() - modP;
double * fpTmpCoordVector
const double * Coords(unsigned int ipoint) const
return a pointer to the coordinates data for the given fit point
virtual ~FitData()
dummy virtual destructor
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 ...
Base class for all the fit data types: Stores the coordinates and the DataOptions.
std::vector< std::vector< double > > fCoords
This vector stores the vectorizable data: The inner vectors contain the coordinates data fCoords[0] i...
void Add(const double *x)
add multi-dim coordinate data with only value
unsigned int NDim() const
return coordinate data dimension
void Append(unsigned int newPoints, unsigned int dim=1)
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...
void InitCoordsVector()
initializer routines to set the corresponding pointers right The vectors must NOT be resized after th...
DataOptions : simple structure holding the options on how the data are filled.
const DataRange & Range() const
access to range
void Add(double x)
add one dim data with only coordinate and values
unsigned int Size() const
return number of fit points
static constexpr unsigned VectorPadding(const unsigned)
If VecCore is not defined, there is no vectorization available and the SIMD vector size will always b...
std::vector< const double * > fCoordsPtr
class describing the range in the coordinates it supports multiple range in a coordinate.
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
const std::vector< const double * > & GetCoordDataPtrs() const
direct access to coord data ptrs
FitData & operator=(const FitData &rhs)
void InitFromRange(Iterator dataItr)
const DataOptions & Opt() const
access to options
unsigned int NPoints() const
return number of fit points
bool IsInside(double x, unsigned int icoord=0) const
check if a point is inside the range for the given coordinate
const double * GetCoordComponent(unsigned int ipoint, unsigned int icoord) const
returns a single coordinate component of a point.
FitData(unsigned int maxpoints=0, unsigned int dim=1)
construct with default option and data range