13#ifndef ROOSTATS_ToyMCSampler
14#define ROOSTATS_ToyMCSampler
40 class DetailedOutputAggregator;
102 oocoutI((
TObject*)0,InputArguments) <<
"No test statistic given. Doing nothing." << std::endl;
114 if(
fExpectedNuisancePar)
oocoutE((
TObject*)NULL,InputArguments) <<
"ToyMCSampler: using expected nuisance parameters but ignoring weight. Use GetSamplingDistribution(paramPoint, weight) instead." << std::endl;
188 oocoutE((
TObject*)NULL,InputArguments) <<
"Cannot set test statistic for this index." << std::endl;
289 mutable std::list<RooAbsPdf::GenSpec*>
_gsList ;
#define ClassDef(name, id)
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
RooDataSet is a container class to hold unbinned data.
static Double_t infinity()
Return internal infinity representation.
This class is designed to aid in the construction of RooDataSets and RooArgSets, particularly those n...
Holds configuration options for proof and proof-lite.
This class simply holds a sampling distribution of some test statistic.
TestStatSampler is an interface class for a tools which produce RooStats SamplingDistributions.
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
ToyMCSampler is an implementation of the TestStatSampler interface.
const RooArgSet * fGlobalObservables
RooAbsPdf::GenSpec * _gs3
GenSpec #2.
virtual void SetNToys(const Int_t ntoy)
void SetToysBothTails(Double_t toys, Double_t low_threshold, Double_t high_threshold)
std::list< RooAbsPdf::GenSpec * > _gsList
void SetProtoData(const RooDataSet *d)
std::string fSamplingDistName
virtual void GenerateGlobalObservables(RooAbsPdf &pdf) const
Double_t fAdaptiveLowLimit
virtual RooDataSet * GetSamplingDistributionsSingleWorker(RooArgSet ¶mPoint)
This is the main function for serial runs.
std::string GetSamplingDistName(void)
void SetProofConfig(ProofConfig *pc=NULL)
RooAbsData * Generate(RooAbsPdf &pdf, RooArgSet &observables, const RooDataSet *protoData=NULL, int forceEvents=0) const
This is the generate function to use in the context of the ToyMCSampler instead of the standard RooAb...
std::unique_ptr< const RooArgSet > fParametersForTestStat
virtual Double_t EvaluateTestStatistic(RooAbsData &data, RooArgSet &nullPOI, int i)
RooAbsPdf::GenSpec * _gs2
GenSpec #1.
virtual SamplingDistribution * AppendSamplingDistribution(RooArgSet &allParameters, SamplingDistribution *last, Int_t additionalMC)
Extended interface to append to sampling distribution more samples.
NuisanceParametersSampler * fNuisanceParametersSampler
virtual void Initialize(RooAbsArg &, RooArgSet &, RooArgSet &)
const RooArgSet * fObservables
virtual void SetObservables(const RooArgSet &o)
Double_t fAdaptiveHighLimit
void SetGenerateAutoBinned(Bool_t autoBinned=kTRUE)
virtual TestStatistic * GetTestStatistic(unsigned int i) const
void SetSamplingDistName(const char *name)
void SetToysLeftTail(Double_t toys, Double_t threshold)
virtual RooArgList * EvaluateAllTestStatistics(RooAbsData &data, const RooArgSet &poi)
Evaluate all test statistics, returning result and any detailed output.
virtual void SetPdf(RooAbsPdf &pdf)
virtual RooDataSet * GetSamplingDistributions(RooArgSet ¶mPoint)
Use for serial and parallel runs.
void SetGenerateBinnedTag(const char *binnedTag="")
Bool_t CheckConfig(void)
only checks, no guessing/determination (do this in calculators, e.g.
virtual void SetPriorNuisance(RooAbsPdf *pdf)
virtual TestStatistic * GetTestStatistic(void) const
static Bool_t fgAlwaysUseMultiGen
GenSpec #4.
virtual RooAbsData * GenerateToyData(RooArgSet ¶mPoint, RooAbsPdf &pdf) const
virtual void AddTestStatistic(TestStatistic *t=NULL)
const RooArgSet * fNuisancePars
std::list< RooArgSet * > _obsList
static void SetAlwaysUseMultiGen(Bool_t flag)
Bool_t fExpectedNuisancePar
virtual Int_t GetNToys(void)
std::vector< TestStatistic * > fTestStatistics
virtual void SetTestStatistic(TestStatistic *testStatistic, unsigned int i)
ToyMCSampler()
Proof constructor. Do not use.
virtual void SetGlobalObservables(const RooArgSet &o)
virtual Double_t EvaluateTestStatistic(RooAbsData &data, RooArgSet &nullPOI)
virtual void SetAsimovNuisancePar(Bool_t i=kTRUE)
void SetGenerateBinned(bool binned=true)
virtual void SetExpectedNuisancePar(Bool_t i=kTRUE)
virtual Double_t ConfidenceLevel() const
virtual void SetTestSize(Double_t size)
virtual void SetTestStatistic(TestStatistic *t)
void SetUseMultiGen(Bool_t flag)
virtual void ClearCache()
clear the cache obtained from the pdf used for speeding the toy and global observables generation nee...
void SetToysRightTail(Double_t toys, Double_t threshold)
Bool_t fGenerateAutoBinned
RooAbsPdf::GenSpec * _gs4
GenSpec #3.
ProofConfig * fProofConfig
void SetMaxToys(Double_t t)
virtual void SetNEventsPerToy(const Int_t nevents)
Forces the generation of exactly n events even for extended PDFs.
virtual RooAbsData * GenerateToyData(RooArgSet ¶mPoint, double &weight) const
const RooDataSet * fProtoData
virtual RooAbsData * GenerateToyData(RooArgSet ¶mPoint) const
virtual SamplingDistribution * GetSamplingDistribution(RooArgSet ¶mPoint)
std::list< RooAbsPdf * > _pdfList
virtual void SetNuisanceParameters(const RooArgSet &np)
TString fGenerateBinnedTag
RooAbsPdf::GenSpec * _gs1
RooAbsPdf * fPriorNuisance
virtual void SetParametersForTestStat(const RooArgSet &nullpoi)
virtual void SetConfidenceLevel(Double_t cl)
Mother of all ROOT objects.
Namespace for the RooStats classes.