ATLAS Offline Software
Efficiency1D.h
Go to the documentation of this file.
1 /* emacs: this is -*- c++ -*- */
12 #ifndef TIDA_EFFICIENCY1D_H
13 #define TIDA_EFFICIENCY1D_H
14 
15 #include "T_Efficiency.h"
16 #include "TH1F.h"
17 
18 
19 class Efficiency1D : public T_Efficiency<TH1F> {
20 
21 public:
22 
23  Efficiency1D(TH1F* h, const std::string& n="") :
24  T_Efficiency<TH1F>( h, n ) { }
25 
26  Efficiency1D(TH1F* hnum, TH1F* hden, const std::string& n, double scale=100) :
27  T_Efficiency<TH1F>( hnum, hden, n, scale ) {
28  getibinvec(true);
29  finalise( scale );
30  }
31 
33 
34 
35  // fill methods ..
36 
37  virtual void Fill( double x, double w=1) {
38  m_hnumer->Fill(float(x),float(w));
39  m_hdenom->Fill(float(x),float(w));
40  }
41 
42  virtual void FillDenom( double x, float w=1) {
43  m_hdenom->Fill(float(x),float(w));
44  m_hmissed->Fill(float(x),float(w));
45  }
46 
48 
49  TGraphAsymmErrors* Bayes(double scale=100) {
51  }
52 
53 protected:
54 
55  virtual void getibinvec(bool force=false) {
56  if ( !force && !m_ibin.empty() ) return;
57  for ( int i=1 ; i<=m_hdenom->GetNbinsX() ; i++ ) {
58  m_ibin.push_back( i );
59  }
60  }
61 
62 };
63 
64 
65 
66 inline std::ostream& operator<<( std::ostream& s, const Efficiency1D& ) {
67  return s;
68 }
69 
70 
71 #endif // TIDA_EFFICIENCY1D_H
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
Efficiency1D::Efficiency1D
Efficiency1D(TH1F *h, const std::string &n="")
Definition: Efficiency1D.h:23
calibdata.force
bool force
Definition: calibdata.py:19
T_Efficiency< TH1F >::finalise
void finalise(double scale=100)
actually calculate the efficiencies
Definition: T_Efficiency.h:80
Efficiency1D::Efficiency1D
Efficiency1D(TH1F *hnum, TH1F *hden, const std::string &n, double scale=100)
Definition: Efficiency1D.h:26
Efficiency1D::~Efficiency1D
~Efficiency1D()
Definition: Efficiency1D.h:32
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
x
#define x
Efficiency1D::getibinvec
virtual void getibinvec(bool force=false)
Definition: Efficiency1D.h:55
T_Efficiency
Definition: T_Efficiency.h:24
T_Efficiency< TH1F >::m_hmissed
TH1F * m_hmissed
Definition: T_Efficiency.h:238
Efficiency1D
Definition: Efficiency1D.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
Efficiency1D::FillDenom
virtual void FillDenom(double x, float w=1)
Definition: Efficiency1D.h:42
Efficiency1D::Fill
virtual void Fill(double x, double w=1)
Definition: Efficiency1D.h:37
T_Efficiency.h
h
operator<<
std::ostream & operator<<(std::ostream &s, const Efficiency1D &)
Definition: Efficiency1D.h:66
T_Efficiency< TH1F >::m_ibin
std::vector< int > m_ibin
Definition: T_Efficiency.h:242
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
Efficiency1D::Bayes
TGraphAsymmErrors * Bayes(double scale=100)
evaluate the uncertainties correctly ...
Definition: Efficiency1D.h:49
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
T_Efficiency< TH1F >::m_hdenom
TH1F * m_hdenom
Definition: T_Efficiency.h:236
T_Efficiency< TH1F >::BayesInternal
TGraphAsymmErrors * BayesInternal(TH1 *hn, TH1 *hd, double scale=100) const
Definition: T_Efficiency.h:175
T_Efficiency< TH1F >::m_hnumer
TH1F * m_hnumer
Definition: T_Efficiency.h:235