1 #ifndef PhysicsTools_Utilities_HistoPoissonLikelihoodRatio_h 2 #define PhysicsTools_Utilities_HistoPoissonLikelihoodRatio_h 25 double chi2lambda = 0;
30 if (nu > 0 &&
cont_[
i] > 0)
52 T &
function() {
return *
t_; }
53 const T &
function()
const {
return *
t_; }
66 unsigned int ndof =
f.numberOfBins() - numberOfFreeParameters;
67 std::cout <<
"chi-squared/n.d.o.f. = " << amin <<
"/" <<
ndof <<
" = " << amin /
ndof 68 <<
"; prob: " << TMath::Prob(amin,
ndof) << std::endl;
size_t numberOfBins() const
HistoPoissonLikelihoodRatio()
std::vector< double > cont_
void setHistos(TH1 *histo)
double operator()() const
HistoPoissonLikelihoodRatio(T &t, TH1 *histo, double rangeMin, double rangeMax)
static void print(double amin, unsigned int numberOfFreeParameters, const HistoPoissonLikelihoodRatio< T > &f)