Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
23 RooJeffreysPrior(const RooJeffreysPrior& other, const char *name = nullptr);
24 TObject* clone(const char* newname) const override { return new RooJeffreysPrior(*this, newname); }
25
26 const RooArgList& lowList() const { return _obsSet ; }
27 const RooArgList& paramList() const { return _paramSet ; }
28
29protected:
30
31 RooTemplateProxy<RooAbsPdf> _nominal; // Proxy to the PDF for this prior.
32 RooListProxy _obsSet ; // Observables of the PDF.
33 RooListProxy _paramSet ; // Parameters of the PDF.
34
35 double evaluate() const override;
36
37private:
38 struct CacheElem : public RooAbsCacheElement {
39 public:
40 // Payload
41 std::unique_ptr<RooAbsPdf> _pdf;
42 std::unique_ptr<RooArgSet> _pdfVariables;
43
45 RooArgList list(*_pdf);
46 list.add(*_pdfVariables, true);
47 return list;
48 }
49 };
51
52 ClassDefOverride(RooJeffreysPrior,2) // Sum of RooAbsReal objects
53};
54
55#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
Abstract base class for objects to be stored in RooAbsCache cache manager objects.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:40
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
Implementation of Jeffrey's prior.
RooTemplateProxy< RooAbsPdf > _nominal
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
Implementation of a RooCacheManager<RooAbsCacheElement> that specializes in the storage of cache elem...
Variable that can be changed from the outside.
Definition RooRealVar.h:37
Mother of all ROOT objects.
Definition TObject.h:41
std::unique_ptr< RooAbsPdf > _pdf
RooArgList containedArgs(Action) override
std::unique_ptr< RooArgSet > _pdfVariables