Logo ROOT  
Reference Guide
RooJeffreysPrior.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooStats
3 * Package: RooStats
4 * File: $Id$
5 * author: Kyle Cranmer
6 *****************************************************************************/
7#ifndef JEFFREYSPRIOR
8#define JEFFREYSPRIOR
9
10#include "RooAbsPdf.h"
11#include "RooRealProxy.h"
12#include "RooListProxy.h"
13
14class RooRealVar;
15class RooArgList ;
16
18public:
19
20 RooJeffreysPrior() : _cacheMgr(this, 1, true, false) {}
21 RooJeffreysPrior(const char *name, const char *title, RooAbsPdf& nominal, const RooArgList& paramSet, const RooArgList& obsSet) ;
22 ~RooJeffreysPrior() override ;
23
24 RooJeffreysPrior(const RooJeffreysPrior& other, const char* name = 0);
25 TObject* clone(const char* newname) const override { return new RooJeffreysPrior(*this, newname); }
26
27 const RooArgList& lowList() const { return _obsSet ; }
28 const RooArgList& paramList() const { return _paramSet ; }
29
30protected:
31
32 RooTemplateProxy<RooAbsPdf> _nominal; // Proxy to the PDF for this prior.
33 RooListProxy _obsSet ; // Observables of the PDF.
34 RooListProxy _paramSet ; // Parameters of the PDF.
35
36 double evaluate() const override;
37
38private:
39 struct CacheElem : public RooAbsCacheElement {
40 public:
41 ~CacheElem() override = default;
42 // Payload
43 std::unique_ptr<RooAbsPdf> _pdf;
44 std::unique_ptr<RooArgSet> _pdfVariables;
45
47 RooArgList list(*_pdf);
48 list.add(*_pdfVariables, true);
49 return list;
50 }
51 };
53
54 ClassDefOverride(RooJeffreysPrior,2) // Sum of RooAbsReal objects
55};
56
57#endif
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
char name[80]
Definition: TGX11.cxx:110
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:22
Implementation of Jeffrey's prior.
RooTemplateProxy< RooAbsPdf > _nominal
~RooJeffreysPrior() override
Destructor.
double evaluate() const override
Calculate and return current value of self.
TObject * clone(const char *newname) const override
RooObjCacheManager _cacheMgr
const RooArgList & lowList() const
RooListProxy _obsSet
RooListProxy _paramSet
const RooArgList & paramList() const
Class RooObjCacheManager is an implementation of class RooCacheManager<RooAbsCacheElement> and specia...
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:40
Mother of all ROOT objects.
Definition: TObject.h:37
std::unique_ptr< RooAbsPdf > _pdf
RooArgList containedArgs(Action) override
~CacheElem() override=default
std::unique_ptr< RooArgSet > _pdfVariables