The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
HistoStats.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12// ============================================================================
13// Include files
14// ============================================================================
15// STD & STL
16// ============================================================================
17#include <utility>
18// ============================================================================
19// Gaudi
20// ============================================================================
21#include <GaudiKernel/Kernel.h>
22// ============================================================================
23// forward declarations
24// ============================================================================
25namespace AIDA {
26 class IHistogram1D;
27 class IProfile1D;
28} // namespace AIDA
29// ============================================================================
30namespace Gaudi {
31 namespace Utils {
32 // ========================================================================
40 public: // 1D Histograms
41 // ======================================================================
48 static double moment( const AIDA::IHistogram1D* histo, const unsigned int order, const double value = 0 );
49 // ======================================================================
56 static double momentErr( const AIDA::IHistogram1D* histo, const unsigned int order );
57 // ======================================================================
64 static double centralMoment( const AIDA::IHistogram1D* histo, const unsigned int order );
65 // ======================================================================
74 static double centralMomentErr( const AIDA::IHistogram1D* histo, const unsigned int order );
75 // ======================================================================
77 static double skewness( const AIDA::IHistogram1D* histo );
78 // ======================================================================
80 static double skewnessErr( const AIDA::IHistogram1D* histo );
81 // ======================================================================
83 static double kurtosis( const AIDA::IHistogram1D* histo );
84 // ======================================================================
86 static double kurtosisErr( const AIDA::IHistogram1D* histo );
87 // ======================================================================
89 static double mean( const AIDA::IHistogram1D* histo );
90 // ======================================================================
92 static double meanErr( const AIDA::IHistogram1D* histo );
93 // ======================================================================
95 static double rms( const AIDA::IHistogram1D* histo );
96 // ======================================================================
98 static double rmsErr( const AIDA::IHistogram1D* histo );
99 // ======================================================================
101 static double nEff( const AIDA::IHistogram1D* histo );
102 // ======================================================================
104 static double sumBinHeightErr( const AIDA::IHistogram1D* histo );
105 // ======================================================================
107 static double sumAllBinHeightErr( const AIDA::IHistogram1D* histo );
108 // ======================================================================
110 static double overflowEntriesFrac( const AIDA::IHistogram1D* histo );
112 static double underflowEntriesFrac( const AIDA::IHistogram1D* histo );
114 static double overflowEntriesFracErr( const AIDA::IHistogram1D* histo );
116 static double underflowEntriesFracErr( const AIDA::IHistogram1D* histo );
117 // ======================================================================
119 static double overflowIntegralFrac( const AIDA::IHistogram1D* histo );
121 static double underflowIntegralFrac( const AIDA::IHistogram1D* histo );
123 static double overflowIntegralFracErr( const AIDA::IHistogram1D* histo );
125 static double underflowIntegralFracErr( const AIDA::IHistogram1D* histo );
126 // ======================================================================
134 static long nEntries( const AIDA::IHistogram1D* histo, const int imax );
142 static long nEntries( const AIDA::IHistogram1D* histo,
143 const int imin, // minimal bin number (included)
144 const int imax ); // maximal bin number (not included)
145 // ======================================================================
153 static double nEntriesFrac( const AIDA::IHistogram1D* histo, const int imax );
161 static double nEntriesFrac( const AIDA::IHistogram1D* histo, const int imin, const int imax );
162 // ======================================================================
170 static double nEntriesFracErr( const AIDA::IHistogram1D* histo, const int imax );
178 static double nEntriesFracErr( const AIDA::IHistogram1D* histo, const int imin, const int imax );
179 // ======================================================================
180 public: // 1D Profile Histograms
181 // ======================================================================
188 static double moment( const AIDA::IProfile1D* histo, const unsigned int order, const double value = 0 );
189 // ======================================================================
196 static double momentErr( const AIDA::IProfile1D* histo, const unsigned int order );
197 // ======================================================================
204 static double centralMoment( const AIDA::IProfile1D* histo, const unsigned int order );
205 // ======================================================================
214 static double centralMomentErr( const AIDA::IProfile1D* histo, const unsigned int order );
215 // ======================================================================
217 static double skewness( const AIDA::IProfile1D* histo );
218 // ======================================================================
220 static double skewnessErr( const AIDA::IProfile1D* histo );
221 // ======================================================================
223 static double kurtosis( const AIDA::IProfile1D* histo );
224 // ======================================================================
226 static double kurtosisErr( const AIDA::IProfile1D* histo );
227 // ======================================================================
229 static double mean( const AIDA::IProfile1D* histo );
230 // ======================================================================
232 static double meanErr( const AIDA::IProfile1D* histo );
233 // ======================================================================
235 static double rms( const AIDA::IProfile1D* histo );
236 // ======================================================================
238 static double rmsErr( const AIDA::IProfile1D* histo );
239 // ======================================================================
241 static double sumBinHeightErr( const AIDA::IProfile1D* histo );
242 // ======================================================================
244 static double sumAllBinHeightErr( const AIDA::IProfile1D* histo );
245 // ======================================================================
247 static double nEff( const AIDA::IProfile1D* histo );
248 // ======================================================================
250 static double overflowEntriesFrac( const AIDA::IProfile1D* histo );
252 static double underflowEntriesFrac( const AIDA::IProfile1D* histo );
254 static double overflowEntriesFracErr( const AIDA::IProfile1D* histo );
256 static double underflowEntriesFracErr( const AIDA::IProfile1D* histo );
257 // ======================================================================
259 static double overflowIntegralFrac( const AIDA::IProfile1D* histo );
261 static double underflowIntegralFrac( const AIDA::IProfile1D* histo );
263 static double overflowIntegralFracErr( const AIDA::IProfile1D* histo );
265 static double underflowIntegralFracErr( const AIDA::IProfile1D* histo );
266 // ======================================================================
274 static long nEntries( const AIDA::IProfile1D* histo, const int imax );
282 static long nEntries( const AIDA::IProfile1D* histo,
283 const int imin, // minimal bin number (included)
284 const int imax ); // maximal bin number (not included)
285 // ======================================================================
293 static double nEntriesFrac( const AIDA::IProfile1D* histo, const int imax );
301 static double nEntriesFrac( const AIDA::IProfile1D* histo, const int imin, const int imax );
302 // ======================================================================
310 static double nEntriesFracErr( const AIDA::IProfile1D* histo, const int imax );
318 static double nEntriesFracErr( const AIDA::IProfile1D* histo, const int imin, const int imax );
319 // ======================================================================
320 };
321 // ========================================================================
322 } // namespace Utils
323 // ==========================================================================
324} // end of namespace Gaudi
325// ============================================================================
326// The END
327// ============================================================================
#define GAUDI_API
Definition Kernel.h:49
The collection of trivial functions to access the statistical information for the histograms.
Definition HistoStats.h:39
static double overflowEntriesFracErr(const AIDA::IHistogram1D *histo)
error on fraction of overflow entries (useful for shape comparison)
static double sumBinHeightErr(const AIDA::IHistogram1D *histo)
get an error in the sum bin height ("in-range integral")
static double mean(const AIDA::IHistogram1D *histo)
get the mean value for the histogram (just for completeness)
static double overflowIntegralFrac(const AIDA::IHistogram1D *histo)
the fraction of overflow intergal (useful for shape comparison)
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"
static double kurtosis(const AIDA::IHistogram1D *histo)
get the kurtosis for the histogram
static double underflowEntriesFrac(const AIDA::IHistogram1D *histo)
the fraction of underflow entries (useful for shape comparison)
static long nEntries(const AIDA::IHistogram1D *histo, const int imax)
get number of entries in histogram up to the certain bin (not-included)
static double kurtosisErr(const AIDA::IHistogram1D *histo)
get the error in kurtosis for the histogram
static double underflowIntegralFrac(const AIDA::IHistogram1D *histo)
the fraction of underflow integral (useful for shape comparison)
static double underflowIntegralFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of underflow integral
static double centralMoment(const AIDA::IHistogram1D *histo, const unsigned int order)
evaluate the 'bin-by-bin'-central moment (around the mean value)
static double rmsErr(const AIDA::IHistogram1D *histo)
get an error in the rms value
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...
static double nEntriesFrac(const AIDA::IHistogram1D *histo, const int imax)
get the fraction of entries in histogram up to the certain bin (not-included)
static double skewnessErr(const AIDA::IHistogram1D *histo)
get the error in skewness for the histogram
static double rms(const AIDA::IHistogram1D *histo)
get the rms value for the histogram (just for completeness)
static double skewness(const AIDA::IHistogram1D *histo)
get the skewness for the histogram
static double nEff(const AIDA::IHistogram1D *histo)
get the effective entries (just for completeness)
static double meanErr(const AIDA::IHistogram1D *histo)
get an error in the mean value
static double underflowEntriesFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of underflow entries (useful for shape comparison)
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...
static double overflowIntegralFracErr(const AIDA::IHistogram1D *histo)
the error on fraction of overflow intergal
static double sumAllBinHeightErr(const AIDA::IHistogram1D *histo)
get an error in the sum of all bin height ("integral")
static double momentErr(const AIDA::IHistogram1D *histo, const unsigned int order)
evaluate the uncertanty for 'bin-by-bin'-moment
static double overflowEntriesFrac(const AIDA::IHistogram1D *histo)
the fraction of overflow entries (useful for shape comparison)
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1