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