Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooUnbinnedL.h
Go to the documentation of this file.
1/*
2 * Project: RooFit
3 * Authors:
4 * PB, Patrick Bos, Netherlands eScience Center, p.bos@esciencecenter.nl
5 *
6 * Copyright (c) 2021, CERN
7 *
8 * Redistribution and use in source and binary forms,
9 * with or without modification, are permitted according to the terms
10 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
11 */
12
13#ifndef ROOT_ROOFIT_TESTSTATISTICS_RooUnbinnedL
14#define ROOT_ROOFIT_TESTSTATISTICS_RooUnbinnedL
15
17#include <RooGlobalFunc.h>
18
19#include "Math/Util.h" // KahanSum
20
21// forward declarations
22class RooAbsPdf;
23class RooAbsData;
24class RooArgSet;
26
27namespace RooFit {
28
29class Evaluator;
30
31namespace TestStatistics {
32
33class RooUnbinnedL : public RooAbsL {
34public:
38 ~RooUnbinnedL() override;
39 bool setApplyWeightSquared(bool flag);
40
42 evaluatePartition(Section events, std::size_t components_begin, std::size_t components_end) override;
43
45
46 std::string GetClassName() const override { return "RooUnbinnedL"; }
47
48private:
49 bool apply_weight_squared = false; ///< Apply weights squared?
50 mutable bool _first = true; ///<!
51 std::unique_ptr<RooChangeTracker> paramTracker_;
52 Section lastSection_ = {0, 0}; // used for cache together with the parameter tracker
53 // Last event section the dataset cache was recalculated for. The
54 // cache-and-track optimization tracks staleness globally per cached branch,
55 // but only refreshes the requested event range, so evaluating a different
56 // section requires forcing a cache update (see evaluatePartition).
59 std::shared_ptr<RooFit::Evaluator> evaluator_; ///<! For batched evaluation
60 std::stack<std::vector<double>> _vectorBuffers; // used for preserving resources in batched evaluation
61};
62
63} // namespace TestStatistics
64} // namespace RooFit
65
66#endif // ROOT_ROOFIT_TESTSTATISTICS_RooUnbinnedL
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
The Kahan summation is a compensated summation algorithm, which significantly reduces numerical error...
Definition Util.h:141
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:56
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:32
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Meta object that tracks value changes in a given set of RooAbsArgs by registering itself as value cli...
static EvalBackend Legacy()
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 ...
std::unique_ptr< RooChangeTracker > paramTracker_
bool apply_weight_squared
Apply weights squared?
std::string GetClassName() const override
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
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition CodegenImpl.h:72
A part of some range delimited by two fractional points between 0 and 1 (inclusive).
Definition RooAbsL.h:65