23 #ifndef RooStats_ProposalHelper
26 #ifndef ROOSTATS_PdfProposal
29 #ifndef RooStats_RooStatsUtils
50 #ifndef ROO_MSG_SERVICE
56 #ifndef ROOT_TIterator
59 #ifndef ROO_MULTI_VAR_GAUSSIAN
77 using namespace RooFit;
78 using namespace RooStats;
88 ProposalHelper::ProposalHelper()
106 fCluesOptions =
NULL;
117 if (fCluesPdf ==
NULL)
119 if (fCluesPdf !=
NULL) {
122 printf(
"added clues from dataset %s with fraction %g\n",
123 fClues->GetName(), fCluesFrac);
124 components->
add(*fCluesPdf);
129 components->
add(*fUniformPdf);
132 components->
add(*fPdf);
134 *components, *coeffs);
135 fPdfProp->SetPdf(*addPdf);
136 fPdfProp->SetOwnsPdf(
kTRUE);
138 fPdfProp->SetCacheSize(fCacheSize);
143 void ProposalHelper::CreatePdf()
150 "Variables to create proposal function for are not set." << endl;
164 fPdfProp->AddMapping(*clone, *r);
166 if (fCovMatrix ==
NULL)
167 CreateCovMatrix(*xVec);
180 for (
Int_t i = 0; i < size; i++) {
183 (*fCovMatrix)(i,i) = range / fSigmaRangeDivisor;
187 void ProposalHelper::CreateCluesPdf()
189 if (fClues !=
NULL) {
190 if (fCluesOptions ==
NULL)
191 fCluesPdf =
new RooNDKeysPdf(
"cluesPdf",
"Clues PDF", *fVars, *fClues);
193 fCluesPdf =
new RooNDKeysPdf(
"cluesPdf",
"Clues PDF", *fVars, *fClues,
198 void ProposalHelper::CreateUniformPdf()
200 fUniformPdf =
new RooUniform(
"uniform",
"Uniform Proposal PDF",
ProposalFunction is an interface for all proposal functions that would be used with a Markov Chain Mo...
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
static const Double_t DEFAULT_CLUES_FRAC
virtual Double_t getMin(const char *name=0) const
Iterator abstract base class.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
RooRealVar represents a fundamental (non-derived) real valued object.
virtual const char * GetName() const
Returns name of object.
static const Double_t SIGMA_RANGE_DIVISOR
Generic N-dimensional implementation of a kernel estimation p.d.f.
ClassImp(RooStats::ProposalHelper)
Multivariate Gaussian p.d.f.
RooAbsArg * at(Int_t idx) const
TMatrixTSym< Double_t > TMatrixDSym
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
PdfProposal is a concrete implementation of the ProposalFunction interface.
virtual Double_t getMax(const char *name=0) const
virtual TObject * clone(const char *newname) const
RooConstVar & RooConst(Double_t val)
virtual TObject * Next()=0