Class describing the un-binned data sets (just x coordinates values) of any dimensions.
There is the option to construct UnBindata copying the data inside (in the base FitData class) or using a pointer to external data, depending on which constructor of the UnBinData class is used. It is recommended to copy the input data inside, since this will be more efficient and less error prone, since the input provided data will have to be kept alive for all the time the Fit classes will be used. In case of really large data sets for limiting memory consumption then the other option can be used with special care. Specialized constructor exists for using external data up to 3 dimensions.
When the data are copying in the number of points can be set later (or re-set) using Initialize and the data are inserted one by one using the Add method. It is mandatory to set the size before using the Add method.
Definition at line 46 of file UnBinData.h.
Public Member Functions | |
UnBinData (const DataOptions &opt, const DataRange &range, unsigned int maxpoints=0, unsigned int dim=1, bool isWeighted=false) | |
constructor from options and range | |
UnBinData (const DataRange &range, unsigned int maxpoints=0, unsigned int dim=1, bool isWeighted=false) | |
constructor from range and default option | |
UnBinData (const UnBinData &) | |
copy constructor | |
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) | |
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 data set + weight. | |
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 data set + weights. | |
template<class Iterator > | |
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) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin | |
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) | |
UnBinData (unsigned int n, const double *dataX) | |
constructor for 1D external data (data are not copied inside) | |
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 = true) | |
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 = true) | |
template<class Iterator > | |
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 a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin In case of weighted data, the external data must have a dim+1 lists of data The passed dim refers just to the coordinate size | |
~UnBinData () override | |
destructor, delete pointer to internal data or external data wrapper | |
void | Add (const double *x) |
add multi-dim coordinate data | |
void | Add (const double *x, double w) |
add multi-dim coordinate data + weight | |
void | Add (double x) |
add one dim coordinate data (unweighted) | |
void | Add (double x, double y) |
add 2-dim coordinate data can also be used to add 1-dim data with a weight | |
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 | Append (unsigned int newPoints, unsigned int dim=1, bool isWeighted=false) |
bool | IsWeighted () const |
unsigned int | NDim () const |
return coordinate data dimension | |
UnBinData & | operator= (const UnBinData &) |
assignment operator | |
double | Weight (unsigned int ipoint) const |
return weight | |
const double * | WeightsPtr (unsigned int ipoint) const |
Public Member Functions inherited from ROOT::Fit::FitData | |
FitData (const DataOptions &opt, const DataRange &range, unsigned int maxpoints=0, unsigned int dim=1) | |
construct passing options and data range | |
FitData (const DataOptions &opt, unsigned int maxpoints=0, unsigned int dim=1) | |
construct passing options and default data range | |
FitData (const DataRange &range, unsigned int maxpoints, const double *dataX) | |
constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin | |
FitData (const DataRange &range, unsigned int maxpoints, const double *dataX, const double *dataY) | |
constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin | |
FitData (const DataRange &range, unsigned int maxpoints, const double *dataX, const double *dataY, const double *dataZ) | |
constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin | |
template<class Iterator > | |
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) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin | |
FitData (const DataRange &range, unsigned int maxpoints=0, unsigned int dim=1) | |
construct passing range and default options | |
FitData (const FitData &rhs) | |
FitData (unsigned int maxpoints=0, unsigned int dim=1) | |
construct with default option and data range | |
FitData (unsigned int n, const double *dataX) | |
constructor from external data for 1D data | |
FitData (unsigned int n, const double *dataX, const double *dataY) | |
constructor from external data for 2D data | |
FitData (unsigned int n, const double *dataX, const double *dataY, const double *dataZ) | |
constructor from external data for 3D data | |
template<class Iterator > | |
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 a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin In case of weighted data, the external data must have a dim+1 lists of data The passed dim refers just to the coordinate size | |
virtual | ~FitData () |
dummy virtual destructor | |
void | Add (const double *x) |
add multi-dim coordinate data with only value | |
void | Add (double x) |
add one dim data with only coordinate and values | |
void | Append (unsigned int newPoints, unsigned int dim=1) |
const double * | Coords (unsigned int ipoint) const |
return a pointer to the coordinates data for the given fit point | |
const double * | GetCoordComponent (unsigned int ipoint, unsigned int icoord) const |
returns a single coordinate component of a point. | |
const std::vector< const double * > & | GetCoordDataPtrs () const |
direct access to coord data ptrs | |
unsigned int | NDim () const |
return coordinate data dimension | |
unsigned int | NPoints () const |
return number of fit points | |
FitData & | operator= (const FitData &rhs) |
DataOptions & | Opt () |
const DataOptions & | Opt () const |
access to options | |
const DataRange & | Range () const |
access to range | |
unsigned int | Size () const |
return number of fit points | |
Private Attributes | |
bool | fWeighted |
Additional Inherited Members | |
Protected Member Functions inherited from ROOT::Fit::FitData | |
void | InitCoordsVector () |
initializer routines to set the corresponding pointers right The vectors must NOT be resized after this initialization without setting the corresponding pointers in the same moment ( has to be an atomic operation in case of multithreading ). | |
template<class Iterator > | |
void | InitFromRange (Iterator dataItr) |
void | UnWrap () |
Static Protected Member Functions inherited from ROOT::Fit::FitData | |
static constexpr unsigned | VectorPadding (const unsigned) |
If VecCore is not defined, there is no vectorization available and the SIMD vector size will always be one. | |
Protected Attributes inherited from ROOT::Fit::FitData | |
unsigned int | fDim |
unsigned int | fMaxPoints |
unsigned int | fNPoints |
bool | fWrapped |
#include <Fit/UnBinData.h>
|
inlineexplicit |
constructor from dimension of point and max number of points (to pre-allocate vector)
Definition at line 54 of file UnBinData.h.
|
inlineexplicit |
constructor from range and default option
Definition at line 67 of file UnBinData.h.
|
inline |
constructor from options and range
Definition at line 79 of file UnBinData.h.
constructor for 1D external data (data are not copied inside)
Definition at line 91 of file UnBinData.h.
|
inline |
constructor for 2D external data (data are not copied inside) or 1D data with a weight (if isWeighted = true)
Definition at line 101 of file UnBinData.h.
|
inline |
constructor for 3D external data (data are not copied inside) or 2D data with a weight (if isWeighted = true)
Definition at line 112 of file UnBinData.h.
|
inline |
constructor for multi-dim external data (data are not copied inside) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin In case of weighted data, the external data must have a dim+1 lists of data The passed dim refers just to the coordinate size
Definition at line 127 of file UnBinData.h.
|
inline |
constructor for 1D data and a range (data are copied inside according to the given range)
Definition at line 139 of file UnBinData.h.
|
inline |
constructor for 2D data and a range (data are copied inside according to the given range) or 1 1D data set + weight.
If is weighted dataY is the pointer to the list of the weights
Definition at line 150 of file UnBinData.h.
|
inline |
constructor for 3D data and a range (data are copied inside according to the given range) or a 2D data set + weights.
If is weighted dataZ is the pointer to the list of the weights
Definition at line 161 of file UnBinData.h.
|
inline |
constructor for multi-dim external data and a range (data are copied inside according to the range) Uses as argument an iterator of a list (or vector) containing the const double * of the data An example could be the std::vector<const double *>::begin
Definition at line 174 of file UnBinData.h.
ROOT::Fit::UnBinData::UnBinData | ( | const UnBinData & | rhs | ) |
copy constructor
Definition at line 24 of file UnBinData.cxx.
|
inlineoverride |
destructor, delete pointer to internal data or external data wrapper
Definition at line 189 of file UnBinData.h.
|
inline |
add multi-dim coordinate data
Definition at line 230 of file UnBinData.h.
add multi-dim coordinate data + weight
Definition at line 238 of file UnBinData.h.
|
inline |
add one dim coordinate data (unweighted)
Definition at line 195 of file UnBinData.h.
add 2-dim coordinate data can also be used to add 1-dim data with a weight
Definition at line 207 of file UnBinData.h.
add 3-dim coordinate data can also be used to add 2-dim data with a weight
Definition at line 219 of file UnBinData.h.
|
inline |
Definition at line 283 of file UnBinData.h.
|
inline |
Definition at line 278 of file UnBinData.h.
|
inline |
return coordinate data dimension
Definition at line 275 of file UnBinData.h.
assignment operator
Definition at line 30 of file UnBinData.cxx.
return weight
Definition at line 252 of file UnBinData.h.
Definition at line 260 of file UnBinData.h.
|
private |
Definition at line 293 of file UnBinData.h.