35 std::shared_ptr<WrapperCalculationCleanFlags> calculation_is_clean,
37 :
LikelihoodWrapper(std::move(likelihood), std::move(calculation_is_clean), std::move(offset))
56 std::unique_ptr<RooArgSet> vars{
likelihood_->getParameters()};
90 for (std::size_t comp_ix = 0; comp_ix <
likelihood_->getNComponents(); ++comp_ix) {
91 auto component_result =
likelihood_->evaluatePartition({0, 1}, comp_ix, comp_ix + 1);
97 result += component_result;
The Kahan summation is a compensated summation algorithm, which significantly reduces numerical error...
void logEvalError(const char *message, const char *serverValueString=nullptr) const
Log evaluation error message.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgList _saveVars
Copy of variables.
void evaluate() override
Triggers (possibly asynchronous) evaluation of the likelihood.
ROOT::Math::KahanSum< double > result
void initVars()
Helper function for the constructor.
RooArgList _vars
Variables.
LikelihoodSerial(std::shared_ptr< RooAbsL > _likelihood, std::shared_ptr< WrapperCalculationCleanFlags > calculation_is_clean, SharedOffset offset)
std::shared_ptr< RooAbsL > likelihood_
SharedOffset shared_offset_
virtual std::string GetName() const
OffsettingMode offsetting_mode_
void calculate_offsets()
(Re)calculate (on each worker) all component offsets.
LikelihoodWrapper(std::shared_ptr< RooAbsL > likelihood, std::shared_ptr< WrapperCalculationCleanFlags > calculation_is_clean, SharedOffset offset)
LikelihoodType likelihood_type_
Namespace for new RooFit test statistic calculation.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Little struct that can pack a float into the unused bits of the mantissa of a NaN double.
float getPayload() const
Retrieve packed float.
double getNaNWithPayload() const
Retrieve a NaN with the current float payload packed into the mantissa.
void accumulate(double val)
Accumulate a packed float from another NaN into this.