CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
Quantile Class Reference

#include <CompMethods.h>

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.

42 :central_(central), err_(err){};
double err_
Definition: CompMethods.h:58
double central_
Definition: CompMethods.h:53
Quantile::~Quantile ( )
inline

Definition at line 43 of file CompMethods.h.

43 {};

Member Function Documentation

double Quantile::distance ( TH1F &  hist)
inlineprivate

Definition at line 53 of file CompMethods.h.

References qnt_.

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

53 { return std::fabs(qnt_[2]-qnt_[0]); };
double qnt_[3]
Definition: CompMethods.h:60
void Quantile::evaluate ( double &  err)
inlineprivate

Definition at line 51 of file CompMethods.h.

References central_, and val_.

Referenced by quantiles().

51 {val_[0]=central_-err; val_[1]=central_; val_[2]=central_+err;};
double central_
Definition: CompMethods.h:53
double val_[3]
Definition: CompMethods.h:59
void Quantile::quantiles ( TH1F &  hist,
double  err 
)
inlineprivate

Definition at line 52 of file CompMethods.h.

References evaluate(), qnt_, and val_.

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

52 { evaluate(err); hist.GetQuantiles(3, qnt_, val_); };
void evaluate(double &err)
Definition: CompMethods.h:51
double val_[3]
Definition: CompMethods.h:59
double qnt_[3]
Definition: CompMethods.h:60
double Quantile::spread ( TH1F &  hist)
inline

Definition at line 46 of file CompMethods.h.

References distance(), and quantiles().

Referenced by FitHist::fillTargetHistogramBin().

46 { quantiles(hist, 0.25); return distance(hist); };
double distance(TH1F &hist)
Definition: CompMethods.h:53
void quantiles(TH1F &hist, double err)
Definition: CompMethods.h:52
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().

93 {
94  quantiles(hist, 0.25+err_); double outer=distance(hist);
95  quantiles(hist, 0.25-err_); double inner=distance(hist);
96  return std::fabs(outer-inner)/2;
97 }
double err_
Definition: CompMethods.h:58
double distance(TH1F &hist)
Definition: CompMethods.h:53
void quantiles(TH1F &hist, double err)
Definition: CompMethods.h:52
double Quantile::value ( TH1F &  hist)
inline

Definition at line 44 of file CompMethods.h.

References err_, qnt_, and quantiles().

Referenced by FitHist::fillTargetHistogramBin().

44 { quantiles(hist, err_); return qnt_[1]; };
double err_
Definition: CompMethods.h:58
double qnt_[3]
Definition: CompMethods.h:60
void quantiles(TH1F &hist, double err)
Definition: CompMethods.h:52
double Quantile::valueError ( TH1F &  hist)
inline

Definition at line 45 of file CompMethods.h.

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

Referenced by FitHist::fillTargetHistogramBin().

45 { quantiles(hist, err_); return distance(hist); };
double err_
Definition: CompMethods.h:58
double distance(TH1F &hist)
Definition: CompMethods.h:53
void quantiles(TH1F &hist, double err)
Definition: CompMethods.h:52

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().