Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
20  RooJeffreysPrior() { };
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  RooPdfProxy _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  };
52  mutable RooObjCacheManager _cacheMgr; //!
53 
54  ClassDef(RooJeffreysPrior,2) // Sum of RooAbsReal objects
55 };
56 
57 #endif