13 #ifndef ROOT_Fit_UnBinData 14 #define ROOT_Fit_UnBinData 50 explicit UnBinData(
unsigned int maxpoints = 0,
unsigned int dim = 1,
51 bool isWeighted =
false ) :
52 FitData( maxpoints, isWeighted ? dim + 1 : dim ),
64 unsigned int dim = 1,
bool isWeighted =
false ) :
65 FitData( range, maxpoints, isWeighted ? dim + 1 : dim ),
76 unsigned int maxpoints = 0,
unsigned int dim = 1,
bool isWeighted =
false ) :
77 FitData( opt, range, maxpoints, isWeighted ? dim + 1 : dim ),
97 UnBinData(
unsigned int n,
const double * dataX,
const double * dataY,
98 bool isWeighted =
false ) :
108 UnBinData(
unsigned int n,
const double * dataX,
const double * dataY,
109 const double * dataZ,
bool isWeighted =
false ) :
110 FitData( n, dataX, dataY, dataZ ),
122 template<
class Iterator>
123 UnBinData(
unsigned int n,
unsigned int dim, Iterator dataItr,
124 bool isWeighted =
false ) :
125 FitData( n, isWeighted ? dim + 1 : dim, dataItr ),
136 FitData( range, maxpoints, dataX ),
146 UnBinData(
unsigned int maxpoints,
const double * dataX,
const double * dataY,
147 const DataRange & range,
bool isWeighted =
false) :
148 FitData( range, maxpoints, dataX, dataY ),
157 UnBinData(
unsigned int maxpoints,
const double * dataX,
const double * dataY,
158 const double * dataZ,
const DataRange & range,
bool isWeighted =
false) :
159 FitData( range, maxpoints, dataX, dataY, dataZ ),
169 template<
class Iterator>
170 UnBinData(
unsigned int maxpoints,
unsigned int dim, Iterator dataItr,
const DataRange & range,
bool isWeighted =
false ) :
171 FitData( range, maxpoints, dim, dataItr ),
215 double dataTmp[] = {
x, y };
227 double dataTmp[] = {
x,
y, z };
243 void Add(
const double *
x,
double w)
247 std::vector<double> tmpVec(
fDim);
248 std::copy( x, x +
fDim - 1, tmpVec.begin() );
257 double Weight(
unsigned int ipoint )
const 270 MATH_ERROR_MSG(
"UnBinData::WeightsPtr",
"The function is unweighted!");
288 void Append(
unsigned int newPoints,
unsigned int dim = 1,
bool isWeighted =
false )
UnBinData(unsigned int n, unsigned int dim, Iterator dataItr, bool isWeighted=false)
constructor for multi-dim external data (data are not copied inside) Uses as argument an iterator of ...
unsigned int NDim() const
return coordinate data dimension
Namespace for new ROOT classes and functions.
UnBinData(unsigned int maxpoints, const double *dataX, const DataRange &range)
constructor for 1D data and a range (data are copied inside according to the given range) ...
Base class for all the fit data types: Stores the coordinates and the DataOptions.
Class describing the unbinned data sets (just x coordinates values) of any dimensions.
UnBinData(unsigned int n, const double *dataX, const double *dataY, const double *dataZ, bool isWeighted=false)
constructor for 3D external data (data are not copied inside) or 2D data with a weight (if isWeighted...
const double * GetCoordComponent(unsigned int ipoint, unsigned int icoord) const
returns a single coordinate component of a point.
UnBinData(unsigned int maxpoints, const double *dataX, const double *dataY, const double *dataZ, const DataRange &range, bool isWeighted=false)
constructor for 3D data and a range (data are copied inside according to the given range) or a 2D dat...
void Append(unsigned int newPoints, unsigned int dim=1)
void Add(double x, double y)
add 2-dim coordinate data can also be used to add 1-dim data with a weight
UnBinData(const DataOptions &opt, const DataRange &range, unsigned int maxpoints=0, unsigned int dim=1, bool isWeighted=false)
constructor from options and range
#define MATH_ERROR_MSG(loc, str)
void Add(double x, double y, double z)
add 3-dim coordinate data can also be used to add 2-dim data with a weight
void Add(const double *x, double w)
add multi-dim coordinate data + weight
double Weight(unsigned int ipoint) const
return weight
DataOptions : simple structure holding the options on how the data are filled.
UnBinData & operator=(const UnBinData &)
assignment operator (private)
void Add(double x)
add one dim data with only coordinate and values
UnBinData(unsigned int n, const double *dataX)
constructor for 1D external data (data are not copied inside)
UnBinData(const UnBinData &)
copy constructor (private)
UnBinData(unsigned int maxpoints, unsigned int dim, Iterator dataItr, const DataRange &range, bool isWeighted=false)
constructor for multi-dim external data and a range (data are copied inside according to the range) U...
UnBinData(const DataRange &range, unsigned int maxpoints=0, unsigned int dim=1, bool isWeighted=false)
constructor from range and default option
virtual ~UnBinData()
destructor, delete pointer to internal data or external data wrapper
UnBinData(unsigned int n, const double *dataX, const double *dataY, bool isWeighted=false)
constructor for 2D external data (data are not copied inside) or 1D data with a weight (if isWeighted...
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)
void Add(double x)
preallocate a data set given size and dimension of the coordinates if a vector already exists with co...
void Append(unsigned int newPoints, unsigned int dim=1, bool isWeighted=false)
you should not use this method at all Int_t Int_t z
void Add(const double *x)
add multi-dim coordinate data
UnBinData(unsigned int maxpoints, const double *dataX, const double *dataY, const DataRange &range, bool isWeighted=false)
constructor for 2D data and a range (data are copied inside according to the given range) or 1 1D dat...
const double * WeightsPtr(unsigned int ipoint) const
UnBinData(unsigned int maxpoints=0, unsigned int dim=1, bool isWeighted=false)
constructor from dimension of point and max number of points (to pre-allocate vector) ...