39namespace TestStatistics {
60 paramTracker_ = std::make_unique<RooChangeTracker>(
"chtracker",
"change tracker", *params,
true);
66 RooFit::BatchModeDataHelpers::getDataSpans(*
data,
"",
nullptr,
true,
76 apply_weight_squared(
other.apply_weight_squared),
78 lastSection_(
other.lastSection_),
79 cachedResult_(
other.cachedResult_),
80 evaluator_(
other.evaluator_)
112 <<
"RooUnbinnedL::constOptimizeTestStatistic(" <<
GetName()
113 <<
") the constant term optimization only applies to likelihoods evaluated with EvalBackend::Legacy(), "
114 "ignoring the request"
123using ComputeResult = std::pair<ROOT::Math::KahanSum<double>,
double>;
139 if (0. == weight * weight)
178 if (0. == weight * weight)
183 double logProba = std::log(probas[i]);
226 std::span<const double> probas =
evaluator_->run();
239 data_->store()->forceCacheUpdate();
262 pdf_->wireAllCaches();
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 data
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
The Kahan summation is a compensated summation algorithm, which significantly reduces numerical error...
RooFit::OwningPtr< RooArgSet > getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
static ErrorLoggingMode evalErrorLoggingMode()
Return current evaluation error logging mode.
static Int_t numEvalErrors()
Return the number of logged evaluation errors since the last clearing.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
std::shared_ptr< RooAbsData > data_
virtual std::string GetName() const
std::unique_ptr< RooArgSet > normSet_
Pointer to set with observables used for normalization.
virtual void constOptimizeTestStatistic(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt)
Interface function signaling a request to perform constant term optimization.
std::shared_ptr< RooAbsPdf > pdf_
ROOT::Math::KahanSum< double > cachedResult_
void constOptimizeTestStatistic(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override
With the vectorizing evaluation backends, the pdf is compiled for a fixed normalization set and evalu...
bool setApplyWeightSquared(bool flag)
Returns true if value was changed, false otherwise.
ROOT::Math::KahanSum< double > evaluatePartition(Section events, std::size_t components_begin, std::size_t components_end) override
Calculate and return likelihood on subset of data from firstEvent to lastEvent processed with a step ...
Section lastCacheSection_
std::unique_ptr< RooChangeTracker > paramTracker_
bool apply_weight_squared
Apply weights squared?
RooUnbinnedL(RooAbsPdf *pdf, RooAbsData *data, RooAbsL::Extended extended=RooAbsL::Extended::Auto, RooFit::EvalBackend evalBackend=RooFit::EvalBackend::Legacy())
std::stack< std::vector< double > > _vectorBuffers
std::shared_ptr< RooFit::Evaluator > evaluator_
! For batched evaluation
Mother of all ROOT objects.
std::unique_ptr< T > compileForNormSet(T const &arg, RooArgSet const &normSet)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
A part of some range delimited by two fractional points between 0 and 1 (inclusive).
std::size_t begin(std::size_t N_total) const
std::size_t end(std::size_t N_total) const
Little struct that can pack a float into the unused bits of the mantissa of a NaN double.