1 #ifndef PhysicsTools_Utilities_CombinedChiSquaredLikelihood_h
2 #define PhysicsTools_Utilities_CombinedChiSquaredLikelihood_h
7 template<
typename ChiSquared,
typename Likelihood>
22 return chi2_.numberOfBins();
29 template<
typename ChiSquared,
typename Likelihood>
32 unsigned int ndof = f.
numberOfBins() - numberOfFreeParameters;
33 std::cout <<
"-2 log(maximum-likelihood) = " << amin <<
", n.d.o.f = " << ndof
34 <<
", free parameters = " << numberOfFreeParameters
36 std::cout <<
"chi-2 contibution: " << f.
chi2()() <<
"(n. bins: " << f.
chi2().numberOfBins() <<
")" << std::endl
37 <<
"likelihood contriution: " << -2.*f.
like()() << std::endl;
const ChiSquared & chi2() const
CombinedChiSquaredLikelihood()
double operator()() const
static void print(double amin, unsigned int numberOfFreeParameters, const CombinedChiSquaredLikelihood< ChiSquared, Likelihood > &f)
CombinedChiSquaredLikelihood(const ChiSquared &chi2, const Likelihood &like)
size_t numberOfBins() const
const Likelihood & like() const