|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #ifndef TIDA_T_EFFICIENCY_H
13 #define TIDA_T_EFFICIENCY_H
21 #include "TGraphAsymmErrors.h"
30 std::string effname =
n;
32 effname = std::string(
h->GetName())+
"_eff";
37 m_hnumer = (
T*)
h->Clone( (effname+
"_n").c_str() );
38 m_hdenom = (
T*)
h->Clone( (effname+
"_d").c_str() );
39 m_heff = (
T*)
h->Clone( effname.c_str() );
41 m_hmissed = (
T*)
h->Clone( (effname+
"_missed").c_str() );
53 std::string effname =
n+
"_eff";
57 m_hnumer = (
T*)hnum->Clone( (effname+
"_n").c_str() );
58 m_hdenom = (
T*)hden->Clone( (effname+
"_d").c_str() );
59 m_heff = (
T*)hnum->Clone( effname.c_str() );
61 m_hmissed = (
T*)hnum->Clone( (effname+
"_missed").c_str() );
83 for (
size_t i=0 ;
i<
m_ibin.size() ;
i++ ) {
120 void SetDenominator(
T*
h ) {
122 for (
size_t i=0 ;
i<
m_ibin.size() ;
i++ ) {
128 virtual void SetNumerator(
T*
h ) {
130 for (
size_t i=0 ;
i<
m_ibin.size() ;
i++ ) {
147 for (
size_t i=0 ;
i<
m_ibin.size() ;
i++ ) {
156 return n_tot / d_tot;
186 for (
int i=1 ;
i<=hd->GetNbinsX() ;
i++ ) {
187 double y = hd->GetBinContent(
i);
188 if (
y==0 ) hd->SetBinContent(
i, 1
e-20);
191 TGraphAsymmErrors* tg =
new TGraphAsymmErrors( hn, hd,
"cl=0.683 b(1,1) mode" );
194 double*
x = tg->GetX();
195 double*
y = tg->GetY();
199 for (
int i=0 ;
i<
n ;
i++ ) {
203 double yeup = tg->GetErrorYhigh(
i);
204 double yedown = tg->GetErrorYlow(
i);
216 tg->SetPoint(
i,
x[
i],
y[
i] );
218 tg->SetPointEYhigh(
i, yeup );
219 tg->SetPointEYlow(
i, yedown );
221 tg->SetPointEXhigh(
i, 0 );
222 tg->SetPointEXlow(
i, 0 );
249 #endif // TIDA_T_EFFICIENCY_H
T_Efficiency(T *hnum, T *hden, const std::string &n, double)
virtual void getibinvec(bool force=false)=0
T_Efficiency(T *h, const std::string &n)
void finalise(double scale=100)
actually calculate the efficiencies
std::vector< int > m_ibin
TGraphAsymmErrors * BayesInternal(TH1 *hn, TH1 *hd, double scale=100) const
double findTotalEfficiency()
these 1D and 2D Fill versionms should never be called directly in fact, are they even needed at all ?