Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
BinData.h
Go to the documentation of this file.
1// @(#)root/mathcore:$Id$
2// Author: L. Moneta Wed Aug 30 11:15:23 2006
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
7 * *
8 * *
9 **********************************************************************/
10
11// Header file for class BinData
12
13#ifndef ROOT_Fit_BinData
14#define ROOT_Fit_BinData
15
16#include "Fit/FitData.h"
17#include "Math/Error.h"
18#include <cmath>
19#include <vector>
20
21namespace ROOT {
22
23 namespace Fit {
24
25
26
27//___________________________________________________________________________________
28/**
29 Class describing the binned data sets :
30 vectors of x coordinates, y values and optionally error on y values and error on coordinates
31 The dimension of the coordinate is free
32 There are 4 different options:
33 - only coordinates and values (for binned likelihood fits) : kNoError
34 - coordinate, values and error on values (for normal least square fits) : kValueError
35 - coordinate, values, error on values and coordinates (for effective least square fits) : kCoordError
36 - coordinate, values, error on coordinates and asymmetric error on values : kAsymError
37
38 In addition there is the option to construct Bindata copying the data in (using the DataVector class)
39 or using pointer to external data (DataWrapper) class.
40 In general is found to be more efficient to copy the data.
41 In case of really large data sets for limiting memory consumption then the other option can be used
42 Specialized constructor exists for data up to 3 dimensions.
43
44 When the data are copying in the number of points can be set later (or re-set) using Initialize and
45 the data are inserted one by one using the Add method.
46 It is mandatory to set the size before using the Add method.
47
48 @ingroup FitData
49*/
50
51
52class BinData : public FitData {
53
54public :
55
57
58 /**
59 constructor from dimension of point and max number of points (to pre-allocate vector)
60 Give a zero value and then use Initialize later one if the size is not known
61 */
62
63 explicit BinData(unsigned int maxpoints = 0, unsigned int dim = 1,
65
66
67 /**
68 constructor from option and default range
69 */
70 explicit BinData (const DataOptions & opt, unsigned int maxpoints = 0,
71 unsigned int dim = 1, ErrorType err = kValueError);
72
73 /**
74 constructor from options and range
75 default is 1D and value errors
76 */
77 BinData (const DataOptions & opt, const DataRange & range,
78 unsigned int maxpoints = 0, unsigned int dim = 1, ErrorType err = kValueError );
79
80 /** constructors using external data */
81
82 /**
83 constructor from external data for 1D with errors on coordinate and value
84 */
85 BinData(unsigned int n, const double * dataX, const double * val,
86 const double * ex , const double * eval );
87
88 /**
89 constructor from external data for 2D with errors on coordinate and value
90 */
91 BinData(unsigned int n, const double * dataX, const double * dataY,
92 const double * val, const double * ex , const double * ey,
93 const double * eval );
94
95 /**
96 constructor from external data for 3D with errors on coordinate and value
97 */
98 BinData(unsigned int n, const double * dataX, const double * dataY,
99 const double * dataZ, const double * val, const double * ex ,
100 const double * ey , const double * ez , const double * eval );
101
102 /**
103 destructor
104 */
105 ~BinData() override;
106
107 /**
108 copy constructors
109 */
110 BinData(const BinData & rhs);
111
112 /// assignment operator
113 BinData & operator= ( const BinData & rhs );
114
115
116 /**
117 Preallocate a data set with given size, dimension and error type.
118 If the data set already exists, `newPoints` are appended to the existing data set.
119 (i.e., if the data exists Initialize() is equivalent to a `resize( NPoints() + maxpoints)`).
120 Initialize() and Append() are equivalent.
121 */
122 void Initialize( unsigned int newPoints, unsigned int dim = 1, ErrorType err = kValueError ){
123 Append(newPoints,dim,err);
124 }
125
126 /// Equivalent to Initialize()
127 void Append( unsigned int newPoints, unsigned int dim = 1, ErrorType err = kValueError );
128
129
130
131 /**
132 flag to control if data provides error on the coordinates
133 */
134 bool HaveCoordErrors() const {
135 assert ( fErrorType == kNoError ||
139
140 return fErrorType == kCoordError;
141 }
142
143 /**
144 flag to control if data provides asymmetric errors on the value
145 */
146 bool HaveAsymErrors() const {
147 assert ( fErrorType == kNoError ||
151
152 return fErrorType == kAsymError;
153 }
154
155
156 /**
157 apply a Log transformation of the data values
158 can be used for example when fitting an exponential or gaussian
159 Transform the data in place need to copy if want to preserve original data
160 The data sets must not contain negative values. IN case it does,
161 an empty data set is returned
162 */
164
165
166 /**
167 add one dim data with only coordinate and values
168 */
169 void Add( double x, double y );
170
171 /**
172 add one dim data with no error in the coordinate (x)
173 in this case store the inverse of the error in the value (y)
174 */
175 void Add( double x, double y, double ey );
176
177 /**
178 add one dim data with error in the coordinate (x)
179 in this case store the value (y) error and not the inverse
180 */
181 void Add( double x, double y, double ex, double ey );
182
183 /**
184 add one dim data with error in the coordinate (x) and asymmetric errors in the value (y)
185 in this case store the y errors and not the inverse
186 */
187 void Add( double x, double y, double ex, double eyl, double eyh );
188
189 /**
190 add multi-dim coordinate data with only value
191 */
192 void Add( const double* x, double val );
193
194 /**
195 add multi-dim coordinate data with only error in value
196 */
197 void Add( const double* x, double val, double eval );
198
199 /**
200 add multi-dim coordinate data with both error in coordinates and value
201 */
202 void Add( const double* x, double val, const double* ex, double eval );
203
204 /**
205 add multi-dim coordinate data with both error in coordinates and value
206 */
207 void Add( const double* x, double val, const double* ex, double elval, double ehval );
208
209 /**
210 add the bin width data, a pointer to an array with the bin upper edge information.
211 This is needed when fitting with integral options
212 The information is added for the previously inserted point.
213 BinData::Add must be called before
214 */
215 void AddBinUpEdge( const double* xup );
216
217 /**
218 return the value for the given fit point
219 */
220 double Value( unsigned int ipoint ) const
221 {
222 assert( ipoint < fMaxPoints );
223 assert( fDataPtr );
224 assert( fData.empty() || &fData.front() == fDataPtr );
225
226 return fDataPtr[ipoint];
227 }
228
229 /**
230 return a pointer to the value for the given fit point
231 */
232 const double *ValuePtr( unsigned int ipoint ) const
233 {
234 return &fDataPtr[ipoint];
235 }
236
237 /**
238 Return a pointer to the error (or the inverse error) on the value for a given point
239 depending on the type of data.
240 - If the data contains only value error (e.g. from histograms) returns a pointer to
241 the inverse of the errors.
242 - If the data contains errors in coordinates and value (e.g from TGraphErrors) returns a
243 pointer to the corresponding value error (NOT the inverse).
244 - If the data contains asymmetric errors return a pointer to the average error (NOT the inverse):
245 0.5(eu + el).
246 - If the data does not contain errors return a nullptr.
247 */
248
249 const double * ErrorPtr(unsigned int ipoint) const{
250 assert( ipoint < fMaxPoints );
251 assert( kValueError == fErrorType || kCoordError == fErrorType ||
253
254 if ( fErrorType == kNoError )
255 return nullptr;
256 return &fDataErrorPtr[ ipoint ];
257 }
258
259 /// Return the error on the given point.
260 /// Safer method returning in any case the error and not the inverse as in the
261 /// function above.
262 double Error( unsigned int ipoint ) const
263 {
264 assert( ipoint < fMaxPoints );
265 assert( kValueError == fErrorType || kCoordError == fErrorType ||
267
268 if ( fErrorType == kNoError )
269 {
271 assert( fDataError.empty() && fDataErrorHigh.empty() && fDataErrorLow.empty() );
272 return 1.0;
273 }
274
275 if ( fErrorType == kValueError ) // need to invert (inverror is stored)
276 {
278 assert( fDataErrorHigh.empty() && fDataErrorLow.empty() );
279 assert( fDataError.empty() || &fDataError.front() == fDataErrorPtr );
280
281 double eval = fDataErrorPtr[ ipoint ];
282
283 if (fWrapped)
284 return eval;
285 else
286 return (eval != 0.0) ? 1.0/eval : 0.0;
287 }
288
289 if ( fErrorType == kAsymError )
290 { // return 1/2(el + eh)
292 assert( fDataError.empty() );
293 assert( fDataErrorHigh.empty() || &fDataErrorHigh.front() == fDataErrorHighPtr );
294 assert( fDataErrorLow.empty() || &fDataErrorLow.front() == fDataErrorLowPtr );
295 assert( fDataErrorLow.empty() == fDataErrorHigh.empty() );
296
297 double eh = fDataErrorHighPtr[ ipoint ];
298 double el = fDataErrorLowPtr[ ipoint ];
299
300 return (el+eh) / 2.0;
301 }
302
303 assert( fErrorType == kCoordError );
304 return fDataErrorPtr[ ipoint ];
305 }
306
307 void GetAsymError( unsigned int ipoint, double& lowError, double& highError ) const
308 {
309 assert( fErrorType == kAsymError );
311 assert( fDataError.empty() );
312 assert( fDataErrorHigh.empty() || &fDataErrorHigh.front() == fDataErrorHighPtr );
313 assert( fDataErrorLow.empty() || &fDataErrorLow.front() == fDataErrorLowPtr );
314 assert( fDataErrorLow.empty() == fDataErrorHigh.empty() );
315
316 lowError = fDataErrorLowPtr[ ipoint ];
317 highError = fDataErrorHighPtr[ ipoint ];
318 }
319
320 /**
321 Return the inverse of error on the value for the given fit point
322 useful when error in the coordinates are not stored and then this is used directly this as the weight in
323 the least square function
324 */
325 double InvError( unsigned int ipoint ) const
326 {
327 assert( ipoint < fMaxPoints );
328 assert( kValueError == fErrorType || kCoordError == fErrorType ||
330
331 if ( fErrorType == kNoError )
332 {
334 assert( fDataError.empty() && fDataErrorHigh.empty() && fDataErrorLow.empty() );
335 return 1.0;
336 }
337
338 if ( fErrorType == kValueError ) // need to invert (inverror is stored)
339 {
341 assert( fDataErrorHigh.empty() && fDataErrorLow.empty() );
342 assert( fDataError.empty() || &fDataError.front() == fDataErrorPtr );
343
344 double eval = fDataErrorPtr[ ipoint ];
345
346 // in case of wrapped data the pointer stores the error and
347 // not the inverse
348 if (fWrapped)
349 return 1.0 / eval;
350 else
351 return (eval != 0.0) ? eval : 0.0;
352 }
353
354 if ( fErrorType == kAsymError ) {
355 // return inverse of 1/2(el + eh)
357 assert( fDataError.empty() );
358 assert( fDataErrorHigh.empty() || &fDataErrorHigh.front() == fDataErrorHighPtr );
359 assert( fDataErrorLow.empty() || &fDataErrorLow.front() == fDataErrorLowPtr );
360 assert( fDataErrorLow.empty() == fDataErrorHigh.empty() );
361
362 double eh = fDataErrorHighPtr[ ipoint ];
363 double el = fDataErrorLowPtr[ ipoint ];
364
365 return 2.0 / (el+eh);
366 }
367
368 assert( fErrorType == kCoordError );
369 // for coordinate error we store the error and not the inverse
370 return 1.0 / fDataErrorPtr[ ipoint ];
371 }
372
373
374 /**
375 retrieve at the same time a pointer to the coordinate data and the fit value
376 More efficient than calling Coords(i) and Value(i)
377 */
378 // not threadsafe, to be replaced with never constructs!
379 // for example: just return std::array or std::vector, there's
380 // is going to be only minor overhead in c++11.
381 const double * GetPoint( unsigned int ipoint, double & value ) const
382 {
383 assert( ipoint < fMaxPoints );
384 value = Value( ipoint );
385
386 return Coords( ipoint );
387 }
388
389 /**
390 returns a single coordinate error component of a point.
391 This function is threadsafe in contrast to Coords(...)
392 and can easily get vectorized by the compiler in loops
393 running over the ipoint-index.
394 */
395 double GetCoordErrorComponent( unsigned int ipoint, unsigned int icoord ) const
396 {
397 assert( ipoint < fMaxPoints );
398 assert( icoord < fDim );
399 assert( fCoordErrorsPtr.size() == fDim );
400 assert( fCoordErrorsPtr[icoord] );
401 assert( fCoordErrors.empty() || &fCoordErrors[icoord].front() == fCoordErrorsPtr[icoord] );
402
403 return fCoordErrorsPtr[icoord][ipoint];
404 }
405
406 /**
407 Return a pointer to the errors in the coordinates for the given fit point
408 */
409 // not threadsafe, to be replaced with never constructs!
410 // for example: just return std::array or std::vector, there's
411 // is going to be only minor overhead in c++11.
412 const double* CoordErrors( unsigned int ipoint ) const
413 {
414 assert( ipoint < fMaxPoints );
415 assert( fpTmpCoordErrorVector );
416 assert( fErrorType == kCoordError || fErrorType == kAsymError );
417
418 for ( unsigned int i=0; i < fDim; i++ )
419 {
420 assert( fCoordErrorsPtr[i] );
421 assert( fCoordErrors.empty() || &fCoordErrors[i].front() == fCoordErrorsPtr[i] );
422
424 }
425
427 }
428
429
430 /**
431 retrieve in a single call a pointer to the coordinate data, value and inverse error for
432 the given fit point.
433 To be used only when type is kValueError or kNoError. In the last case the value 1 is returned
434 for the error.
435 */
436 // not threadsafe, to be replaced with never constructs!
437 // for example: just return std::array or std::vector, there's
438 // is going to be only minor overhead in c++11.
439 const double* GetPoint( unsigned int ipoint, double & value, double & invError ) const
440 {
441 assert( ipoint < fMaxPoints );
442 assert( fErrorType == kNoError || fErrorType == kValueError );
443
444 double e = Error( ipoint );
445
446 if (fWrapped)
447 invError = e;
448 else
449 invError = ( e != 0.0 ) ? 1.0/e : 1.0;
450
451 return GetPoint( ipoint, value );
452 }
453
454 /**
455 Retrieve the errors on the point (coordinate and value) for the given fit point
456 It must be called only when the coordinate errors are stored otherwise it will produce an
457 assert.
458 */
459 // not threadsafe, to be replaced with never constructs!
460 // for example: just return std::array or std::vector, there's
461 // is going to be only minor overhead in c++11.
462 const double* GetPointError(unsigned int ipoint, double & errvalue) const
463 {
464 assert( ipoint < fMaxPoints );
465 assert( fErrorType == kCoordError || fErrorType == kAsymError );
466
467 errvalue = Error( ipoint );
468 return CoordErrors( ipoint );
469 }
470
471 /**
472 Get errors on the point (coordinate errors and asymmetric value errors) for the
473 given fit point.
474 It must be called only when the coordinate errors and asymmetric errors are stored
475 otherwise it will produce an assert.
476 */
477 // not threadsafe, to be replaced with never constructs!
478 // for example: just return std::array or std::vector, there's
479 // is going to be only minor overhead in c++11.
480 const double* GetPointError(unsigned int ipoint, double & errlow, double & errhigh) const
481 {
482 assert( ipoint < fMaxPoints );
483 assert( fErrorType == kAsymError );
485 assert( fDataError.empty() );
486 assert( fDataErrorHigh.empty() || &fDataErrorHigh.front() == fDataErrorHighPtr );
487 assert( fDataErrorLow.empty() || &fDataErrorLow.front() == fDataErrorLowPtr );
488 assert( fDataErrorLow.empty() == fDataErrorHigh.empty() );
489
490 errhigh = fDataErrorHighPtr[ ipoint ];
491 errlow = fDataErrorLowPtr[ ipoint ];
492
493 return CoordErrors( ipoint );
494 }
495
496 /**
497 returns a single coordinate error component of a point.
498 This function is threadsafe in contrast to Coords(...)
499 and can easily get vectorized by the compiler in loops
500 running over the ipoint-index.
501 */
502 double GetBinUpEdgeComponent( unsigned int ipoint, unsigned int icoord ) const
503 {
504 assert( icoord < fDim );
505 assert( !fBinEdge.empty() );
506 assert( ipoint < fBinEdge.front().size() );
507
508 return fBinEdge[icoord][ipoint];
509 }
510
511 /**
512 return an array containing the upper edge of the bin for coordinate i
513 In case of empty bin they could be merged in a single larger bin
514 Return a NULL pointer if the bin width is not stored
515 */
516 // not threadsafe, to be replaced with never constructs!
517 // for example: just return std::array or std::vector, there's
518 // is going to be only minor overhead in c++11.
519 const double* BinUpEdge( unsigned int ipoint ) const
520 {
521 if ( fBinEdge.empty() || ipoint > fBinEdge.front().size() )
522 return nullptr;
523
525
526 return fpTmpBinEdgeVector;
527 }
528
529 /**
530 * Thread save version of function retrieving the bin up-edge in case of multidimensions
531 */
532 void GetBinUpEdgeCoordinates(unsigned int ipoint, double * x) const
533 {
534 if (fBinEdge.empty() || ipoint > fBinEdge.front().size()) return;
535 assert(!fBinEdge.empty());
536 assert(ipoint < fMaxPoints);
537 for (unsigned int i = 0; i < fDim; i++) {
538 x[i] = fBinEdge[i][ipoint];
539 }
540 }
541
542 /**
543 query if the data store the bin edges instead of the center
544 */
545 bool HasBinEdges() const {
546 return fBinEdge.size() == fDim && !fBinEdge[0].empty();
547 }
548
549 /**
550 retrieve the reference volume used to normalize the data when the option bin volume is set
551 */
552 double RefVolume() const { return fRefVolume; }
553
554 /**
555 set the reference volume used to normalize the data when the option bin volume is set
556 */
557 void SetRefVolume(double value) { fRefVolume = value; }
558
559 /**
560 retrieve the errortype
561 */
563 {
564 return fErrorType;
565 }
566
567 /**
568 compute the total sum of the data content
569 (sum of weights in case of weighted data set)
570 */
571 double SumOfContent() const { return fSumContent; }
572
573 /**
574 compute the total sum of the error square
575 (sum of weight square in case of a weighted data set)
576 */
577 double SumOfError2() const { return fSumError2;}
578
579 /**
580 return true if the data set is weighted
581 We cannot compute ourselves because sometimes errors are filled with 1
582 instead of zero (as in ROOT::Fit::FillData )
583 */
584 bool IsWeighted() const {
585 return fIsWeighted;
586 }
587
588protected:
589 void InitDataVector ();
590
591 void InitializeErrors();
592
593 void InitBinEdge();
594
595 void UnWrap( );
596
597 // compute sum of content and error squares
598 void ComputeSums();
599
600private:
601
603 bool fIsWeighted = false; ///< flag to indicate weighted data
604 double fRefVolume; ///< reference bin volume - used to normalize the bins in case of variable bins data
605 double fSumContent = 0; ///< total sum of the bin data content
606 double fSumError2 = 0; ///< total sum square of the errors
607
608 /**
609 * Stores the data values the same way as the coordinates.
610 *
611 */
612 std::vector< double > fData;
613 const double* fDataPtr;
614
615 std::vector< std::vector< double > > fCoordErrors;
616 std::vector< const double* > fCoordErrorsPtr;
617 // This vector contains the coordinate errors
618 // in the same way as fCoords.
619
620 std::vector< double > fDataError;
621 std::vector< double > fDataErrorHigh;
622 std::vector< double > fDataErrorLow;
623 const double* fDataErrorPtr;
624 const double* fDataErrorHighPtr;
625 const double* fDataErrorLowPtr;
626 // This vector contains the data error.
627 // Either only fDataError or fDataErrorHigh and fDataErrorLow are used.
628
629 double* fpTmpCoordErrorVector; ///< not threadsafe stuff!
630
631 std::vector< std::vector< double > > fBinEdge;
632 // vector containing the bin upper edge (coordinate will contain low edge)
633
634 double* fpTmpBinEdgeVector; ///< not threadsafe stuff!
635};
636
637
638 } // end namespace Fit
639
640} // end namespace ROOT
641
642
643
644#endif /* ROOT_Fit_BinData */
#define e(i)
Definition RSha256.hxx:103
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
Definition BinData.h:52
double SumOfContent() const
compute the total sum of the data content (sum of weights in case of weighted data set)
Definition BinData.h:571
double RefVolume() const
retrieve the reference volume used to normalize the data when the option bin volume is set
Definition BinData.h:552
const double * fDataErrorHighPtr
Definition BinData.h:624
~BinData() override
destructor
Definition BinData.cxx:188
const double * CoordErrors(unsigned int ipoint) const
Return a pointer to the errors in the coordinates for the given fit point.
Definition BinData.h:412
const double * GetPointError(unsigned int ipoint, double &errlow, double &errhigh) const
Get errors on the point (coordinate errors and asymmetric value errors) for the given fit point.
Definition BinData.h:480
const double * fDataPtr
Definition BinData.h:613
std::vector< double > fData
Stores the data values the same way as the coordinates.
Definition BinData.h:612
void InitializeErrors()
Definition BinData.cxx:651
double GetBinUpEdgeComponent(unsigned int ipoint, unsigned int icoord) const
returns a single coordinate error component of a point.
Definition BinData.h:502
bool HasBinEdges() const
query if the data store the bin edges instead of the center
Definition BinData.h:545
std::vector< const double * > fCoordErrorsPtr
Definition BinData.h:616
void Append(unsigned int newPoints, unsigned int dim=1, ErrorType err=kValueError)
Equivalent to Initialize()
Definition BinData.cxx:320
const double * GetPointError(unsigned int ipoint, double &errvalue) const
Retrieve the errors on the point (coordinate and value) for the given fit point It must be called onl...
Definition BinData.h:462
std::vector< double > fDataErrorLow
Definition BinData.h:622
const double * GetPoint(unsigned int ipoint, double &value) const
retrieve at the same time a pointer to the coordinate data and the fit value More efficient than call...
Definition BinData.h:381
void AddBinUpEdge(const double *xup)
add the bin width data, a pointer to an array with the bin upper edge information.
Definition BinData.cxx:613
const double * BinUpEdge(unsigned int ipoint) const
return an array containing the upper edge of the bin for coordinate i In case of empty bin they could...
Definition BinData.h:519
const double * fDataErrorLowPtr
Definition BinData.h:625
std::vector< double > fDataErrorHigh
Definition BinData.h:621
double InvError(unsigned int ipoint) const
Return the inverse of error on the value for the given fit point useful when error in the coordinates...
Definition BinData.h:325
BinData & LogTransform()
apply a Log transformation of the data values can be used for example when fitting an exponential or ...
Definition BinData.cxx:349
bool IsWeighted() const
return true if the data set is weighted We cannot compute ourselves because sometimes errors are fill...
Definition BinData.h:584
const double * ErrorPtr(unsigned int ipoint) const
Return a pointer to the error (or the inverse error) on the value for a given point depending on the ...
Definition BinData.h:249
ErrorType fErrorType
Definition BinData.h:602
double * fpTmpCoordErrorVector
not threadsafe stuff!
Definition BinData.h:629
double Value(unsigned int ipoint) const
return the value for the given fit point
Definition BinData.h:220
void SetRefVolume(double value)
set the reference volume used to normalize the data when the option bin volume is set
Definition BinData.h:557
bool fIsWeighted
flag to indicate weighted data
Definition BinData.h:603
std::vector< std::vector< double > > fCoordErrors
Definition BinData.h:615
ErrorType GetErrorType() const
retrieve the errortype
Definition BinData.h:562
void Add(double x, double y)
add one dim data with only coordinate and values
Definition BinData.cxx:408
bool HaveCoordErrors() const
flag to control if data provides error on the coordinates
Definition BinData.h:134
double fSumContent
total sum of the bin data content
Definition BinData.h:605
const double * ValuePtr(unsigned int ipoint) const
return a pointer to the value for the given fit point
Definition BinData.h:232
void Initialize(unsigned int newPoints, unsigned int dim=1, ErrorType err=kValueError)
Preallocate a data set with given size, dimension and error type.
Definition BinData.h:122
double GetCoordErrorComponent(unsigned int ipoint, unsigned int icoord) const
returns a single coordinate error component of a point.
Definition BinData.h:395
BinData & operator=(const BinData &rhs)
assignment operator
Definition BinData.cxx:230
std::vector< std::vector< double > > fBinEdge
Definition BinData.h:631
void GetAsymError(unsigned int ipoint, double &lowError, double &highError) const
Definition BinData.h:307
double fRefVolume
reference bin volume - used to normalize the bins in case of variable bins data
Definition BinData.h:604
void GetBinUpEdgeCoordinates(unsigned int ipoint, double *x) const
Thread save version of function retrieving the bin up-edge in case of multidimensions.
Definition BinData.h:532
const double * fDataErrorPtr
Definition BinData.h:623
double fSumError2
total sum square of the errors
Definition BinData.h:606
double * fpTmpBinEdgeVector
not threadsafe stuff!
Definition BinData.h:634
std::vector< double > fDataError
Definition BinData.h:620
double Error(unsigned int ipoint) const
Return the error on the given point.
Definition BinData.h:262
bool HaveAsymErrors() const
flag to control if data provides asymmetric errors on the value
Definition BinData.h:146
double SumOfError2() const
compute the total sum of the error square (sum of weight square in case of a weighted data set)
Definition BinData.h:577
const double * GetPoint(unsigned int ipoint, double &value, double &invError) const
retrieve in a single call a pointer to the coordinate data, value and inverse error for the given fit...
Definition BinData.h:439
class describing the range in the coordinates it supports multiple range in a coordinate.
Definition DataRange.h:35
Base class for all the fit data types: Stores the coordinates and the DataOptions.
Definition FitData.h:56
unsigned int fMaxPoints
Definition FitData.h:384
unsigned int fDim
Definition FitData.h:386
const double * Coords(unsigned int ipoint) const
return a pointer to the coordinates data for the given fit point
Definition FitData.h:236
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
Double_t ey[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
Double_t ex[n]
Definition legend1.C:17
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Definition HFitImpl.cxx:133
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.
Definition DataOptions.h:28