3#include "CLHEP/GenericFunctions/LikelihoodFunctional.hh"
4#include "CLHEP/GenericFunctions/Argument.hh"
5#include "CLHEP/GenericFunctions/AbsFunction.hh"
21 double logLikelihood(0);
22 for (
unsigned int i=0; i<_aList.size();i++) {
24 double f = function(a);
26 std::ostringstream stream;
27 stream <<
"Negative likelihood arg[" << i <<
"]=" << a;
28 throw std::runtime_error(stream.str());
30 logLikelihood -= log(
f);
32 return 2.0*logLikelihood;
LikelihoodFunctional(const ArgumentList &aList)
virtual double operator[](const AbsFunction &function) const
std::vector< Argument > ArgumentList