
PdfProposal is a concrete implementation of the ProposalFunction interface. It proposes points across the parameter space in the distribution of the given PDF.
To make Propose(xPrime, x) dependent on x, configure with PdfProposal::AddMapping(varToUpdate, valueToUse). For example, suppose we have:
// our parameter RooRealVar p("p", "p", 5, 0, 10); // create mean and sigma for gaussian proposal function RooRealVar meanP("meanP", "meanP", 0, 10); RooRealVar sigma("sigma", "sigma", 1, 0, 5); RooGaussian pGaussian("pGaussian", "pGaussian", p, meanP, sigma); // configure proposal function PdfProposal pdfProposal(pGaussian); pdfProposal.AddMapping(meanP, p); // each call of Propose(xPrime, x), meanP in // the proposal function will be updated to // the value of p in x. this will center the // proposal function about x's p when // proposing for xPrime // To improve performance, PdfProposal has the ability to cache a specified // number of proposals. If you don't call this function, the default cache size // is 1, which can be slow. pdfProposal.SetCacheSize(desiredCacheSize);
PdfProposal currently uses a fixed cache size. Adaptive caching methods are in the works for future versions.
| virtual | ~PdfProposal() |
| void | TObject::AbstractMethod(const char* method) const |
| virtual void | AddMapping(RooRealVar& proposalParam, RooAbsReal& update) |
| virtual void | TObject::AppendPad(Option_t* option = "") |
| virtual void | TObject::Browse(TBrowser* b) |
| virtual bool | RooStats::ProposalFunction::CheckParameters(RooArgSet& params) |
| static TClass* | Class() |
| virtual const char* | TObject::ClassName() const |
| virtual void | TObject::Clear(Option_t* = "") |
| virtual TObject* | TObject::Clone(const char* newname = "") const |
| virtual Int_t | TObject::Compare(const TObject* obj) const |
| virtual void | TObject::Copy(TObject& object) const |
| virtual void | TObject::Delete(Option_t* option = "")MENU |
| virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
| virtual void | TObject::Draw(Option_t* option = "") |
| virtual void | TObject::DrawClass() constMENU |
| virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
| virtual void | TObject::Dump() constMENU |
| virtual void | TObject::Error(const char* method, const char* msgfmt) const |
| virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
| virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
| virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
| virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
| virtual TObject* | TObject::FindObject(const char* name) const |
| virtual TObject* | TObject::FindObject(const TObject* obj) const |
| virtual Option_t* | TObject::GetDrawOption() const |
| static Long_t | TObject::GetDtorOnly() |
| virtual const char* | TObject::GetIconName() const |
| virtual const char* | TObject::GetName() const |
| virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
| static Bool_t | TObject::GetObjectStat() |
| virtual Option_t* | TObject::GetOption() const |
| virtual const RooAbsPdf* | GetPdf() const |
| virtual Double_t | GetProposalDensity(RooArgSet& x1, RooArgSet& x2) |
| virtual const char* | TObject::GetTitle() const |
| virtual UInt_t | TObject::GetUniqueID() const |
| virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
| virtual ULong_t | TObject::Hash() const |
| virtual void | TObject::Info(const char* method, const char* msgfmt) const |
| virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
| virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
| virtual void | TObject::Inspect() constMENU |
| void | TObject::InvertBit(UInt_t f) |
| virtual TClass* | IsA() const |
| virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
| virtual Bool_t | TObject::IsFolder() const |
| Bool_t | TObject::IsOnHeap() const |
| virtual Bool_t | TObject::IsSortable() const |
| virtual Bool_t | IsSymmetric(RooArgSet& x1, RooArgSet& x2) |
| Bool_t | TObject::IsZombie() const |
| virtual void | TObject::ls(Option_t* option = "") const |
| void | TObject::MayNotUse(const char* method) const |
| virtual Bool_t | TObject::Notify() |
| void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
| static void | TObject::operator delete(void* ptr) |
| static void | TObject::operator delete(void* ptr, void* vp) |
| static void | TObject::operator delete[](void* ptr) |
| static void | TObject::operator delete[](void* ptr, void* vp) |
| void* | TObject::operator new(size_t sz) |
| void* | TObject::operator new(size_t sz, void* vp) |
| void* | TObject::operator new[](size_t sz) |
| void* | TObject::operator new[](size_t sz, void* vp) |
| RooStats::PdfProposal& | operator=(const RooStats::PdfProposal&) |
| virtual void | TObject::Paint(Option_t* option = "") |
| RooStats::PdfProposal | PdfProposal() |
| RooStats::PdfProposal | PdfProposal(RooAbsPdf& pdf) |
| RooStats::PdfProposal | PdfProposal(const RooStats::PdfProposal&) |
| virtual void | TObject::Pop() |
| virtual void | TObject::Print(Option_t* option = "") const |
| virtual void | printMappings() |
| virtual void | Propose(RooArgSet& xPrime, RooArgSet& x) |
| virtual Int_t | TObject::Read(const char* name) |
| virtual void | TObject::RecursiveRemove(TObject* obj) |
| virtual void | Reset() |
| void | TObject::ResetBit(UInt_t f) |
| virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
| virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
| void | TObject::SetBit(UInt_t f) |
| void | TObject::SetBit(UInt_t f, Bool_t set) |
| virtual void | SetCacheSize(Int_t size) |
| virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
| static void | TObject::SetDtorOnly(void* obj) |
| static void | TObject::SetObjectStat(Bool_t stat) |
| virtual void | SetOwnsPdf(Bool_t ownsPdf) |
| virtual void | SetPdf(RooAbsPdf& pdf) |
| virtual void | TObject::SetUniqueID(UInt_t uid) |
| virtual void | ShowMembers(TMemberInspector&) |
| virtual void | Streamer(TBuffer&) |
| void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
| virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
| Bool_t | TObject::TestBit(UInt_t f) const |
| Int_t | TObject::TestBits(UInt_t f) const |
| virtual void | TObject::UseCurrentStyle() |
| virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
| virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
| virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
| virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
| virtual Bool_t | Equals(RooArgSet& x1, RooArgSet& x2) |
| void | TObject::MakeZombie() |
| enum TObject::EStatusBits { | kCanDelete | |
| kMustCleanup | ||
| kObjInCanvas | ||
| kIsReferenced | ||
| kHasUUID | ||
| kCannotPick | ||
| kNoContextMenu | ||
| kInvalidObject | ||
| }; | ||
| enum TObject::[unnamed] { | kIsOnHeap | |
| kNotDeleted | ||
| kZombie | ||
| kBitMask | ||
| kSingleKey | ||
| kOverwrite | ||
| kWriteDelete | ||
| }; |
| RooDataSet* | fCache | the cached proposal data set |
| Int_t | fCachePosition | our position in the cached proposal data set |
| Int_t | fCacheSize | how many points to generate each time |
| map<RooRealVar*,RooAbsReal*,less<RooRealVar*>,allocator<pair<RooRealVar* const,RooAbsReal*> > >::iterator | fIt | pdf iterator |
| RooArgSet | fLastX | the last point we were at |
| map<RooRealVar*,RooAbsReal*> | fMap | map of values in pdf to update |
| RooArgSet | fMaster | pointers to master variables needed for updates |
| Bool_t | fOwnsPdf | whether we own the proposal density function |
| RooAbsPdf* | fPdf | the proposal density function |

Set how many points to generate each time we propose from a new point Default (and minimum) is 1
set whether we own the PDF that serves as the proposal density function By default, when constructed, PdfProposal does NOT own the PDF.
{ fOwnsPdf = ownsPdf; }