ECALELF  d6718b6cc30d69f18fde9018c5ae12f9d80bd7a5
Public Member Functions | Friends | List of all members
stats Class Reference

class that provides statistical tools More...

Public Member Functions

 stats (const std::vector< float > &v)
 default constructor More...
 
double mean (void) const
 returns the number of values
 
double mean (size_t imin, size_t imax) const
 returns the mean More...
 
std::pair< size_t, size_t > eff_sigma_interval (float q=0.68269) const
 returns the standard devation
 
float eff_sigma (float q=0.68269) const
 returns the half width of the smallest interval containing a fraction q of the events
 
float recursive_effective_mode (size_t imin, size_t imax, float q=0.25, float e=1e-05) const
 returns the MPV of the distribution
 
void add (double)
 add one entry to the list of values
 

Friends

std::ostream & operator<< (std::ostream &os, const stats s)
 

Detailed Description

class that provides statistical tools

Constructor & Destructor Documentation

stats::stats ( const std::vector< float > &  v)

default constructor

constructor starting from vector of values

References add().

Member Function Documentation

double stats::mean ( size_t  imin,
size_t  imax 
) const

returns the mean

returns the mean in an interval

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const stats  s 
)
friend

This operator defines how the stats are printed.

os << s.name() << "\t"
<< s.n() << "\t"
<< s.mean() << "\t"
<< s.stdDev() << "\t"
<< s.median() << "\t"
<< s.eff_sigma(interval) << "\t"
<< s.eff_sigma(interval03) << "\t"
<< s.mean(interval.first, interval.second) << "\t"
<< s.mean(interval03.first, interval03.second) << "\t"
<< s.eff_sigma(interval) / s.mean(interval.first, interval.second); // << "\t" << s.recursive_effective_mode() ;

The documentation for this class was generated from the following files: