All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
HistoStats.cpp
Go to the documentation of this file.
1 #ifdef __ICC
2 // disable icc remark #1572: floating-point equality and inequality comparisons are unreliable
3 // The comparisons are meant
4 #pragma warning(disable:1572)
5 #endif
6 // ============================================================================
7 // Include files
8 // ============================================================================
9 // STD & STL
10 // ============================================================================
11 #include <cmath>
12 #include <limits>
13 #include <climits>
14 // ============================================================================
15 // AIDA
16 // ============================================================================
17 #include "AIDA/IHistogram1D.h"
18 #include "AIDA/IAxis.h"
19 // ============================================================================
20 // GaudiUtils
21 // ============================================================================
22 #include "GaudiUtils/HistoStats.h"
23 // ============================================================================
29 // ============================================================================
30 namespace
31 {
32  // ==========================================================================
34  const double s_bad = std::numeric_limits<float>::lowest() ;
36  const long s_long_bad = std::numeric_limits<int>::min() ;
37  // ==========================================================================
38 }
39 // ============================================================================
40 /* get the moment of the certain around the specified "value"
41  * @param histo histogram
42  * @param order the momentm order
43  * @param value central value
44  * @return the evaluated moment
45  */
46 // ============================================================================
48 ( const AIDA::IHistogram1D* histo ,
49  const unsigned int order ,
50  const double value )
51 {
52  if ( !histo ) { return s_bad ; } // RETURN
53  if ( 0 == order ) { return 1.0 ; } // RETURN
54  if ( 1 == order ) { return mean( histo ) - value ; } // RETURN
55  if ( 2 == order )
56  {
57  const auto _r = rms ( histo ) ;
58  const auto _d = value - mean ( histo ) ;
59  return std::pow(_r,2) + std::pow(_d,2) ; // RETURN
60  }
61  const auto n = nEff ( histo ) ;
62  if ( 0 >= n ) { return 0.0 ; } // RETURN
63 
64  // get the exis
65  const auto & axis = histo -> axis () ;
66  // number of bins
67  const auto nBins = axis.bins() ;
68  double result{0}, weight{0};
69  // loop over all bins
70  for ( int i = 0 ; i < nBins ; ++i )
71  {
72  const auto lE = axis . binLowerEdge ( i ) ;
73  const auto uE = axis . binUpperEdge ( i ) ;
74  //
75  const auto yBin = histo -> binHeight ( i ) ; // bin weight
76  const double xBin = 0.5 * ( lE + uE ) ; // bin center
77  //
78  weight += yBin ;
79  result += yBin * std::pow ( xBin - value , order ) ;
80  }
81  if ( 0 != weight ) { result /= weight ; }
82  return result ;
83 }
84 // ============================================================================
91 // ============================================================================
93 ( const AIDA::IHistogram1D* histo ,
94  const unsigned int order )
95 {
96  if ( !histo ) { return s_bad ; } // RETURN
97  const auto n = nEff ( histo ) ;
98  if ( 0 >= n ) { return 0.0 ; } // RETURN
99  const auto a2o = moment ( histo , 2 * order ) ; // a(2o)
100  const auto ao = moment ( histo , order ) ; // a(o)
101  const auto result = std::max ( 0.0 , ( a2o - std::pow(ao,2) ) / n ) ;
102  return std::sqrt ( result ) ; // RETURN
103 }
104 // ============================================================================
105 /* evaluate the central momentum (around the mean value)
106  * @param histo histogram
107  * @param order the momentm order
108  * @param value central value
109  * @return the evaluated central moment
110  */
111 // ============================================================================
113 ( const AIDA::IHistogram1D* histo ,
114  const unsigned int order )
115 {
116  if ( !histo ) { return s_bad ; } // RETURN
117  if ( 0 == order ) { return 1.0 ; } // RETURN
118  if ( 1 == order ) { return 0.0 ; } // RETURN
119  if ( 2 == order )
120  {
121  return std::pow( histo->rms(), 2 ); // RETURN
122  }
123  // delegate the actual evaluation to another method:
124  return moment ( histo , order , mean ( histo ) ) ;
125 }
126 // ============================================================================
127 /* evaluate the uncertanty for 'bin-by-bin'-central momentum
128  * (around the mean value)
129  * ( the uncertanty is calculated with O(1/n2) precision)
130  * @param histo histogram
131  * @param order the moment parameter
132  * @param value central value
133  * @return the evaluated uncertanty in the central moment
134  */
135 // ============================================================================
137 ( const AIDA::IHistogram1D* histo ,
138  const unsigned int order )
139 {
140  if ( !histo ) { return s_bad ; } // RETURN
141  const auto n = nEff ( histo ) ;
142  if ( 0 >= n ) { return 0.0 ; } // RETURN
143  const auto mu2 = centralMoment ( histo , 2 ) ; // mu(2)
144  const auto muo = centralMoment ( histo , order ) ; // mu(o)
145  const auto mu2o = centralMoment ( histo , 2 * order ) ; // mu(2o)
146  const auto muom = centralMoment ( histo , order - 1 ) ; // mu(o-1)
147  const auto muop = centralMoment ( histo , order + 1 ) ; // mu(o+1)
148  const auto result = ( mu2o
149  - ( 2.0 * order * muom * muop )
150  - std::pow(muo,2)
151  + ( order * order * mu2 * muom * muom ) ) / n ;
152  return std::sqrt ( std::max ( 0.0 , result ) ) ; // RETURN
153 }
154 // ============================================================================
155 // get the skewness for the histogram
156 // ============================================================================
158 ( const AIDA::IHistogram1D* histo )
159 {
160  if ( !histo ) { return s_bad ; } // RETURN
161  const auto mu3 = centralMoment ( histo , 3 ) ;
162  const auto s3 = std::pow ( rms ( histo ) , 3 ) ;
163  return ( std::fabs(s3)>0 ? mu3/s3 : 0.0 );
164 }
165 // ============================================================================
166 // get the error in skewness
167 // ============================================================================
169 ( const AIDA::IHistogram1D* histo )
170 {
171  if ( !histo ) { return s_bad ; } // RETURN
172  const auto n = nEff ( histo ) ;
173  if ( 2 > n ) { return 0.0 ; } // RETURN
174  const auto result = 6.0 * ( n - 2 ) / ( ( n + 1 ) * ( n + 3 ) );
175  return std::sqrt ( result ) ;
176 }
177 // ============================================================================
178 // get the kurtosis for the histogram
179 // ============================================================================
181 ( const AIDA::IHistogram1D* histo )
182 {
183  if ( !histo ) { return s_bad ; } // RETURN
184  const auto mu4 = centralMoment ( histo , 4 ) ;
185  const auto s4 = std::pow ( rms ( histo ) , 4 ) ;
186  return ( std::fabs(s4)>0 ? mu4/s4 - 3.0 : 0.0 );
187 }
188 // ============================================================================
189 // get the error in kurtosis
190 // ============================================================================
192 ( const AIDA::IHistogram1D* histo )
193 {
194  if ( !histo ) { return s_bad ; } // RETURN
195  const auto n = nEff ( histo ) ;
196  if ( 3 > n ) { return 0.0 ; } // RETURN
197  auto result = 24.0 * n ;
198  result *= ( n - 2 ) * ( n - 3 ) ;
199  result /= ( n + 1 ) * ( n + 1 ) ;
200  result /= ( n + 3 ) * ( n + 5 ) ;
201  return std::sqrt ( result ) ;
202 }
203 // ============================================================================
204 // get the effective entries
205 // ============================================================================
207 ( const AIDA::IHistogram1D* histo )
208 {
209  return ( histo ? histo->equivalentBinEntries() : s_bad );
210 }
211 // ============================================================================
212 // get the mean value for the histogram
213 // ============================================================================
215 ( const AIDA::IHistogram1D* histo )
216 {
217  return ( histo ? histo -> mean() : s_bad );
218 }
219 // ============================================================================
220 // get an error in the mean value
221 // ============================================================================
223 ( const AIDA::IHistogram1D* histo )
224 {
225  if ( !histo ) { return s_bad ; }
226  const auto n = nEff ( histo ) ;
227  return ( 0 >= n ? 0.0 : rms ( histo ) / std::sqrt ( n ) );
228 }
229 // ============================================================================
230 // get the rms value for the histogram
231 // ============================================================================
233 ( const AIDA::IHistogram1D* histo )
234 {
235  return ( histo ? histo -> rms () : s_bad );
236 }
237 // ============================================================================
238 // get the error in rms
239 // ============================================================================
241 ( const AIDA::IHistogram1D* histo )
242 {
243  if ( !histo ) { return s_bad ; }
244  const auto n = nEff ( histo ) ;
245  if ( 1 >= n ) { return 0.0 ; }
246  auto result = 2.0 + kurtosis ( histo ) ;
247  result += 2.0 / ( n - 1 ) ;
248  result /= 4.0 * n ;
249  return histo -> rms() * std::sqrt ( std::max ( result , 0.0 ) ) ;
250 }
251 // ============================================================================
252 // get an error in the sum bin height ("in range integral")
253 // ============================================================================
255 ( const AIDA::IHistogram1D* histo )
256 {
257  if ( !histo ) { return s_bad ; }
258  //
259  double error2 = 0 ;
260  // get the exis
261  const auto & axis = histo -> axis () ;
262  // number of bins
263  const auto nBins = axis.bins() ;
264  // loop over all bins
265  for ( int i = 0 ; i < nBins ; ++i )
266  {
267  // accumulate the errors in each bin
268  error2 += std::pow( histo->binError(i), 2 ) ;
269  }
270  return std::sqrt ( error2 ) ;
271 }
272 // ============================================================================
273 // get an error in the sum all bin height ("integral")
274 // ============================================================================
276 ( const AIDA::IHistogram1D* histo )
277 {
278  if ( !histo ) { return s_bad ; }
279  //
280  const auto error = sumBinHeightErr( histo ) ;
281  if ( 0 > error ) { return s_bad ; }
283  const auto err1 = histo->binError ( AIDA::IAxis::UNDERFLOW_BIN ) ;
284  const auto err2 = histo->binError ( AIDA::IAxis::OVERFLOW_BIN ) ;
285  //
286  return std::sqrt ( std::pow(error,2) + std::pow(err1,2) + std::pow(err2,2) ) ;
287 }
288 // ============================================================================
289 // the fraction of overflow entries (useful for shape comparison)
290 // ============================================================================
292 ( const AIDA::IHistogram1D* histo )
293 {
294  if ( !histo ) { return s_bad ; } // REUTRN
295  const auto overflow = histo -> binEntries ( AIDA::IAxis::OVERFLOW_BIN ) ;
296  if ( 0 == overflow ) { return 0 ; } // REUTRN
297  const auto all = histo->allEntries() ;
298  if ( 0 == all ) { return 0 ; } // "CONVENTION?" RETURN
299  if ( 0 > all ) { return s_bad ; } // Lets be a bit paranoic, RETURN
300  //
301  return (double) overflow / (double) all;
302 }
303 // ============================================================================
304 // the fraction of underflow entries (useful for shape comparison)
305 // ============================================================================
307 ( const AIDA::IHistogram1D* histo )
308 {
309  if ( !histo ) { return s_bad ; } // REUTRN
310  const auto underflow = histo -> binEntries ( AIDA::IAxis::UNDERFLOW_BIN ) ;
311  if ( 0 == underflow ) { return 0 ; } // REUTRN
312  const auto all = histo->allEntries() ;
313  if ( 0 == all ) { return 0 ; } // "CONVENTION?" RETURN
314  if ( 0 > all ) { return s_bad ; } // Lets be a bit paranoic, RETURN
315  //
316  return (double) underflow / (double) all;
317 }
318 // ============================================================================
319 // the fraction of overflow integral (useful for shape comparison)
320 // ============================================================================
322 ( const AIDA::IHistogram1D* histo )
323 {
324  if ( !histo ) { return s_bad ; } // REUTRN
325  const auto overflow = histo -> binHeight ( AIDA::IAxis::OVERFLOW_BIN ) ;
326  if ( 0 == overflow ) { return 0 ; } // REUTRN
327  const auto all = histo -> sumAllBinHeights() ;
328  if ( 0 == all ) { return 0 ; } // "CONVENTION?" RETURN
329  //
330  return (double)overflow / (double)all ;
331 }
332 // ============================================================================
333 // the fraction of underflow entries (useful for shape comparison)
334 // ============================================================================
336 ( const AIDA::IHistogram1D* histo )
337 {
338  if ( !histo ) { return s_bad ; } // REUTRN
339  const auto underflow = histo -> binHeight ( AIDA::IAxis::UNDERFLOW_BIN ) ;
340  if ( 0 == underflow ) { return 0 ; } // REUTRN
341  const auto all = histo -> sumAllBinHeights() ;
342  if ( 0 == all ) { return 0 ; } // "CONVENTION?" RETURN
343  //
344  return (double)underflow / (double)all ;
345 }
346 // ============================================================================
347 // error on fraction of overflow entries (useful for shape comparison)
348 // ============================================================================
350 ( const AIDA::IHistogram1D* histo )
351 {
352  if ( !histo ) { return s_bad ; } // RETURN
353  //
354  const auto overflow = histo -> binEntries ( AIDA::IAxis::OVERFLOW_BIN );
355  const auto all = histo -> allEntries () ;
356  //
357  if ( 0 > overflow || 0 >= all || overflow > all ) { return s_bad ; }
358  //
359  const double n = std::max ( (double)overflow , 1.0 ) ;
360  const double N = all ;
361  const double n1 = std::max ( N - n , 1.0 ) ;
362  //
363  return std::sqrt ( n * ( n1 / N ) ) / N ; // use the binomial formula
364 }
365 // ============================================================================
366 // error on fraction of underflow entries (useful for shape comparison)
367 // ============================================================================
369 ( const AIDA::IHistogram1D* histo )
370 {
371  if ( !histo ) { return s_bad ; } // RETURN
372  //
373  const auto underflow = histo -> binEntries ( AIDA::IAxis::UNDERFLOW_BIN );
374  const auto all = histo -> allEntries () ;
375  //
376  if ( 0 > underflow || 0 >= all || underflow > all ) { return s_bad ; }
377  //
378  const double n = std::max ( (double)underflow , 1.0 ) ;
379  const double N = all ;
380  const double n1 = std::max ( N - n , 1.0 ) ;
381  //
382  return std::sqrt ( n * ( n1 / N ) ) / N ; // use the binomial formula
383 }
384 // ============================================================================
385 // the error on fraction of overflow intergal
386 // ============================================================================
388 ( const AIDA::IHistogram1D* histo )
389 {
390  if ( !histo ) { return s_bad ; } // RETURN
391  //
392  const auto all = histo -> sumAllBinHeights () ;
393  if ( 0 == all ) { return s_bad ; } // RETURN
394  const auto overflow = histo -> binHeight ( AIDA::IAxis::OVERFLOW_BIN ) ;
395  const auto oErr = histo -> binError ( AIDA::IAxis::OVERFLOW_BIN ) ;
396  if ( 0 > oErr ) { return s_bad ; } // RETURN
397  const auto aErr = sumAllBinHeightErr ( histo ) ;
398  if ( 0 > aErr ) { return s_bad ; } // RETURN
399  //
400  double error2 = std::pow((double)oErr,2) ;
401  error2 += ( std::pow((double)aErr,2) *
402  std::pow((double)overflow,2) / std::pow((double)all,2) );
403  error2 /= std::pow((double)all,2) ;
404  //
405  return std::sqrt ( error2 ) ;
406 }
407 // ============================================================================
408 // the error on fraction of overflow intergal
409 // ============================================================================
411 ( const AIDA::IHistogram1D* histo )
412 {
413  if ( !histo ) { return s_bad ; } // RETURN
414  //
415  const auto all = histo -> sumAllBinHeights () ;
416  if ( 0 == all ) { return s_bad ; } // RETURN
417  const auto underflow = histo -> binHeight ( AIDA::IAxis::UNDERFLOW_BIN ) ;
418  const auto oErr = histo -> binError ( AIDA::IAxis::UNDERFLOW_BIN ) ;
419  if ( 0 > oErr ) { return s_bad ; } // RETURN
420  const auto aErr = sumAllBinHeightErr ( histo ) ;
421  if ( 0 > aErr ) { return s_bad ; } // RETURN
422  //
423  double error2 = std::pow((double)oErr,2) ;
424  error2 += ( std::pow((double)aErr,2) *
425  std::pow((double)underflow,2) / std::pow((double)all,2) );
426  error2 /= std::pow((double)all,2) ;
427  //
428  return std::sqrt ( error2 ) ;
429 }
430 // ============================================================================
431 /* get number of entries in histogram up to the certain
432  * bin (not-included)
433  * @attention underflow bin is included!
434  * @param histo the pointer to the histogram
435  * @param imax the bin number (not included)
436  * @param number of entries
437  */
438 // ============================================================================
440 ( const AIDA::IHistogram1D* histo ,
441  const int imax )
442 {
443  if ( !histo ) { return s_long_bad ; } // RETURN
444  if ( 0 > imax ) { return 0 ; } // RETURN
445  long result = histo -> binEntries( AIDA::IAxis::UNDERFLOW_BIN ) ;
446 
447  // get the exis
448  const auto& axis = histo -> axis () ;
449  // number of bins
450  const auto nBins = axis.bins() ;
451  // loop over all bins
452  for ( int i = 0 ; i < nBins ; ++i )
453  { if ( i < imax ) { result += histo->binEntries ( i ) ; } }
454  //
455  if ( nBins < imax )
456  { result += histo -> binEntries( AIDA::IAxis::OVERFLOW_BIN ) ; }
457  //
458  return result ;
459 }
460 // ============================================================================
461 /* get number of entries in histogram form the certain
462  * minimal bin up to the certain maximal bin (not-included)
463  * @param histo the pointer to the histogram
464  * @param imin the minimal bin number (included)
465  * @param imax the maximal bin number (not included)
466  * @param number of entries
467  */
468 // ============================================================================
470 ( const AIDA::IHistogram1D* histo ,
471  const int imin , // minimal bin number (included)
472  const int imax ) // maximal bin number (not included)
473 {
474  if ( !histo ) { return s_long_bad ; } // RETURN
475  if ( imin == imax ) { return 0 ; } // RETURN
476  if ( imax < imin ) { return nEntries ( histo , imax ,imin ) ; } // RETURN
477  //
478  long result = 0 ;
479  if ( 0 > imin )
480  { result += histo -> binEntries( AIDA::IAxis::UNDERFLOW_BIN ) ; }
481  // get the exis
482  const auto& axis = histo -> axis () ;
483  // number of bins
484  const auto nBins = axis.bins() ;
485  if ( nBins < imin ) { return 0 ; } // RETURN
486  // loop over all bins
487  for ( int i = 0 ; i < nBins ; ++i )
488  { if ( imin <= i && i < imax ) { result += histo->binEntries ( i ) ; } }
489  //
490  if ( nBins < imax )
491  { result += histo -> binEntries( AIDA::IAxis::OVERFLOW_BIN ) ; }
492  //
493  return result ; // RETURN
494 }
495 // ============================================================================
496 /* get the fraction of entries in histogram up to the certain
497  * bin (not-included)
498  * @attention underflow bin is included!
499  * @param histo the pointer to the histogram
500  * @param imax the bin number (not included)
501  * @param fraction of entries
502  */
503 // ============================================================================
505 ( const AIDA::IHistogram1D* histo ,
506  const int imax )
507 {
508  if ( !histo ) { return s_bad ; } // RETURN
509  //
510  const auto N = histo->allEntries () ;
511  if ( 0 >= N ) { return s_bad ; } // RETURN
512  const auto n = nEntries ( histo , imax ) ;
513  if ( 0 > n ) { return s_bad ; } // RETURN
514  if ( n > N ) { return s_bad ; } // RETURN
515  //
516  return (double)n / (double)N ; // REUTRN
517 }
518 // ============================================================================
519 /* get fraction of entries in histogram form the certain
520  * minimal bin up to the certain maximal bin (not-included)
521  * @param histo the pointer to the histogram
522  * @param imin the minimal bin number (included)
523  * @param imax the maximal bin number (not included)
524  * @param fraction of entries
525  */
526 // ============================================================================
528 ( const AIDA::IHistogram1D* histo ,
529  const int imin , // minimal bin number (included)
530  const int imax ) // maximal bin number (not included)
531 {
532  if ( !histo ) { return s_bad ; } // RETURN
533  const auto N = histo->allEntries () ;
534  if ( 0 >= N ) { return s_bad ; } // RETURN
535  const auto n = nEntries ( histo , imin , imax ) ;
536  if ( 0 > n ) { return s_bad ; } // RETURN
537  if ( n > N ) { return s_bad ; } // RETURN
538  //
539  return (double)n / (double)N ; // REUTRN
540 }
541 // ============================================================================
542 /* get the (binominal) error for the fraction of entries
543  * in histogram up to the certain bin (not-included)
544  * @attention underflow bin is included!
545  * @param histo the pointer to the histogram
546  * @param imax the bin number (not included)
547  * @param error for the fraction of entries
548  */
549 // ============================================================================
551 ( const AIDA::IHistogram1D* histo ,
552  const int imax )
553 {
554  if ( !histo ) { return s_bad ; } // RETURN
555  //
556  const auto N = histo->allEntries () ;
557  if ( 0 >= N ) { return s_bad ; } // RETURN
558  const auto n = nEntries ( histo , imax ) ;
559  if ( 0 > n ) { return s_bad ; } // RETURN
560  if ( n > N ) { return s_bad ; } // RETURN
561  //
562  const double _n1 = std::max ( (double) n , 1.0 ) ;
563  const double _n2 = std::max ( (double) ( N - n ) , 1.0 ) ;
564  //
565  return std::sqrt ( _n1 * ( _n2 / N ) ) / N ; // RETURN
566 }
567 // ============================================================================
568 /* get the (binomial) error for the fraction of entries in histogram
569  * from the certain minimal bin up to the certain maximal bin (not-included)
570  * @param histo the pointer to the histogram
571  * @param imin the minimal bin number (included)
572  * @param imax the maximal bin number (not included)
573  * @param error for the fraction of entries
574  */
575  // ============================================================================
577 ( const AIDA::IHistogram1D* histo ,
578  const int imin , // minimal bin number (included)
579  const int imax ) // maximal bin number (not included)
580 {
581  if ( !histo ) { return s_bad ; } // RETURN
582  //
583  const auto N = histo->allEntries () ;
584  if ( 0 >= N ) { return s_bad ; } // RETURN
585  const auto n = nEntries ( histo , imin , imax ) ;
586  if ( 0 > n ) { return s_bad ; } // RETURN
587  if ( n > N ) { return s_bad ; } // RETURN
588  //
589  const double _n1 = std::max ( (double) n , 1.0 ) ;
590  const double _n2 = std::max ( (double) ( N - n ) , 1.0 ) ;
591  //
592  return std::sqrt ( _n1 * ( _n2 / N ) ) / N ; // RETURN
593 }
594 // ============================================================================
595 // The END
596 // ============================================================================
static double underflowIntegralFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of underflow integral
Definition: HistoStats.cpp:411
static double overflowIntegralFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of overflow intergal
Definition: HistoStats.cpp:388
static double momentErr(const AIDA::IHistogram1D *histo, const unsigned int order)
evaluate the uncertanty for &#39;bin-by-bin&#39;-moment
Definition: HistoStats.cpp:93
static double underflowEntriesFrac(const AIDA::IHistogram1D *histo)
the fraction of underflow entries (useful for shape comparison)
Definition: HistoStats.cpp:307
static long nEntries(const AIDA::IHistogram1D *histo, const int imax)
get number of entries in histogram up to the certain bin (not-included)
Definition: HistoStats.cpp:440
static double rmsErr(const AIDA::IHistogram1D *histo)
get an error in the rms value
Definition: HistoStats.cpp:241
static double underflowIntegralFrac(const AIDA::IHistogram1D *histo)
the fraction of underflow integral (useful for shape comparison)
Definition: HistoStats.cpp:336
static double moment(const AIDA::IHistogram1D *histo, const unsigned int order, const double value=0)
get the "bin-by-bin"-moment around the specified "value"
Definition: HistoStats.cpp:48
static double meanErr(const AIDA::IHistogram1D *histo)
get an error in the mean value
Definition: HistoStats.cpp:223
static double nEntriesFrac(const AIDA::IHistogram1D *histo, const int imax)
get the fraction of entries in histogram up to the certain bin (not-included)
Definition: HistoStats.cpp:505
static double overflowIntegralFrac(const AIDA::IHistogram1D *histo)
the fraction of overflow intergal (useful for shape comparison)
Definition: HistoStats.cpp:322
static double centralMoment(const AIDA::IHistogram1D *histo, const unsigned int order)
evaluate the &#39;bin-by-bin&#39;-central moment (around the mean value)
Definition: HistoStats.cpp:113
static double centralMomentErr(const AIDA::IHistogram1D *histo, const unsigned int order)
evaluate the uncertanty for &#39;bin-by-bin&#39;-central moment (around the mean value) ( the uncertanty is c...
Definition: HistoStats.cpp:137
static double rms(const AIDA::IHistogram1D *histo)
get the rms value for the histogram (just for completeness)
Definition: HistoStats.cpp:233
int N
Definition: IOTest.py:90
T lowest(T...args)
static double overflowEntriesFrac(const AIDA::IHistogram1D *histo)
the fraction of overflow entries (useful for shape comparison)
Definition: HistoStats.cpp:292
static double nEntriesFracErr(const AIDA::IHistogram1D *histo, const int imax)
get the (binominal) error for the fraction of entries in histogram up to the certain bin (not-include...
Definition: HistoStats.cpp:551
T fabs(T...args)
T max(T...args)
static double sumBinHeightErr(const AIDA::IHistogram1D *histo)
get an error in the sum bin height ("in-range integral")
Definition: HistoStats.cpp:255
static double overflowEntriesFracErr(const AIDA::IHistogram1D *histo)
error on fraction of overflow entries (useful for shape comparison)
Definition: HistoStats.cpp:350
static double sumAllBinHeightErr(const AIDA::IHistogram1D *histo)
get an error in the sum of all bin height ("integral")
Definition: HistoStats.cpp:276
static double kurtosisErr(const AIDA::IHistogram1D *histo)
get the error in kurtosis for the histogram
Definition: HistoStats.cpp:192
T pow(T...args)
static double mean(const AIDA::IHistogram1D *histo)
get the mean value for the histogram (just for completeness)
Definition: HistoStats.cpp:215
static double skewnessErr(const AIDA::IHistogram1D *histo)
get the error in skewness for the histogram
Definition: HistoStats.cpp:169
T sqrt(T...args)
static double underflowEntriesFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of underflow entries (useful for shape comparison)
Definition: HistoStats.cpp:369
static double kurtosis(const AIDA::IHistogram1D *histo)
get the kurtosis for the histogram
Definition: HistoStats.cpp:181
static double nEff(const AIDA::IHistogram1D *histo)
get the effective entries (just for completeness)
Definition: HistoStats.cpp:207
static double skewness(const AIDA::IHistogram1D *histo)
get the skewness for the histogram
Definition: HistoStats.cpp:158