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 std::unique_ptr<RooArgSet> getParameters() override { return std::make_unique<RooArgSet>(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 std::string GetInfo() const override { return GetClassName() + "::" + parent_pdf_name_; }
40
41 std::string GetClassName() const override { return "RooSubsidiaryL"; }
42
43 inline std::size_t numDataEntries() const override
44 {
45 // function only used in LikelihoodJob::evaluate, but this class must always be evaluated over Section(0,1), so
46 // not useful
47 return 0;
48 }
49
50 void constOptimizeTestStatistic(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override;
51
52private:
53 std::string parent_pdf_name_;
54 RooArgList subsidiary_pdfs_{"subsidiary_pdfs"}; ///< Set of subsidiary PDF or "constraint" terms
55 RooArgSet parameter_set_{"parameter_set"}; ///< Set of parameters to which constraints apply
56};
57
58} // namespace TestStatistics
59} // namespace RooFit
60
61#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:55
void constOptimizeTestStatistic(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override
Interface function signaling a request to perform constant term optimization.
RooArgSet parameter_set_
Set of parameters to which constraints apply.
std::string GetTitle() const override
std::unique_ptr< RooArgSet > getParameters() override
std::string GetClassName() 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::string GetInfo() const override
RooArgList subsidiary_pdfs_
Set of subsidiary PDF or "constraint" terms.
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 JSONIO.h:26
A part of some range delimited by two fractional points between 0 and 1 (inclusive).
Definition RooAbsL.h:65