Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooSubsidiaryL.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_RooSubsidiaryL
14#define ROOT_ROOFIT_TESTSTATISTICS_RooSubsidiaryL
15
17#include "RooArgList.h"
18#include "RooArgSet.h"
19
20#include "Math/Util.h" // KahanSum
21
22namespace RooFit {
23namespace TestStatistics {
24
25class RooSubsidiaryL : public RooAbsL {
26public:
27 RooSubsidiaryL(const std::string &parent_pdf_name, const RooArgSet &pdfs, const RooArgSet &parameter_set);
28
30 evaluatePartition(Section events, std::size_t components_begin, std::size_t components_end) override;
31 inline RooArgSet *getParameters() override { return &parameter_set_; }
32 inline std::string GetName() const override { return std::string("subsidiary_pdf_of_") + parent_pdf_name_; }
33
34 inline std::string GetTitle() const override
35 {
36 return std::string("Subsidiary PDF set of simultaneous PDF ") + parent_pdf_name_;
37 }
38
39 inline std::size_t numDataEntries() const override
40 {
41 // function only used in LikelihoodJob::evaluate, but this class must always be evaluated over Section(0,1), so
42 // not useful
43 return 0;
44 }
45
46 void constOptimizeTestStatistic(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override;
47
48private:
49 std::string parent_pdf_name_;
50 RooArgList subsidiary_pdfs_{"subsidiary_pdfs"}; // Set of subsidiary PDF or "constraint" terms
51 RooArgSet parameter_set_{"parameter_set"}; // Set of parameters to which constraints apply
52};
53
54} // namespace TestStatistics
55} // namespace RooFit
56
57#endif // ROOT_ROOFIT_TESTSTATISTICS_RooSubsidiaryL
The Kahan summation is a compensated summation algorithm, which significantly reduces numerical error...
Definition Util.h:122
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:35
void constOptimizeTestStatistic(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override
Interface function signaling a request to perform constant term optimization.
std::string GetTitle() const override
ROOT::Math::KahanSum< double > evaluatePartition(Section events, std::size_t components_begin, std::size_t components_end) override
std::string GetName() const override
std::size_t numDataEntries() const override
Number of dataset entries.
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