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