RooHist Class Reference

#include <RooHist.h>

Inheritance diagram for RooHist:

TGraphAsymmErrors RooPlotable TGraphAsymmErrors RooPlotable RooPrintable RooPrintable TGraph TGraph RooPrintable RooPrintable TGraph TGraph List of all members.

Public Member Functions

 RooHist ()
 RooHist (Double_t nominalBinWidth, Double_t nSigma=1, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
 RooHist (const TH1 &data, Double_t nominalBinWidth=0, Double_t nSigma=1, RooAbsData::ErrorType=RooAbsData::Poisson, Double_t xErrorFrac=1.0, Bool_t correctForBinWidth=kTRUE, Double_t scaleFactor=1.)
 RooHist (const TH1 &data1, const TH1 &data2, Double_t nominalBinWidth=0, Double_t nSigma=1, RooAbsData::ErrorType=RooAbsData::Poisson, Double_t xErrorFrac=1.0, Bool_t efficiency=kFALSE, Double_t scaleFactor=1.0)
 RooHist (const RooHist &hist1, const RooHist &hist2, Double_t wgt1=1.0, Double_t wgt2=1.0, RooAbsData::ErrorType etype=RooAbsData::Poisson, Double_t xErrorFrac=1.0)
virtual ~RooHist ()
void addBin (Axis_t binCenter, Double_t n, Double_t binWidth=0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
void addBinWithError (Axis_t binCenter, Double_t n, Double_t elow, Double_t ehigh, Double_t binWidth=0, Double_t xErrorFrac=1.0, Bool_t correctForBinWidth=kTRUE, Double_t scaleFactor=1.0)
void addBinWithXYError (Axis_t binCenter, Double_t n, Double_t exlow, Double_t exhigh, Double_t eylow, Double_t eyhigh, Double_t scaleFactor=1.0)
void addAsymmetryBin (Axis_t binCenter, Int_t n1, Int_t n2, Double_t binWidth=0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
void addAsymmetryBinWithError (Axis_t binCenter, Double_t n1, Double_t n2, Double_t en1, Double_t en2, Double_t binWidth=0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
void addEfficiencyBin (Axis_t binCenter, Int_t n1, Int_t n2, Double_t binWidth=0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
void addEfficiencyBinWithError (Axis_t binCenter, Double_t n1, Double_t n2, Double_t en1, Double_t en2, Double_t binWidth=0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
virtual void printName (ostream &os) const
virtual void printTitle (ostream &os) const
virtual void printClassName (ostream &os) const
virtual void printMultiline (ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
virtual void Print (Option_t *options=0) const
Double_t getFitRangeNEvt () const
Double_t getFitRangeNEvt (Double_t xlo, Double_t xhi) const
Double_t getFitRangeBinW () const
Double_t getNominalBinWidth () const
void setRawEntries (Double_t n)
Bool_t hasIdenticalBinning (const RooHist &other) const
RooHistmakeResidHist (const RooCurve &curve, bool normalize=false) const
RooHistmakePullHist (const RooCurve &curve) const
Bool_t isIdentical (const RooHist &other, Double_t tol=1e-6) const
 RooHist ()
 RooHist (Double_t nominalBinWidth, Double_t nSigma=1, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
 RooHist (const TH1 &data, Double_t nominalBinWidth=0, Double_t nSigma=1, RooAbsData::ErrorType=RooAbsData::Poisson, Double_t xErrorFrac=1.0, Bool_t correctForBinWidth=kTRUE, Double_t scaleFactor=1.)
 RooHist (const TH1 &data1, const TH1 &data2, Double_t nominalBinWidth=0, Double_t nSigma=1, RooAbsData::ErrorType=RooAbsData::Poisson, Double_t xErrorFrac=1.0, Bool_t efficiency=kFALSE, Double_t scaleFactor=1.0)
 RooHist (const RooHist &hist1, const RooHist &hist2, Double_t wgt1=1.0, Double_t wgt2=1.0, RooAbsData::ErrorType etype=RooAbsData::Poisson, Double_t xErrorFrac=1.0)
virtual ~RooHist ()
void addBin (Axis_t binCenter, Double_t n, Double_t binWidth=0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
void addBinWithError (Axis_t binCenter, Double_t n, Double_t elow, Double_t ehigh, Double_t binWidth=0, Double_t xErrorFrac=1.0, Bool_t correctForBinWidth=kTRUE, Double_t scaleFactor=1.0)
void addBinWithXYError (Axis_t binCenter, Double_t n, Double_t exlow, Double_t exhigh, Double_t eylow, Double_t eyhigh, Double_t scaleFactor=1.0)
void addAsymmetryBin (Axis_t binCenter, Int_t n1, Int_t n2, Double_t binWidth=0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
void addAsymmetryBinWithError (Axis_t binCenter, Double_t n1, Double_t n2, Double_t en1, Double_t en2, Double_t binWidth=0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
void addEfficiencyBin (Axis_t binCenter, Int_t n1, Int_t n2, Double_t binWidth=0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
void addEfficiencyBinWithError (Axis_t binCenter, Double_t n1, Double_t n2, Double_t en1, Double_t en2, Double_t binWidth=0, Double_t xErrorFrac=1.0, Double_t scaleFactor=1.0)
virtual void printName (ostream &os) const
virtual void printTitle (ostream &os) const
virtual void printClassName (ostream &os) const
virtual void printMultiline (ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const
virtual void Print (Option_t *options=0) const
Double_t getFitRangeNEvt () const
Double_t getFitRangeNEvt (Double_t xlo, Double_t xhi) const
Double_t getFitRangeBinW () const
Double_t getNominalBinWidth () const
void setRawEntries (Double_t n)
Bool_t hasIdenticalBinning (const RooHist &other) const
RooHistmakeResidHist (const RooCurve &curve, bool normalize=false) const
RooHistmakePullHist (const RooCurve &curve) const
Bool_t isIdentical (const RooHist &other, Double_t tol=1e-6) const

Protected Member Functions

void initialize ()
Int_t roundBin (Double_t y)
void initialize ()
Int_t roundBin (Double_t y)

Private Attributes

Double_t _nominalBinWidth
Double_t _nSigma
Double_t _entries
Double_t _rawEntries

Detailed Description

Definition at line 26 of file RooHist.h.


Constructor & Destructor Documentation

RooHist::RooHist (  ) 

Definition at line 46 of file RooHist.cxx.

Referenced by makeResidHist().

RooHist::RooHist ( Double_t  nominalBinWidth,
Double_t  nSigma = 1,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

Definition at line 58 of file RooHist.cxx.

References initialize().

RooHist::RooHist ( const TH1 data,
Double_t  nominalBinWidth = 0,
Double_t  nSigma = 1,
RooAbsData::ErrorType  = RooAbsData::Poisson,
Double_t  xErrorFrac = 1.0,
Bool_t  correctForBinWidth = kTRUE,
Double_t  scaleFactor = 1. 
)

Definition at line 73 of file RooHist.cxx.

References _entries, _nominalBinWidth, addBin(), addBinWithError(), axis, data, TNamed::GetTitle(), TGraph::GetYaxis(), initialize(), RooAbsData::Poisson, TNamed::SetName(), TGraph::SetTitle(), RooPlotable::setYAxisLabel(), RooAbsData::SumW2, x, and y.

RooHist::RooHist ( const TH1 data1,
const TH1 data2,
Double_t  nominalBinWidth = 0,
Double_t  nSigma = 1,
RooAbsData::ErrorType  = RooAbsData::Poisson,
Double_t  xErrorFrac = 1.0,
Bool_t  efficiency = kFALSE,
Double_t  scaleFactor = 1.0 
)

Definition at line 120 of file RooHist.cxx.

References _entries, _nominalBinWidth, addAsymmetryBin(), addAsymmetryBinWithError(), addEfficiencyBin(), addEfficiencyBinWithError(), axis, coutE, coutW, ROOT::Math::fabs(), Form(), TH1::GetBinCenter(), TH1::GetBinContent(), TH1::GetBinError(), TH1::GetBinWidth(), TNamed::GetName(), TH1::GetNbinsX(), TNamed::GetTitle(), initialize(), RooFit::InputArguments, RooAbsData::Poisson, roundBin(), TNamed::SetName(), TGraph::SetTitle(), RooPlotable::setYAxisLabel(), RooAbsData::SumW2, and x.

RooHist::RooHist ( const RooHist hist1,
const RooHist hist2,
Double_t  wgt1 = 1.0,
Double_t  wgt2 = 1.0,
RooAbsData::ErrorType  etype = RooAbsData::Poisson,
Double_t  xErrorFrac = 1.0 
)

Definition at line 199 of file RooHist.cxx.

References _nominalBinWidth, _nSigma, addBin(), addBinWithError(), coutE, coutW, TGraphAsymmErrors::GetErrorX(), TGraphAsymmErrors::GetErrorY(), TGraph::GetN(), TNamed::GetName(), TGraph::GetPoint(), TNamed::GetTitle(), RooPlotable::getYAxisLabel(), hasIdenticalBinning(), i, initialize(), RooFit::InputArguments, n, RooAbsData::Poisson, roundBin(), TNamed::SetName(), TGraph::SetTitle(), RooPlotable::setYAxisLabel(), sqrt(), x1, and x2.

RooHist::~RooHist (  )  [virtual]

Definition at line 563 of file RooHist.cxx.

RooHist::RooHist (  ) 

RooHist::RooHist ( Double_t  nominalBinWidth,
Double_t  nSigma = 1,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

RooHist::RooHist ( const TH1 data,
Double_t  nominalBinWidth = 0,
Double_t  nSigma = 1,
RooAbsData::ErrorType  = RooAbsData::Poisson,
Double_t  xErrorFrac = 1.0,
Bool_t  correctForBinWidth = kTRUE,
Double_t  scaleFactor = 1. 
)

RooHist::RooHist ( const TH1 data1,
const TH1 data2,
Double_t  nominalBinWidth = 0,
Double_t  nSigma = 1,
RooAbsData::ErrorType  = RooAbsData::Poisson,
Double_t  xErrorFrac = 1.0,
Bool_t  efficiency = kFALSE,
Double_t  scaleFactor = 1.0 
)

RooHist::RooHist ( const RooHist hist1,
const RooHist hist2,
Double_t  wgt1 = 1.0,
Double_t  wgt2 = 1.0,
RooAbsData::ErrorType  etype = RooAbsData::Poisson,
Double_t  xErrorFrac = 1.0 
)

virtual RooHist::~RooHist (  )  [virtual]


Member Function Documentation

void RooHist::addBin ( Axis_t  binCenter,
Double_t  n,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

Definition at line 360 of file RooHist.cxx.

References _entries, _nominalBinWidth, _nSigma, coutE, coutW, ROOT::Math::fabs(), TGraph::GetN(), TNamed::GetName(), RooHistError::instance(), RooFit::Plotting, TGraph::SetPoint(), TGraphAsymmErrors::SetPointError(), and RooPlotable::updateYAxisLimits().

Referenced by RooHist().

void RooHist::addBinWithError ( Axis_t  binCenter,
Double_t  n,
Double_t  elow,
Double_t  ehigh,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Bool_t  correctForBinWidth = kTRUE,
Double_t  scaleFactor = 1.0 
)

Definition at line 410 of file RooHist.cxx.

References _entries, _nominalBinWidth, TGraph::GetN(), TGraph::SetPoint(), TGraphAsymmErrors::SetPointError(), and RooPlotable::updateYAxisLimits().

Referenced by RooHist().

void RooHist::addBinWithXYError ( Axis_t  binCenter,
Double_t  n,
Double_t  exlow,
Double_t  exhigh,
Double_t  eylow,
Double_t  eyhigh,
Double_t  scaleFactor = 1.0 
)

Definition at line 435 of file RooHist.cxx.

References _entries, TGraph::GetN(), TGraph::SetPoint(), TGraphAsymmErrors::SetPointError(), and RooPlotable::updateYAxisLimits().

void RooHist::addAsymmetryBin ( Axis_t  binCenter,
Int_t  n1,
Int_t  n2,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

Definition at line 456 of file RooHist.cxx.

References _nominalBinWidth, _nSigma, a, coutE, TGraph::GetN(), RooHistError::instance(), RooFit::Plotting, TGraph::SetPoint(), TGraphAsymmErrors::SetPointError(), and RooPlotable::updateYAxisLimits().

Referenced by RooHist().

void RooHist::addAsymmetryBinWithError ( Axis_t  binCenter,
Double_t  n1,
Double_t  n2,
Double_t  en1,
Double_t  en2,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

Definition at line 482 of file RooHist.cxx.

References _nominalBinWidth, a, error, TGraph::GetN(), pow(), TGraph::SetPoint(), TGraphAsymmErrors::SetPointError(), sqrt(), and RooPlotable::updateYAxisLimits().

Referenced by RooHist().

void RooHist::addEfficiencyBin ( Axis_t  binCenter,
Int_t  n1,
Int_t  n2,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

Definition at line 508 of file RooHist.cxx.

References _nominalBinWidth, _nSigma, a, coutE, TGraph::GetN(), RooHistError::instance(), RooFit::Plotting, TGraph::SetPoint(), TGraphAsymmErrors::SetPointError(), and RooPlotable::updateYAxisLimits().

Referenced by RooHist().

void RooHist::addEfficiencyBinWithError ( Axis_t  binCenter,
Double_t  n1,
Double_t  n2,
Double_t  en1,
Double_t  en2,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

Definition at line 535 of file RooHist.cxx.

References _nominalBinWidth, a, error, TGraph::GetN(), pow(), TGraph::SetPoint(), TGraphAsymmErrors::SetPointError(), sqrt(), and RooPlotable::updateYAxisLimits().

Referenced by RooHist().

void RooHist::printName ( ostream &  os  )  const [virtual]

Reimplemented from RooPrintable.

Definition at line 662 of file RooHist.cxx.

References TNamed::GetName().

void RooHist::printTitle ( ostream &  os  )  const [virtual]

Reimplemented from RooPrintable.

Definition at line 672 of file RooHist.cxx.

References TNamed::GetTitle().

void RooHist::printClassName ( ostream &  os  )  const [virtual]

Reimplemented from RooPrintable.

Definition at line 682 of file RooHist.cxx.

void RooHist::printMultiline ( ostream &  os,
Int_t  content,
Bool_t  verbose = kFALSE,
TString  indent = "" 
) const [virtual]

Reimplemented from RooPlotable.

Definition at line 634 of file RooHist.cxx.

References _nSigma, TGraphAsymmErrors::fEXhigh, TGraphAsymmErrors::fEXlow, TGraphAsymmErrors::fEYhigh, TGraphAsymmErrors::fEYlow, TGraph::fX, TGraph::fY, TGraph::GetN(), i, n, and RooPlotable::printMultiline().

virtual void RooHist::Print ( Option_t options = 0  )  const [inline, virtual]

Reimplemented from TGraphAsymmErrors.

Definition at line 61 of file RooHist.h.

References RooPrintable::defaultPrintContents(), RooPrintable::defaultPrintStream(), RooPrintable::defaultPrintStyle(), and RooPrintable::printStream().

Double_t RooHist::getFitRangeNEvt (  )  const [virtual]

Implements RooPlotable.

Definition at line 288 of file RooHist.cxx.

References _entries, and _rawEntries.

Double_t RooHist::getFitRangeNEvt ( Double_t  xlo,
Double_t  xhi 
) const [virtual]

Implements RooPlotable.

Definition at line 299 of file RooHist.cxx.

References _entries, _rawEntries, coutW, TGraph::GetN(), TGraph::GetPoint(), i, RooFit::Plotting, x, and y.

Double_t RooHist::getFitRangeBinW (  )  const [virtual]

Implements RooPlotable.

Definition at line 332 of file RooHist.cxx.

References _nominalBinWidth.

Double_t RooHist::getNominalBinWidth (  )  const [inline]

Definition at line 69 of file RooHist.h.

References _nominalBinWidth.

void RooHist::setRawEntries ( Double_t  n  )  [inline]

Definition at line 70 of file RooHist.h.

References _rawEntries.

Bool_t RooHist::hasIdenticalBinning ( const RooHist other  )  const

Definition at line 571 of file RooHist.cxx.

References ROOT::Math::fabs(), TGraph::GetN(), TGraph::GetPoint(), i, kFALSE, kTRUE, x1, and x2.

Referenced by RooHist().

RooHist * RooHist::makeResidHist ( const RooCurve curve,
bool  normalize = false 
) const

Definition at line 692 of file RooHist.cxx.

References _nominalBinWidth, coutW, Form(), TGraphAsymmErrors::GetErrorYhigh(), TGraphAsymmErrors::GetErrorYlow(), TGraph::GetN(), TNamed::GetName(), TGraph::GetPoint(), TNamed::GetTitle(), hist, i, RooCurve::interpolate(), norm(), RooFit::Plotting, RooHist(), x, and y.

Referenced by makePullHist().

RooHist* RooHist::makePullHist ( const RooCurve curve  )  const [inline]

Definition at line 75 of file RooHist.h.

References makeResidHist().

Bool_t RooHist::isIdentical ( const RooHist other,
Double_t  tol = 1e-6 
) const

Definition at line 605 of file RooHist.cxx.

References TH1::AddDirectory(), TGraph::GetN(), TGraph::GetY(), i, kFALSE, TH1::KolmogorovTest(), kTRUE, and TH1F::SetBinContent().

void RooHist::initialize (  )  [protected]

Definition at line 278 of file RooHist.cxx.

References _entries, and TAttMarker::SetMarkerStyle().

Referenced by RooHist().

Int_t RooHist::roundBin ( Double_t  y  )  [protected]

Definition at line 341 of file RooHist.cxx.

References coutW, ROOT::Math::fabs(), TNamed::fName, n, and RooFit::Plotting.

Referenced by RooHist().

void RooHist::addBin ( Axis_t  binCenter,
Double_t  n,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

void RooHist::addBinWithError ( Axis_t  binCenter,
Double_t  n,
Double_t  elow,
Double_t  ehigh,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Bool_t  correctForBinWidth = kTRUE,
Double_t  scaleFactor = 1.0 
)

void RooHist::addBinWithXYError ( Axis_t  binCenter,
Double_t  n,
Double_t  exlow,
Double_t  exhigh,
Double_t  eylow,
Double_t  eyhigh,
Double_t  scaleFactor = 1.0 
)

void RooHist::addAsymmetryBin ( Axis_t  binCenter,
Int_t  n1,
Int_t  n2,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

void RooHist::addAsymmetryBinWithError ( Axis_t  binCenter,
Double_t  n1,
Double_t  n2,
Double_t  en1,
Double_t  en2,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

void RooHist::addEfficiencyBin ( Axis_t  binCenter,
Int_t  n1,
Int_t  n2,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

void RooHist::addEfficiencyBinWithError ( Axis_t  binCenter,
Double_t  n1,
Double_t  n2,
Double_t  en1,
Double_t  en2,
Double_t  binWidth = 0,
Double_t  xErrorFrac = 1.0,
Double_t  scaleFactor = 1.0 
)

virtual void RooHist::printName ( ostream &  os  )  const [virtual]

Reimplemented from RooPrintable.

virtual void RooHist::printTitle ( ostream &  os  )  const [virtual]

Reimplemented from RooPrintable.

virtual void RooHist::printClassName ( ostream &  os  )  const [virtual]

Reimplemented from RooPrintable.

virtual void RooHist::printMultiline ( ostream &  os,
Int_t  content,
Bool_t  verbose = kFALSE,
TString  indent = "" 
) const [virtual]

Reimplemented from RooPlotable.

virtual void RooHist::Print ( Option_t options = 0  )  const [inline, virtual]

Reimplemented from TGraphAsymmErrors.

Definition at line 61 of file RooHist.h.

References RooPrintable::defaultPrintContents(), RooPrintable::defaultPrintStream(), RooPrintable::defaultPrintStyle(), and RooPrintable::printStream().

Double_t RooHist::getFitRangeNEvt (  )  const [virtual]

Implements RooPlotable.

Double_t RooHist::getFitRangeNEvt ( Double_t  xlo,
Double_t  xhi 
) const [virtual]

Implements RooPlotable.

Double_t RooHist::getFitRangeBinW (  )  const [virtual]

Implements RooPlotable.

Double_t RooHist::getNominalBinWidth (  )  const [inline]

Definition at line 69 of file RooHist.h.

References _nominalBinWidth.

void RooHist::setRawEntries ( Double_t  n  )  [inline]

Definition at line 70 of file RooHist.h.

References _rawEntries.

Bool_t RooHist::hasIdenticalBinning ( const RooHist other  )  const

RooHist* RooHist::makeResidHist ( const RooCurve curve,
bool  normalize = false 
) const

RooHist* RooHist::makePullHist ( const RooCurve curve  )  const [inline]

Definition at line 75 of file RooHist.h.

References makeResidHist().

Bool_t RooHist::isIdentical ( const RooHist other,
Double_t  tol = 1e-6 
) const

void RooHist::initialize (  )  [protected]

Int_t RooHist::roundBin ( Double_t  y  )  [protected]


Member Data Documentation

Double_t RooHist::_nominalBinWidth [private]

Definition at line 86 of file RooHist.h.

Referenced by addAsymmetryBin(), addAsymmetryBinWithError(), addBin(), addBinWithError(), addEfficiencyBin(), addEfficiencyBinWithError(), getFitRangeBinW(), getNominalBinWidth(), makeResidHist(), and RooHist().

Double_t RooHist::_nSigma [private]

Definition at line 87 of file RooHist.h.

Referenced by addAsymmetryBin(), addBin(), addEfficiencyBin(), printMultiline(), and RooHist().

Double_t RooHist::_entries [private]

Definition at line 88 of file RooHist.h.

Referenced by addBin(), addBinWithError(), addBinWithXYError(), getFitRangeNEvt(), initialize(), and RooHist().

Double_t RooHist::_rawEntries [private]

Definition at line 89 of file RooHist.h.

Referenced by getFitRangeNEvt(), and setRawEntries().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:33:45 2011 for ROOT_528-00b_version by  doxygen 1.5.1