20 #ifndef ROOSTATS_PdfProposal
23 #ifndef RooStats_RooStatsUtils
35 #ifndef ROO_MSG_SERVICE
41 #ifndef ROOT_TIterator
99 if (
fMap.size() > 0) {
101 fIt->first->setVal(
fIt->second->getVal(&x));
107 if (
fMap.size() > 0) {
119 fIt->first->setVal(
fIt->second->getVal(&x));
153 fIt->first->setVal(
fIt->second->getVal(&x2));
165 fMap.insert(pair<RooRealVar*, RooAbsReal*>(&proposalParam, &update));
ProposalFunction is an interface for all proposal functions that would be used with a Markov Chain Mo...
Bool_t equals(const RooAbsCollection &otherColl) const
Check if this and other collection have identically named contents.
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
void SetParameters(const RooArgSet *desiredVals, RooArgSet *paramsToChange)
virtual Bool_t Equals(RooArgSet &x1, RooArgSet &x2)
whether we own the proposal density function
Iterator abstract base class.
static const double x2[5]
virtual Double_t GetProposalDensity(RooArgSet &x1, RooArgSet &x2)
Return the probability of proposing the point x1 given the starting point x2.
TIterator * createIterator(Bool_t dir=kIterForward) const
Double_t getVal(const RooArgSet *set=0) const
virtual void AddMapping(RooRealVar &proposalParam, RooAbsReal &update)
specify a mapping between a parameter of the proposal function and a parameter of interest...
Int_t fCacheSize
the last point we were at
std::map< RooRealVar *, RooAbsReal * >::iterator fIt
map of values in pdf to update
RooArgSet * getParameters(const RooAbsData *data, Bool_t stripDisconnected=kTRUE) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
RooDataSet * fCache
our position in the cached proposal data set
ClassImp(RooStats::PdfProposal)
RooArgSet fLastX
pdf iterator
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
virtual const char * GetName() const
Returns name of object.
Bool_t fOwnsPdf
pointers to master variables needed for updates
Namespace for the RooStats classes.
virtual void Propose(RooArgSet &xPrime, RooArgSet &x)
Populate xPrime with a new proposed point.
static const double x1[5]
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooArgSet fMaster
the cached proposal data set
PdfProposal is a concrete implementation of the ProposalFunction interface.
std::map< RooRealVar *, RooAbsReal * > fMap
the proposal density function
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
RooDataSet * generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none())
Generate a new dataset containing the specified variables with events sampled from our distribution...
virtual TObject * Next()=0
virtual Bool_t IsSymmetric(RooArgSet &x1, RooArgSet &x2)
Determine whether or not the proposal density is symmetric for points x1 and x2 - that is...
virtual RooAbsArg * addClone(const RooAbsArg &var, Bool_t silent=kFALSE)
Add clone of specified element to an owning set.
virtual const RooArgSet * get(Int_t index) const
Return RooArgSet with coordinates of event 'index'.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add element to non-owning set.
Double_t getRealValue(const char *name, Double_t defVal=0, Bool_t verbose=kFALSE) const
Get value of a RooAbsReal stored in set with given name.
Int_t fCachePosition
how many points to generate each time