53RooNLLVar::~RooNLLVar() {}
61 bool extended, RooAbsTestStatistic::Configuration
const& cfg) :
70 bool extended, RooAbsTestStatistic::Configuration
const &cfg)
71 : RooAbsOptTestStatistic(
name, title, pdf,
indata, projDeps, cfg),
82 _binnedPdf->setAttribute(
"BinnedLikelihoodActive") ;
90 std::unique_ptr<std::list<double>> boundaries{
_binnedPdf->binBoundaries(*var,var->getMin(),var->getMax())};
92 _binw.reserve(boundaries->size()-1) ;
115 _extended(
other._extended),
128 const RooArgSet& projDeps, RooAbsTestStatistic::Configuration
const& cfg) {
140void RooNLLVar::applyWeightSquared(
bool flag)
149 for (
int i=0 ; i<
_nCPU ; i++)
191 double N = eventWeight ;
198 logEvalError(
Form(
"Observed %f events in bin %lu with zero event yield",
N,(
unsigned long)i)) ;
200 }
else if (std::abs(mu)<1
e-10 && std::abs(
N)<1
e-10) {
209 term -= -mu +
N +
N * (std::log(mu) - std::log(
N));
251 if (_offset.Sum() == 0 && _offset.Carry() == 0 && (
result.Sum() != 0 ||
result.Carry() != 0)) {
252 coutI(Minimization) <<
"RooNLLVar::evaluatePartition(" << GetName() <<
") first = "<<
firstEvent <<
" last = " <<
lastEvent <<
" Likelihood offset now set to " <<
result.Sum() << std::endl ;
282 if (0. == weight * weight)
continue ;
315void RooNLLVar::enableBinOffsetting(
bool flag)
327 switch (operMode()) {
337 for (
int i = 0; i <
_nCPU; ++i) {
349 std::string
name = std::string{GetName()} +
"_offsetPdf";
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
The Kahan summation is a compensated summation algorithm, which significantly reduces numerical error...
const_iterator begin() const
const_iterator end() const
Storage_t::size_type size() const
RooAbsArg * first() const
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Container class to hold N-dimensional binned data.
Container class to hold unbinned data.
RooFit::OwningPtr< RooDataHist > binnedClone(const char *newName=nullptr, const char *newTitle=nullptr) const
Return binned clone of this dataset.
Implements a PDF constructed from a sum of functions:
Variable that can be changed from the outside.
void initialize(typename Architecture_t::Matrix_t &A, EInitialization m)
Double_t LnGamma(Double_t z)
Computation of ln[gamma(z)] for all z.
Little struct that can pack a float into the unused bits of the mantissa of a NaN double.