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