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 
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  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 
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
RooJeffreysPrior::_obsSet
RooListProxy _obsSet
Definition: RooJeffreysPrior.h:33
RooJeffreysPrior::paramList
const RooArgList & paramList() const
Definition: RooJeffreysPrior.h:28
RooJeffreysPrior::_paramSet
RooListProxy _paramSet
Definition: RooJeffreysPrior.h:34
RooArgList
Definition: RooArgList.h:21
RooJeffreysPrior::lowList
const RooArgList & lowList() const
Definition: RooJeffreysPrior.h:27
RooJeffreysPrior::RooJeffreysPrior
RooJeffreysPrior()
Definition: RooJeffreysPrior.h:20
RooJeffreysPrior::CacheElem::containedArgs
virtual RooArgList containedArgs(Action) override
Definition: RooJeffreysPrior.h:46
RooJeffreysPrior::CacheElem::_pdf
std::unique_ptr< RooAbsPdf > _pdf
Definition: RooJeffreysPrior.h:43
RooAbsCacheElement
Definition: RooAbsCacheElement.h:26
RooJeffreysPrior::_nominal
RooTemplateProxy< RooAbsPdf > _nominal
Definition: RooJeffreysPrior.h:32
RooJeffreysPrior::~RooJeffreysPrior
virtual ~RooJeffreysPrior()
Destructor.
Definition: RooJeffreysPrior.cxx:90
RooJeffreysPrior::CacheElem::_pdfVariables
std::unique_ptr< RooArgSet > _pdfVariables
Definition: RooJeffreysPrior.h:44
RooAbsPdf.h
RooJeffreysPrior::_cacheMgr
RooObjCacheManager _cacheMgr
Definition: RooJeffreysPrior.h:52
RooRealProxy.h
RooAbsCollection::add
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
Definition: RooAbsCollection.cxx:437
RooJeffreysPrior::clone
virtual TObject * clone(const char *newname) const
Definition: RooJeffreysPrior.h:25
RooListProxy
Definition: RooListProxy.h:24
RooListProxy.h
RooTemplateProxy< RooAbsPdf >
Double_t
double Double_t
Definition: RtypesCore.h:59
RooJeffreysPrior::CacheElem::~CacheElem
virtual ~CacheElem()=default
RooObjCacheManager
Definition: RooObjCacheManager.h:32
RooAbsCacheElement::Action
Action
Definition: RooAbsCacheElement.h:39
RooJeffreysPrior::CacheElem
Definition: RooJeffreysPrior.h:39
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
RooJeffreysPrior::evaluate
Double_t evaluate() const
Calculate and return current value of self.
Definition: RooJeffreysPrior.cxx:98
RooAbsPdf
Definition: RooAbsPdf.h:40
RooRealVar
Definition: RooRealVar.h:36
RooJeffreysPrior
Definition: RooJeffreysPrior.h:17