12 #ifndef ROOSTATS_PdfProposal
13 #define ROOSTATS_PdfProposal
30 class PdfProposal :
public ProposalFunction {
34 PdfProposal(RooAbsPdf& pdf);
37 virtual void Propose(RooArgSet& xPrime, RooArgSet& x);
42 virtual Bool_t IsSymmetric(RooArgSet& x1, RooArgSet& x2);
46 virtual Double_t GetProposalDensity(RooArgSet& x1, RooArgSet& x2);
49 virtual void SetPdf(RooAbsPdf& pdf) { fPdf = &pdf; }
52 virtual const RooAbsPdf* GetPdf()
const {
return fPdf; }
61 virtual void AddMapping(RooRealVar& proposalParam, RooAbsReal& update);
71 virtual void printMappings()
73 std::map<RooRealVar*, RooAbsReal*>::iterator it;
74 for (it = fMap.begin(); it != fMap.end(); it++)
75 std::cout << it->first->GetName() <<
" => " << it->second->GetName() << std::endl;
80 virtual void SetCacheSize(Int_t size)
85 coutE(Eval) <<
"Warning: Requested non-positive cache size: " <<
86 size <<
". Cache size unchanged." << std::endl;
91 virtual void SetOwnsPdf(Bool_t ownsPdf) { fOwnsPdf = ownsPdf; }
96 virtual ~PdfProposal()
105 std::map<RooRealVar*, RooAbsReal*> fMap;
106 std::map<RooRealVar*, RooAbsReal*>::iterator fIt;
109 Int_t fCachePosition;
116 virtual Bool_t Equals(RooArgSet& x1, RooArgSet& x2);
119 ClassDef(PdfProposal,1)