1 #ifndef PhysicsTools_Utilities_HistoPoissonLikelihoodRatio_h
2 #define PhysicsTools_Utilities_HistoPoissonLikelihoodRatio_h
16 nBins_ = histo->GetNbinsX();
17 xMin_ = histo->GetXaxis()->GetXmin();
18 xMax_ = histo->GetXaxis()->GetXmax();
21 cont_.push_back(histo->GetBinContent(
i + 1));
25 double chi2lambda = 0;
30 if (nu > 0 &&
cont_[
i] > 0)
38 nBins_ = histo->GetNbinsX();
39 xMin_ = histo->GetXaxis()->GetXmin();
40 xMax_ = histo->GetXaxis()->GetXmax();
52 T &
function() {
return *
t_; }
53 const T &
function()
const {
return *
t_; }
67 std::cout <<
"chi-squared/n.d.o.f. = " << amin <<
"/" << ndof <<
" = " << amin / ndof
68 <<
"; prob: " << TMath::Prob(amin, ndof) << std::endl;
double operator()() const
static std::vector< std::string > checklist log
size_t numberOfBins() const
HistoPoissonLikelihoodRatio()
std::vector< double > cont_
void setHistos(TH1 *histo)
HistoPoissonLikelihoodRatio(T &t, TH1 *histo, double rangeMin, double rangeMax)
static void print(double amin, unsigned int numberOfFreeParameters, const HistoPoissonLikelihoodRatio< T > &f)