12#ifndef TIDA_EFFICIENCY2D_H
13#define TIDA_EFFICIENCY2D_H
26 Efficiency2D(TH2F* hnum, TH2F* hden,
const std::string& n,
double scale=100) :
36 void Fill(
double x,
double y,
double w=1) {
37 m_hnumer->Fill(
float(
x),
float(
y),
float(w) );
38 m_hdenom->Fill(
float(
x),
float(
y),
float(w) );
49 TGraphAsymmErrors*
BayesX(
int slice,
double scale=100) {
51 if ( slice<0 || slice>=
slicesX() )
return 0;
72 TGraphAsymmErrors*
BayesY(
int slice,
double scale=100) {
74 if ( slice<0 || slice>=
slicesY() )
return 0;
95 if ( i<0 || i>=
slicesX() )
return 0;
100 if ( i<0 || i>=
slicesY() )
return 0;
119 if ( !force && !
m_ibin.empty() )
return;
120 for (
int i=1 ; i<=
m_hdenom->GetNbinsX() ; i++ ) {
121 for (
int j=1 ; j<=
m_hdenom->GetNbinsY() ; j++ ) {
128 std::string
slicename(
const std::string& s,
int i )
const {
129 if ( i<10 )
return s +
"0" + std::to_string(i);
130 else return s + std::to_string(i);
std::ostream & operator<<(std::ostream &s, const Efficiency2D &)
Header file for AthHistogramAlgorithm.
void FillDenom(double x, double y, float w=1)
Efficiency2D(TH2F *h, const std::string &n="")
std::string slicename(const std::string &s, int i) const
virtual void getibinvec(bool force=false)
Efficiency2D(TH2F *hnum, TH2F *hden, const std::string &n, double scale=100)
TGraphAsymmErrors * BayesY(int slice, double scale=100)
TGraphAsymmErrors * BayesX(int slice, double scale=100)
evaluate the uncertainties correctly ...
void Fill(double x, double y, double w=1)
fill methods ...
const std::string & name() const
TGraphAsymmErrors * BayesInternal(TH1 *hn, TH1 *hd, double scale=100) const
std::vector< int > m_ibin
T_Efficiency(TH2F *h, const std::string &n)
void finalise(double scale=100)