Go to the documentation of this file. 1 #ifndef PhysicsTools_Utilities_Likelihood_h
2 #define PhysicsTools_Utilities_Likelihood_h
9 template <
typename PDF,
typename Tuple>
11 static double evaluate(
const PDF& pdf,
const Tuple& tuple) {
return pdf(tuple); }
15 template <
typename PDF>
22 template <
typename Sample,
typename PDF,
typename Yield = NoExtendedLikelihood>
29 double l = -(*yield_)();
30 for (
typename Sample::const_iterator
i =
sample_.begin();
i !=
sample_.end(); ++
i) {
53 template <
typename Sample,
typename PDF>
61 for (
typename Sample::const_iterator
i =
sample_.begin();
i !=
sample_.end(); ++
i) {
75 template <
typename Sample,
typename PDF,
typename Yield>
78 std::cout <<
"-2 log(maximum-likelihood) = " << amin <<
", free parameters = " << numberOfFreeParameters
83 template <
typename Sample,
typename PDF,
typename Yield>
const Yield & yield() const
double operator()() const
double operator()() const
static void print(double amin, unsigned int numberOfFreeParameters, const Likelihood< Sample, PDF, Yield > &f)
static double evaluate(const PDF &pdf, const Tuple &tuple)
static double evaluate(const PDF &pdf, const double val)
Likelihood(const Sample &sample, PDF &pdf, Yield &yield)
double absoluteLog() const
Likelihood(const Sample &sample, PDF &pdf)
LikelihoodEvaluator< PDF, typename Sample::value_type > Evaluator
LikelihoodEvaluator< PDF, typename Sample::value_type > Evaluator
unsigned int sampleSize() const
double logNFactorial() const
static double evaluate(const Likelihood< Sample, PDF, Yield > &f)