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 virtual ~RooJeffreysPrior() ;
23
24 RooJeffreysPrior(const RooJeffreysPrior& other, const char* name = 0);
25 virtual TObject* clone(const char* newname) const { 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_t evaluate() const;
37
38private:
39 struct CacheElem : public RooAbsCacheElement {
40 public:
41 virtual ~CacheElem() = default;
42 // Payload
43 std::unique_ptr<RooAbsPdf> _pdf;
44 std::unique_ptr<RooArgSet> _pdfVariables;
45
46 virtual RooArgList containedArgs(Action) override {
47 RooArgList list(*_pdf);
48 list.add(*_pdfVariables, true);
49 return list;
50 }
51 };
53
54 ClassDef(RooJeffreysPrior,2) // Sum of RooAbsReal objects
55};
56
57#endif
double Double_t
Definition RtypesCore.h:59
#define ClassDef(name, id)
Definition Rtypes.h:325
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_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
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.
virtual ~RooJeffreysPrior()
Destructor.
RooTemplateProxy< RooAbsPdf > _nominal
Double_t evaluate() const
Calculate and return current value of self.
virtual TObject * clone(const char *newname) const
RooObjCacheManager _cacheMgr
const RooArgList & lowList() const
RooListProxy _obsSet
RooListProxy _paramSet
const RooArgList & paramList() const
RooListProxy is the concrete proxy for RooArgList objects.
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:39
Mother of all ROOT objects.
Definition TObject.h:41
std::unique_ptr< RooAbsPdf > _pdf
virtual ~CacheElem()=default
std::unique_ptr< RooArgSet > _pdfVariables
virtual RooArgList containedArgs(Action) override