CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

Quantile Class Reference

#include <CompMethods.h>

List of all members.

Public Member Functions

 Quantile (double central, double err)
double spread (TH1F &hist)
double spreadError (TH1F &hist)
double value (TH1F &hist)
double valueError (TH1F &hist)
 ~Quantile ()

Private Member Functions

double distance (TH1F &hist)
void evaluate (double &err)
void quantiles (TH1F &hist, double err)

Private Attributes

double central_
double err_
double qnt_ [3]
double val_ [3]

Detailed Description

Definition at line 38 of file CompMethods.h.


Constructor & Destructor Documentation

Quantile::Quantile ( double  central,
double  err 
) [inline]

Definition at line 42 of file CompMethods.h.

:central_(central), err_(err){};
Quantile::~Quantile ( ) [inline]

Definition at line 43 of file CompMethods.h.

{};

Member Function Documentation

double Quantile::distance ( TH1F &  hist) [inline, private]

Definition at line 53 of file CompMethods.h.

References qnt_.

Referenced by spread(), spreadError(), and valueError().

{ return std::fabs(qnt_[2]-qnt_[0]); };
void Quantile::evaluate ( double &  err) [inline, private]

Definition at line 51 of file CompMethods.h.

References central_, and val_.

Referenced by quantiles().

{val_[0]=central_-err; val_[1]=central_; val_[2]=central_+err;};
void Quantile::quantiles ( TH1F &  hist,
double  err 
) [inline, private]

Definition at line 52 of file CompMethods.h.

References evaluate(), qnt_, and val_.

Referenced by spread(), spreadError(), value(), and valueError().

{ evaluate(err); hist.GetQuantiles(3, qnt_, val_); };
double Quantile::spread ( TH1F &  hist) [inline]

Definition at line 46 of file CompMethods.h.

References distance(), and quantiles().

Referenced by FitHist::fillTargetHistogramBin().

{ quantiles(hist, 0.25); return distance(hist); };
double Quantile::spreadError ( TH1F &  hist)

Definition at line 92 of file CompMethods.cc.

References distance(), err_, SurfaceOrientation::inner, SurfaceOrientation::outer, and quantiles().

Referenced by FitHist::fillTargetHistogramBin().

{
  quantiles(hist, 0.25+err_); double outer=distance(hist);
  quantiles(hist, 0.25-err_); double inner=distance(hist);
  return std::fabs(outer-inner)/2;
}
double Quantile::value ( TH1F &  hist) [inline]

Definition at line 44 of file CompMethods.h.

References err_, qnt_, and quantiles().

Referenced by FitHist::fillTargetHistogramBin().

{ quantiles(hist, err_); return qnt_[1]; };
double Quantile::valueError ( TH1F &  hist) [inline]

Definition at line 45 of file CompMethods.h.

References distance(), err_, and quantiles().

Referenced by FitHist::fillTargetHistogramBin().

{ quantiles(hist, err_); return distance(hist); };

Member Data Documentation

double Quantile::central_ [private]

Definition at line 53 of file CompMethods.h.

Referenced by evaluate().

double Quantile::err_ [private]

Definition at line 58 of file CompMethods.h.

Referenced by spreadError(), value(), and valueError().

double Quantile::qnt_[3] [private]

Definition at line 60 of file CompMethods.h.

Referenced by distance(), quantiles(), and value().

double Quantile::val_[3] [private]

Definition at line 59 of file CompMethods.h.

Referenced by evaluate(), and quantiles().