1 #ifndef ROOT_ToyMCSamplerOpt_h
2 #define ROOT_ToyMCSamplerOpt_h
4 #include <RooStats/ToyMCSampler.h>
8 namespace toymcoptutils {
12 SinglePdfGenInfo(RooAbsPdf &
pdf,
const RooArgSet& observables,
bool preferBinned,
const RooDataSet* protoData =
NULL,
int forceEvents = 0) ;
14 RooAbsData *
generate(
const RooDataSet* protoData =
NULL,
int forceEvents = 0) ;
17 const RooAbsPdf *
pdf()
const {
return pdf_; }
34 SimPdfGenInfo(RooAbsPdf &pdf,
const RooArgSet& observables,
bool preferBinned,
const RooDataSet* protoData =
NULL,
int forceEvents = 0) ;
36 RooAbsData *
generate(RooRealVar *&weightVar,
const RooDataSet* protoData =
NULL,
int forceEvents = 0) ;
42 RooAbsCategoryLValue *
cat_;
44 std::vector<SinglePdfGenInfo *>
pdfs_;
55 ToyMCSamplerOpt(RooStats::TestStatistic& ts, Int_t ntoys, RooAbsPdf *globalObsPdf = 0,
bool generateNuisances =
false) ;
59 virtual void SetPdf(RooAbsPdf& pdf) ;
63 RooAbsData*
Generate(RooAbsPdf& pdf, RooArgSet& observables,
const RooDataSet* protoData =
NULL,
int forceEvents = 0)
const ;
73 mutable std::map<RooAbsPdf *, toymcoptutils::SimPdfGenInfo *>
genCache_;
RooAbsCategoryLValue * cat_
ToyMCSamplerOpt(RooStats::TestStatistic &ts, Int_t ntoys, RooAbsPdf *globalObsPdf=0, bool generateNuisances=false)
RooAbsData * Generate(RooAbsPdf &pdf, RooArgSet &observables, const RooDataSet *protoData=NULL, int forceEvents=0) const
RooAbsData * generateAsimov(RooRealVar *&weightVar)
RooAbsData * generate(const RooDataSet *protoData=NULL, int forceEvents=0)
RooDataSet * globalObsValues_
std::map< std::string, RooAbsData * > datasetPieces_
const RooAbsPdf * pdf() const
virtual RooAbsData * GenerateToyData(RooArgSet &, double &weight) const
RooDataSet * generatePseudoAsimov(RooRealVar *&weightVar, int nPoints)
void setToExpected(RooProdPdf &prod, RooArgSet &obs)
void setCacheTemplates(bool cache)
std::map< RooAbsPdf *, toymcoptutils::SimPdfGenInfo * > genCache_
RooDataSet * generateCountingAsimov()
void setCacheTemplates(bool cache)
RooAbsData * generate(RooRealVar *&weightVar, const RooDataSet *protoData=NULL, int forceEvents=0)
RooAbsPdf::GenSpec * spec_
virtual void SetPdf(RooAbsPdf &pdf)
RooDataSet * generateWithHisto(RooRealVar *&weightVar, bool asimov)
void setCopyData(bool copyData)
RooAbsPdf * globalObsPdf_
RooDataSet * generateAsimov(RooRealVar *&weightVar)
std::vector< SinglePdfGenInfo * > pdfs_
SimPdfGenInfo(RooAbsPdf &pdf, const RooArgSet &observables, bool preferBinned, const RooDataSet *protoData=NULL, int forceEvents=0)
void setGlobalObsPdf(RooAbsPdf *pdf)
SinglePdfGenInfo(RooAbsPdf &pdf, const RooArgSet &observables, bool preferBinned, const RooDataSet *protoData=NULL, int forceEvents=0)