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 = -1 * std::numeric_limits<double>::max() ;
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 ( 0 == 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 double _r = rms ( histo ) ;
58  const double _d = value - mean ( histo ) ;
59  return _r *_r + _d * _d ; // RETURN
60  }
61  const double n = nEff ( histo ) ;
62  if ( 0 >= n ) { return 0.0 ; } // RETURN
63 
64  const int _order = (int) order ;
65 
66  // get the exis
67  const AIDA::IAxis& axis = histo -> axis () ;
68  // number of bins
69  const int nBins = axis.bins() ;
70  double result = 0 ;
71  double weight = 0 ;
72  // loop over all bins
73  for ( int i = 0 ; i < nBins ; ++i )
74  {
75  const double lE = axis . binLowerEdge ( i ) ;
76  const double uE = axis . binUpperEdge ( i ) ;
77  //
78  const double yBin = histo -> binHeight ( i ) ; // bin weight
79  const double xBin = 0.5 * ( lE + uE ) ; // bin center
80  //
81  weight += yBin ;
82  result += yBin * std::pow ( xBin - value , _order ) ;
83  }
84  if ( 0 != weight ) { result /= weight ; }
85  return result ;
86 }
87 // ============================================================================
94 // ============================================================================
96 ( const AIDA::IHistogram1D* histo ,
97  const unsigned int order )
98 {
99  if ( 0 == histo ) { return s_bad ; } // RETURN
100  const double n = nEff ( histo ) ;
101  if ( 0 >= n ) { return 0.0 ; } // RETURN
102  const double a2o = moment ( histo , 2 * order ) ; // a(2o)
103  const double ao = moment ( histo , order ) ; // a(o)
104  double result = a2o - ao*ao ;
105  result /= n ;
106  result = std::max ( 0.0 , result ) ;
107  return std:: sqrt ( result ) ; // RETURN
108 }
109 // ============================================================================
110 /* evaluate the central momentum (around the mean value)
111  * @param histo histogram
112  * @param order the momentm order
113  * @param value central value
114  * @return the evaluated central moment
115  */
116 // ============================================================================
118 ( const AIDA::IHistogram1D* histo ,
119  const unsigned int order )
120 {
121  if ( 0 == histo ) { return s_bad ; } // RETURN
122  if ( 0 == order ) { return 1.0 ; } // RETURN
123  if ( 1 == order ) { return 0.0 ; } // RETURN
124  if ( 2 == order )
125  {
126  const double sigma = histo->rms() ;
127  return sigma * sigma ; // RETURN
128  }
129  // delegate the actual evaluation to another method:
130  return moment ( histo , order , mean ( histo ) ) ;
131 }
132 // ============================================================================
133 /* evaluate the uncertanty for 'bin-by-bin'-central momentum
134  * (around the mean value)
135  * ( the uncertanty is calculated with O(1/n2) precision)
136  * @param histo histogram
137  * @param order the moment parameter
138  * @param value central value
139  * @return the evaluated uncertanty in the central moment
140  */
141 // ============================================================================
143 ( const AIDA::IHistogram1D* histo ,
144  const unsigned int order )
145 {
146  if ( 0 == histo ) { return s_bad ; } // RETURN
147  const double n = nEff ( histo ) ;
148  if ( 0 >= n ) { return 0.0 ; } // RETURN
149  const double mu2 = centralMoment ( histo , 2 ) ; // mu(2)
150  const double muo = centralMoment ( histo , order ) ; // mu(o)
151  const double mu2o = centralMoment ( histo , 2 * order ) ; // mu(2o)
152  const double muom = centralMoment ( histo , order - 1 ) ; // mu(o-1)
153  const double muop = centralMoment ( histo , order + 1 ) ; // mu(o+1)
154  double result = mu2o ;
155  result -= 2.0 * order * muom * muop ;
156  result -= muo * muo ;
157  result += order * order * mu2 * muom * muom ;
158  result /= n ;
159  result = std::max ( 0.0 , result ) ;
160  return std:: sqrt ( result ) ; // RETURN
161 }
162 // ============================================================================
163 // get the skewness for the histogram
164 // ============================================================================
166 ( const AIDA::IHistogram1D* histo )
167 {
168  if ( 0 == histo ) { return s_bad ; } // RETURN
169  const double mu3 = centralMoment ( histo , 3 ) ;
170  const double s3 = std::pow ( rms ( histo ) , 3 ) ;
171  return ( std::fabs(s3)>0 ? mu3/s3 : 0.0 );
172 }
173 // ============================================================================
174 // get the error in skewness
175 // ============================================================================
177 ( const AIDA::IHistogram1D* histo )
178 {
179  if ( 0 == histo ) { return s_bad ; } // RETURN
180  const double n = nEff ( histo ) ;
181  if ( 2 > n ) { return 0.0 ; } // RETURN
182  double result = 6 ;
183  result *= ( n - 2 ) ;
184  result /= ( n + 1 ) * ( n + 3 ) ;
185  return std::sqrt ( result ) ;
186 }
187 // ============================================================================
188 // get the kurtosis for the histogram
189 // ============================================================================
191 ( const AIDA::IHistogram1D* histo )
192 {
193  if ( 0 == histo ) { return s_bad ; } // RETURN
194  const double mu4 = centralMoment ( histo , 4 ) ;
195  const double s4 = std::pow ( rms ( histo ) , 4 ) ;
196  return ( std::fabs(s4)>0 ? mu4/s4 - 3.0 : 0.0 );
197 }
198 // ============================================================================
199 // get the error in kurtosis
200 // ============================================================================
202 ( const AIDA::IHistogram1D* histo )
203 {
204  if ( 0 == histo ) { return s_bad ; } // RETURN
205  const double n = nEff ( histo ) ;
206  if ( 3 > n ) { return 0.0 ; } // RETURN
207  double result = 24 * n ;
208  result *= ( n - 2 ) * ( n - 3 ) ;
209  result /= ( n + 1 ) * ( n + 1 ) ;
210  result /= ( n + 3 ) * ( n + 5 ) ;
211  return std::sqrt ( result ) ;
212 }
213 // ============================================================================
214 // get the effective entries
215 // ============================================================================
217 ( const AIDA::IHistogram1D* histo )
218 {
219  if ( 0 == histo ) { return s_bad ; }
220  return histo -> equivalentBinEntries () ;
221 }
222 // ============================================================================
223 // get the mean value for the histogram
224 // ============================================================================
226 ( const AIDA::IHistogram1D* histo )
227 {
228  if ( 0 == histo ) { return s_bad ; }
229  return histo -> mean() ;
230 }
231 // ============================================================================
232 // get an error in the mean value
233 // ============================================================================
235 ( const AIDA::IHistogram1D* histo )
236 {
237  if ( 0 == histo ) { return s_bad ; }
238  const double n = nEff ( histo ) ;
239  return 0 >= n ? 0.0 : rms ( histo ) / std::sqrt ( n ) ;
240 }
241 // ============================================================================
242 // get the rms value for the histogram
243 // ============================================================================
245 ( const AIDA::IHistogram1D* histo )
246 {
247  if ( 0 == histo ) { return s_bad ; }
248  return histo -> rms () ;
249 }
250 // ============================================================================
251 // get the error in rms
252 // ============================================================================
254 ( const AIDA::IHistogram1D* histo )
255 {
256  if ( 0 == histo ) { return s_bad ; }
257  const double n = nEff ( histo ) ;
258  if ( 1 >= n ) { return 0.0 ; }
259  double result = 2 + kurtosis ( histo ) ;
260  result += 2.0 /( n - 1 ) ;
261  result /= 4.0 * n ;
262  result = std::max ( result , 0.0 ) ;
263  return histo -> rms() * std::sqrt ( result ) ;
264 }
265 // ============================================================================
266 // get an error in the sum bin height ("in range integral")
267 // ============================================================================
269 ( const AIDA::IHistogram1D* histo )
270 {
271  if ( 0 == histo ) { return s_bad ; }
272  //
273  double error2 = 0 ;
274  // get the exis
275  const AIDA::IAxis& axis = histo -> axis () ;
276  // number of bins
277  const int nBins = axis.bins() ;
278  // loop over all bins
279  for ( int i = 0 ; i < nBins ; ++i )
280  {
281  // get the error in each bin
282  const double berr = histo->binError ( i ) ;
283  // accumulate the errors:
284  error2 += berr * berr ;
285  }
286  return std::sqrt ( error2 ) ;
287 }
288 // ============================================================================
289 // get an error in the sum all bin height ("integral")
290 // ============================================================================
292 ( const AIDA::IHistogram1D* histo )
293 {
294  if ( 0 == histo ) { return s_bad ; }
295  //
296  const double error = sumBinHeightErr( histo ) ;
297  if ( 0 > error ) { return s_bad ; }
299  const double err1 = histo->binError ( AIDA::IAxis::UNDERFLOW_BIN ) ;
300  const double err2 = histo->binError ( AIDA::IAxis::OVERFLOW_BIN ) ;
301  //
302  return std::sqrt ( error * error + err1 * err1 + err2 * err2 ) ;
303 }
304 // ============================================================================
305 // the fraction of overflow entries (useful for shape comparison)
306 // ============================================================================
308 ( const AIDA::IHistogram1D* histo )
309 {
310  if ( 0 == histo ) { return s_bad ; } // REUTRN
311  const long overflow = histo -> binEntries ( AIDA::IAxis::OVERFLOW_BIN ) ;
312  if ( 0 == overflow ) { return 0 ; } // REUTRN
313  const long all = histo->allEntries() ;
314  if ( 0 == all ) { return 0 ; } // "CONVENTION?" RETURN
315  if ( 0 > all ) { return s_bad ; } // Lets be a bit paranoic, RETURN
316  //
317  double _tmp = (double) overflow ;
318  _tmp /= all ;
319  //
320  return _tmp ;
321 }
322 // ============================================================================
323 // the fraction of underflow entries (useful for shape comparison)
324 // ============================================================================
326 ( const AIDA::IHistogram1D* histo )
327 {
328  if ( 0 == histo ) { return s_bad ; } // REUTRN
329  const long underflow = histo -> binEntries ( AIDA::IAxis::UNDERFLOW_BIN ) ;
330  if ( 0 == underflow ) { return 0 ; } // REUTRN
331  const long all = histo->allEntries() ;
332  if ( 0 == all ) { return 0 ; } // "CONVENTION?" RETURN
333  if ( 0 > all ) { return s_bad ; } // Lets be a bit paranoic, RETURN
334  //
335  double _tmp = (double) underflow ;
336  _tmp /= all ;
337  //
338  return _tmp ;
339 }
340 // ============================================================================
341 // the fraction of overflow integral (useful for shape comparison)
342 // ============================================================================
344 ( const AIDA::IHistogram1D* histo )
345 {
346  if ( 0 == histo ) { return s_bad ; } // REUTRN
347  const double overflow = histo -> binHeight ( AIDA::IAxis::OVERFLOW_BIN ) ;
348  if ( 0 == overflow ) { return 0 ; } // REUTRN
349  const double all = histo -> sumAllBinHeights() ;
350  if ( 0 == all ) { return 0 ; } // "CONVENTION?" RETURN
351  //
352  return overflow / all ;
353 }
354 // ============================================================================
355 // the fraction of underflow entries (useful for shape comparison)
356 // ============================================================================
358 ( const AIDA::IHistogram1D* histo )
359 {
360  if ( 0 == histo ) { return s_bad ; } // REUTRN
361  const double underflow = histo -> binHeight ( AIDA::IAxis::UNDERFLOW_BIN ) ;
362  if ( 0 == underflow ) { return 0 ; } // REUTRN
363  const double all = histo -> sumAllBinHeights() ;
364  if ( 0 == all ) { return 0 ; } // "CONVENTION?" RETURN
365  //
366  return underflow / all ;
367 }
368 // ============================================================================
369 // error on fraction of overflow entries (useful for shape comparison)
370 // ============================================================================
372 ( const AIDA::IHistogram1D* histo )
373 {
374  if ( 0 == histo ) { return s_bad ; } // RETURN
375  //
376  const double overflow = histo -> binEntries ( AIDA::IAxis::OVERFLOW_BIN );
377  const double all = histo -> allEntries () ;
378  //
379  if ( 0 > overflow || 0 >= all || overflow > all ) { return s_bad ; }
380  //
381  const double n = std::max ( overflow , 1.0 ) ;
382  const double N = all ;
383  const double n1 = std::max ( N - n , 1.0 ) ;
384  //
385  return std::sqrt ( n * n1 / N ) / N ; // use the binomial formula
386 }
387 // ============================================================================
388 // error on fraction of underflow entries (useful for shape comparison)
389 // ============================================================================
391 ( const AIDA::IHistogram1D* histo )
392 {
393  if ( 0 == histo ) { return s_bad ; } // RETURN
394  //
395  const double underflow = histo -> binEntries ( AIDA::IAxis::UNDERFLOW_BIN );
396  const double all = histo -> allEntries () ;
397  //
398  if ( 0 > underflow || 0 >= all || underflow > all ) { return s_bad ; }
399  //
400  const double n = std::max ( underflow , 1.0 ) ;
401  const double N = all ;
402  const double n1 = std::max ( N - n , 1.0 ) ;
403  //
404  return std::sqrt ( n * n1 / N ) / N ; // use the binomial formula
405 }
406 // ============================================================================
407 // the error on fraction of overflow intergal
408 // ============================================================================
410 ( const AIDA::IHistogram1D* histo )
411 {
412  if ( 0 == histo ) { return s_bad ; } // RETURN
413  //
414  const double all = histo -> sumAllBinHeights () ;
415  if ( 0 == all ) { return s_bad ; } // RETURN
416  const double overflow = histo -> binHeight ( AIDA::IAxis::OVERFLOW_BIN ) ;
417  const double oErr = histo -> binError ( AIDA::IAxis::OVERFLOW_BIN ) ;
418  if ( 0 > oErr ) { return s_bad ; } // RETURN
419  const double aErr = sumAllBinHeightErr ( histo ) ;
420  if ( 0 > aErr ) { return s_bad ; } // RETURN
421  //
422  double error2 = oErr * oErr ;
423  error2 += aErr * aErr * overflow * overflow / all / all ;
424  error2 /= all * all ;
425 
426  return std::sqrt ( error2 ) ;
427 }
428 // ============================================================================
429 // the error on fraction of overflow intergal
430 // ============================================================================
432 ( const AIDA::IHistogram1D* histo )
433 {
434  if ( 0 == histo ) { return s_bad ; } // RETURN
435  //
436  const double all = histo -> sumAllBinHeights () ;
437  if ( 0 == all ) { return s_bad ; } // RETURN
438  const double underflow = histo -> binHeight ( AIDA::IAxis::UNDERFLOW_BIN ) ;
439  const double oErr = histo -> binError ( AIDA::IAxis::UNDERFLOW_BIN ) ;
440  if ( 0 > oErr ) { return s_bad ; } // RETURN
441  const double aErr = sumAllBinHeightErr ( histo ) ;
442  if ( 0 > aErr ) { return s_bad ; } // RETURN
443  //
444  double error2 = oErr * oErr ;
445  error2 += aErr * aErr * underflow * underflow / all / all ;
446  error2 /= all * all ;
447  //
448  return std::sqrt ( error2 ) ;
449 }
450 // ============================================================================
451 /* get number of entries in histogram up to the certain
452  * bin (not-included)
453  * @attention underflow bin is included!
454  * @param histo the pointer to the histogram
455  * @param imax the bin number (not included)
456  * @param number of entries
457  */
458 // ============================================================================
460 ( const AIDA::IHistogram1D* histo ,
461  const int imax )
462 {
463  if ( 0 == histo ) { return s_long_bad ; } // RETURN
464  if ( 0 > imax ) { return 0 ; } // RETURN
465  long result = histo -> binEntries( AIDA::IAxis::UNDERFLOW_BIN ) ;
466 
467  // get the exis
468  const AIDA::IAxis& axis = histo -> axis () ;
469  // number of bins
470  const int nBins = axis.bins() ;
471  // loop over all bins
472  for ( int i = 0 ; i < nBins ; ++i )
473  { if ( i < imax ) { result += histo->binEntries ( i ) ; } }
474  //
475  if ( nBins < imax )
476  { result += histo -> binEntries( AIDA::IAxis::OVERFLOW_BIN ) ; }
477  //
478  return result ;
479 }
480 // ============================================================================
481 /* get number of entries in histogram form the certain
482  * minimal bin up to the certain maximal bin (not-included)
483  * @param histo the pointer to the histogram
484  * @param imin the minimal bin number (included)
485  * @param imax the maximal bin number (not included)
486  * @param number of entries
487  */
488 // ============================================================================
490 ( const AIDA::IHistogram1D* histo ,
491  const int imin , // minimal bin number (included)
492  const int imax ) // maximal bin number (not included)
493 {
494  if ( 0 == histo ) { return s_long_bad ; } // RETURN
495  if ( imin == imax ) { return 0 ; } // RETURN
496  if ( imax < imin ) { return nEntries ( histo , imax ,imin ) ; } // RETURN
497  //
498  long result = 0 ;
499  if ( 0 > imin )
500  { result += histo -> binEntries( AIDA::IAxis::UNDERFLOW_BIN ) ; }
501  // get the exis
502  const AIDA::IAxis& axis = histo -> axis () ;
503  // number of bins
504  const int nBins = axis.bins() ;
505  if ( nBins < imin ) { return 0 ; } // RETURN
506  // loop over all bins
507  for ( int i = 0 ; i < nBins ; ++i )
508  { if ( imin <= i && i < imax ) { result += histo->binEntries ( i ) ; } }
509  //
510  if ( nBins < imax )
511  { result += histo -> binEntries( AIDA::IAxis::OVERFLOW_BIN ) ; }
512  //
513  return result ; // RETURN
514 }
515 // ============================================================================
516 /* get the fraction of entries in histogram up to the certain
517  * bin (not-included)
518  * @attention underflow bin is included!
519  * @param histo the pointer to the histogram
520  * @param imax the bin number (not included)
521  * @param fraction of entries
522  */
523 // ============================================================================
525 ( const AIDA::IHistogram1D* histo ,
526  const int imax )
527 {
528  if ( 0 == histo ) { return s_bad ; } // RETURN
529  //
530  const double N = histo->allEntries () ;
531  if ( 0 >= N ) { return s_bad ; } // RETURN
532  const long n = nEntries ( histo , imax ) ;
533  if ( 0 > n ) { return s_bad ; } // RETURN
534  if ( n > N ) { return s_bad ; } // RETURN
535  //
536  return n / N ; // REUTRN
537 }
538 // ============================================================================
539 /* get fraction of entries in histogram form the certain
540  * minimal bin up to the certain maximal bin (not-included)
541  * @param histo the pointer to the histogram
542  * @param imin the minimal bin number (included)
543  * @param imax the maximal bin number (not included)
544  * @param fraction of entries
545  */
546 // ============================================================================
548 ( const AIDA::IHistogram1D* histo ,
549  const int imin , // minimal bin number (included)
550  const int imax ) // maximal bin number (not included)
551 {
552  if ( 0 == histo ) { return s_bad ; } // RETURN
553  const double N = histo->allEntries () ;
554  if ( 0 >= N ) { return s_bad ; } // RETURN
555  const long n = nEntries ( histo , imin , imax ) ;
556  if ( 0 > n ) { return s_bad ; } // RETURN
557  if ( n > N ) { return s_bad ; } // RETURN
558  //
559  return n / N ; // REUTRN
560 }
561 // ============================================================================
562 /* get the (binominal) error for the fraction of entries
563  * in histogram up to the certain bin (not-included)
564  * @attention underflow bin is included!
565  * @param histo the pointer to the histogram
566  * @param imax the bin number (not included)
567  * @param error for the fraction of entries
568  */
569 // ============================================================================
571 ( const AIDA::IHistogram1D* histo ,
572  const int imax )
573 {
574  if ( 0 == histo ) { return s_bad ; } // RETURN
575  //
576  const double N = histo->allEntries () ;
577  if ( 0 >= N ) { return s_bad ; } // RETURN
578  const long n = nEntries ( histo , imax ) ;
579  if ( 0 > n ) { return s_bad ; } // RETURN
580  if ( n > N ) { return s_bad ; } // RETURN
581  //
582  const double _n1 = std::max ( (double) n , 1.0 ) ;
583  const double _n2 = std::max ( ( N - n ) , 1.0 ) ;
584  //
585  return std::sqrt ( _n1 * _n2 / N ) / N ; // RETURN
586 }
587 // ============================================================================
588 /* get the (binomial) error for the fraction of entries in histogram
589  * from the certain minimal bin up to the certain maximal bin (not-included)
590  * @param histo the pointer to the histogram
591  * @param imin the minimal bin number (included)
592  * @param imax the maximal bin number (not included)
593  * @param error for the fraction of entries
594  */
595  // ============================================================================
597 ( const AIDA::IHistogram1D* histo ,
598  const int imin , // minimal bin number (included)
599  const int imax ) // maximal bin number (not included)
600 {
601  if ( 0 == histo ) { return s_bad ; } // RETURN
602  //
603  const double N = histo->allEntries () ;
604  if ( 0 >= N ) { return s_bad ; } // RETURN
605  const long n = nEntries ( histo , imin , imax ) ;
606  if ( 0 > n ) { return s_bad ; } // RETURN
607  if ( n > N ) { return s_bad ; } // RETURN
608  //
609  const double _n1 = std::max ( (double) n , 1.0 ) ;
610  const double _n2 = std::max ( ( N - n ) , 1.0 ) ;
611  //
612  return std::sqrt ( _n1 * _n2 / N ) / N ; // RETURN
613 }
614 // ============================================================================
615 // The END
616 // ============================================================================
static double underflowIntegralFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of underflow integral
Definition: HistoStats.cpp:432
static double overflowIntegralFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of overflow intergal
Definition: HistoStats.cpp:410
static double momentErr(const AIDA::IHistogram1D *histo, const unsigned int order)
evaluate the uncertanty for 'bin-by-bin'-moment
Definition: HistoStats.cpp:96
static double underflowEntriesFrac(const AIDA::IHistogram1D *histo)
the fraction of underflow entries (useful for shape comparison)
Definition: HistoStats.cpp:326
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:460
static double rmsErr(const AIDA::IHistogram1D *histo)
get an error in the rms value
Definition: HistoStats.cpp:254
static double underflowIntegralFrac(const AIDA::IHistogram1D *histo)
the fraction of underflow integral (useful for shape comparison)
Definition: HistoStats.cpp:358
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:235
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:525
static double overflowIntegralFrac(const AIDA::IHistogram1D *histo)
the fraction of overflow intergal (useful for shape comparison)
Definition: HistoStats.cpp:344
static double centralMoment(const AIDA::IHistogram1D *histo, const unsigned int order)
evaluate the 'bin-by-bin'-central moment (around the mean value)
Definition: HistoStats.cpp:118
static double centralMomentErr(const AIDA::IHistogram1D *histo, const unsigned int order)
evaluate the uncertanty for 'bin-by-bin'-central moment (around the mean value) ( the uncertanty is c...
Definition: HistoStats.cpp:143
static double rms(const AIDA::IHistogram1D *histo)
get the rms value for the histogram (just for completeness)
Definition: HistoStats.cpp:245
int N
Definition: IOTest.py:90
static double overflowEntriesFrac(const AIDA::IHistogram1D *histo)
the fraction of overflow entries (useful for shape comparison)
Definition: HistoStats.cpp:308
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:571
static double sumBinHeightErr(const AIDA::IHistogram1D *histo)
get an error in the sum bin height ("in-range integral")
Definition: HistoStats.cpp:269
static double overflowEntriesFracErr(const AIDA::IHistogram1D *histo)
error on fraction of overflow entries (useful for shape comparison)
Definition: HistoStats.cpp:372
static double sumAllBinHeightErr(const AIDA::IHistogram1D *histo)
get an error in the sum of all bin height ("integral")
Definition: HistoStats.cpp:292
static double kurtosisErr(const AIDA::IHistogram1D *histo)
get the error in kurtosis for the histogram
Definition: HistoStats.cpp:202
static double mean(const AIDA::IHistogram1D *histo)
get the mean value for the histogram (just for completeness)
Definition: HistoStats.cpp:226
static double skewnessErr(const AIDA::IHistogram1D *histo)
get the error in skewness for the histogram
Definition: HistoStats.cpp:177
static double underflowEntriesFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of underflow entries (useful for shape comparison)
Definition: HistoStats.cpp:391
static double kurtosis(const AIDA::IHistogram1D *histo)
get the kurtosis for the histogram
Definition: HistoStats.cpp:191
list i
Definition: ana.py:128
static double nEff(const AIDA::IHistogram1D *histo)
get the effective entries (just for completeness)
Definition: HistoStats.cpp:217
static double skewness(const AIDA::IHistogram1D *histo)
get the skewness for the histogram
Definition: HistoStats.cpp:166