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));
virtual const char * GetName() const
Returns name of object.
ProposalFunction is an interface for all proposal functions that would be used with a Markov Chain Mo...
TIterator * createIterator(Bool_t dir=kIterForward) const
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
Double_t getVal(const RooArgSet *set=0) const
void SetParameters(const RooArgSet *desiredVals, RooArgSet *paramsToChange)
virtual Bool_t Equals(RooArgSet &x1, RooArgSet &x2)
whether we own the proposal density function
Bool_t equals(const RooAbsCollection &otherColl) const
Check if this and other collection have identically named contents.
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.
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
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void addClone(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
RooDataSet * fCache
our position in the cached proposal data set
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)
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual const RooArgSet * get(Int_t index) const
Return RooArgSet with coordinates of event 'index'.
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 * 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...
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...
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.
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...
Int_t fCachePosition
how many points to generate each time