Logo ROOT   master
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 
14 class RooRealVar;
15 class RooArgList ;
16 
17 class RooJeffreysPrior : public RooAbsPdf {
18 public:
19 
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 
30 protected:
31 
32  RooProxy<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 
38 private:
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
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
RooListProxy _obsSet
const RooArgList & paramList() const
virtual TObject * clone(const char *newname) const
#define ClassDef(name, id)
Definition: Rtypes.h:326
virtual ~RooJeffreysPrior()
Destructor.
RooRealVar represents a fundamental (non-derived) real-valued object.
Definition: RooRealVar.h:36
const RooArgList & lowList() const
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
RooObjCacheManager _cacheMgr
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:25
std::unique_ptr< RooAbsPdf > _pdf
std::unique_ptr< RooArgSet > _pdfVariables
Class RooObjCacheManager is an implementation of class RooCacheManager<RooAbsCacheElement> and specia...
virtual ~CacheElem()=default
Double_t evaluate() const
Calculate and return current value of self.
Mother of all ROOT objects.
Definition: TObject.h:37
RooListProxy _paramSet
Implementation of Jeffrey&#39;s prior.
RooAbsPdf, the base class of all PDFs
Definition: RooAbsPdf.h:40
virtual RooArgList containedArgs(Action) override
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:21
RooProxy< RooAbsPdf > _nominal
char name[80]
Definition: TGX11.cxx:109