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
18
19#include "Math/Util.h" // KahanSum
20
21#include <tuple>
22
23namespace RooFit {
24namespace TestStatistics {
25
26class RooSumL : public RooAbsL {
27public:
28 RooSumL(RooAbsPdf *pdf, RooAbsData *data, std::vector<std::unique_ptr<RooAbsL>> components,
30 // Note: when above ctor is called without std::moving components, you get a really obscure error. Pass as
31 // std::move(components)!
32
34 evaluatePartition(Section events, std::size_t components_begin, std::size_t components_end) override;
35
36 // necessary only for legacy offsetting mode in LikelihoodWrapper; TODO: remove this if legacy mode is ever removed
38
39 void constOptimizeTestStatistic(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override;
40
41private:
42 std::vector<std::unique_ptr<RooAbsL>> components_;
43};
44
45} // namespace TestStatistics
46} // namespace RooFit
47
48#endif // ROOT_ROOFIT_TESTSTATISTICS_RooSumL
The Kahan summation is a compensated summation algorithm, which significantly reduces numerical error...
Definition Util.h:122
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:82
Likelihood class that sums over multiple -log components.
Definition RooSumL.h:26
std::vector< std::unique_ptr< RooAbsL > > components_
Definition RooSumL.h:42
void constOptimizeTestStatistic(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override
Interface function signaling a request to perform constant term optimization.
Definition RooSumL.cxx:113
ROOT::Math::KahanSum< double > evaluatePartition(Section events, std::size_t components_begin, std::size_t components_end) override
Definition RooSumL.cxx:88
ROOT::Math::KahanSum< double > getSubsidiaryValue()
Definition RooSumL.cxx:102
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition Common.h:18
A part of some range delimited by two fractional points between 0 and 1 (inclusive).
Definition RooAbsL.h:57