Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooSumL.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_RooSumL
14#define ROOT_ROOFIT_TESTSTATISTICS_RooSumL
15
17
18#include "Math/Util.h" // KahanSum
19
20#include <tuple>
21
22namespace RooFit {
23namespace TestStatistics {
24
25class RooSumL : public RooAbsL {
26public:
27 RooSumL(RooAbsPdf *pdf, RooAbsData *data, std::vector<std::unique_ptr<RooAbsL>> components,
29 // Note: when above ctor is called without std::moving components, you get a really obscure error. Pass as
30 // std::move(components)!
31
33 evaluatePartition(Section events, std::size_t components_begin, std::size_t components_end) override;
34
35 // necessary only for legacy offsetting mode in LikelihoodWrapper; TODO: remove this if legacy mode is ever removed
37
38 void constOptimizeTestStatistic(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override;
39
40 std::string GetClassName() const override { return "RooSumL"; }
41
42 const std::vector<std::unique_ptr<RooAbsL>> &GetComponents() const { return components_; };
43
44private:
45 std::vector<std::unique_ptr<RooAbsL>> components_;
46};
47
48} // namespace TestStatistics
49} // namespace RooFit
50
51#endif // ROOT_ROOFIT_TESTSTATISTICS_RooSumL
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:122
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:40
Likelihood class that sums over multiple -log components.
Definition RooSumL.h:25
std::vector< std::unique_ptr< RooAbsL > > components_
Definition RooSumL.h:45
void constOptimizeTestStatistic(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override
Interface function signaling a request to perform constant term optimization.
Definition RooSumL.cxx:123
ROOT::Math::KahanSum< double > evaluatePartition(Section events, std::size_t components_begin, std::size_t components_end) override
Definition RooSumL.cxx:92
std::string GetClassName() const override
Definition RooSumL.h:40
const std::vector< std::unique_ptr< RooAbsL > > & GetComponents() const
Definition RooSumL.h:42
ROOT::Math::KahanSum< double > getSubsidiaryValue()
Definition RooSumL.cxx:112
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition JSONIO.h:26
A part of some range delimited by two fractional points between 0 and 1 (inclusive).
Definition RooAbsL.h:65