A++ » ROOSTATS » RooStats::ToyMCSampler

class RooStats::ToyMCSampler: public RooStats::TestStatSampler

Function Members (Methods)

public:
virtual~ToyMCSampler()
virtual voidAddTestStatistic(RooStats::TestStatistic* t = __null)
virtual RooStats::SamplingDistribution*AppendSamplingDistribution(RooArgSet& allParameters, RooStats::SamplingDistribution* last, Int_t additionalMC)
Bool_tCheckConfig()
static TClass*Class()
virtual Double_tConfidenceLevel() const
virtual RooArgList*EvaluateAllTestStatistics(RooAbsData& data, const RooArgSet& poi)
virtual Double_tEvaluateTestStatistic(RooAbsData& data, RooArgSet& nullPOI)
virtual Double_tEvaluateTestStatistic(RooAbsData& data, RooArgSet& nullPOI, int i)
virtual voidGenerateGlobalObservables(RooAbsPdf& pdf) const
virtual RooAbsData*GenerateToyData(RooArgSet& paramPoint) const
virtual RooAbsData*GenerateToyData(RooArgSet& paramPoint, RooAbsPdf& pdf) const
virtual RooAbsData*GenerateToyData(RooArgSet& paramPoint, double& weight) const
virtual RooAbsData*GenerateToyData(RooArgSet& paramPoint, double& weight, RooAbsPdf& pdf) const
virtual Int_tGetNToys()
stringGetSamplingDistName()
virtual RooStats::SamplingDistribution*GetSamplingDistribution(RooArgSet& paramPoint)
virtual RooDataSet*GetSamplingDistributions(RooArgSet& paramPoint)
virtual RooDataSet*GetSamplingDistributionsSingleWorker(RooArgSet& paramPoint)
virtual RooStats::TestStatistic*GetTestStatistic() const
virtual RooStats::TestStatistic*GetTestStatistic(unsigned int i) const
virtual voidInitialize(RooAbsArg&, RooArgSet&, RooArgSet&)
virtual TClass*IsA() const
RooStats::ToyMCSampler&operator=(const RooStats::ToyMCSampler&)
static voidSetAlwaysUseMultiGen(Bool_t flag)
virtual voidSetAsimovNuisancePar(Bool_t i = kTRUE)
virtual voidSetConfidenceLevel(Double_t cl)
virtual voidSetExpectedNuisancePar(Bool_t i = kTRUE)
voidSetGenerateAutoBinned(Bool_t autoBinned = kTRUE)
voidSetGenerateBinned(bool binned = true)
voidSetGenerateBinnedTag(const char* binnedTag = "")
virtual voidSetGlobalObservables(const RooArgSet& o)
voidSetMaxToys(Double_t t)
virtual voidSetNEventsPerToy(const Int_t nevents)
virtual voidSetNToys(const Int_t ntoy)
virtual voidSetNuisanceParameters(const RooArgSet& np)
virtual voidSetObservables(const RooArgSet& o)
virtual voidSetParametersForTestStat(const RooArgSet& nullpoi)
virtual voidSetPdf(RooAbsPdf& pdf)
virtual voidSetPriorNuisance(RooAbsPdf* pdf)
voidSetProofConfig(RooStats::ProofConfig* pc = __null)
voidSetProtoData(const RooDataSet* d)
virtual voidSetSamplingDistName(const char* name)
virtual voidSetTestSize(Double_t size)
virtual voidSetTestStatistic(RooStats::TestStatistic* t)
virtual voidSetTestStatistic(RooStats::TestStatistic* testStatistic, unsigned int i)
voidSetToysBothTails(Double_t toys, Double_t low_threshold, Double_t high_threshold)
voidSetToysLeftTail(Double_t toys, Double_t threshold)
voidSetToysRightTail(Double_t toys, Double_t threshold)
voidSetUseMultiGen(Bool_t flag)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
RooStats::TestStatSamplerRooStats::TestStatSampler::TestStatSampler()
RooStats::TestStatSamplerRooStats::TestStatSampler::TestStatSampler(const RooStats::TestStatSampler&)
RooStats::ToyMCSamplerToyMCSampler()
RooStats::ToyMCSamplerToyMCSampler(const RooStats::ToyMCSampler&)
RooStats::ToyMCSamplerToyMCSampler(RooStats::TestStatistic& ts, Int_t ntoys)
protected:
virtual voidClearCache()
const RooArgList*EvaluateAllTestStatistics(RooAbsData& data, const RooArgSet& poi, RooStats::DetailedOutputAggregator& detOutAgg)
RooAbsData*Generate(RooAbsPdf& pdf, RooArgSet& observables, const RooDataSet* protoData = __null, int forceEvents = 0) const

Data Members

protected:
RooArgSet*_allVars!
RooAbsPdf::GenSpec*_gs1! GenSpec #1
RooAbsPdf::GenSpec*_gs2! GenSpec #2
RooAbsPdf::GenSpec*_gs3! GenSpec #3
RooAbsPdf::GenSpec*_gs4! GenSpec #4
list<RooAbsPdf::GenSpec*>_gsList!
list<RooArgSet*>_obsList!
list<RooAbsPdf*>_pdfList!
Double_tfAdaptiveHighLimit
Double_tfAdaptiveLowLimit
Bool_tfExpectedNuisanceParwhether to use expectation values for nuisance parameters (ie Asimov data set)
Bool_tfGenerateAutoBinned
Bool_tfGenerateBinned
TStringfGenerateBinnedTag
const RooArgSet*fGlobalObservables
Double_tfMaxToys
Int_tfNEventsnumber of events per toy (may be ignored depending on settings)
Int_tfNToysnumber of toys to generate
RooStats::NuisanceParametersSampler*fNuisanceParametersSampler!
const RooArgSet*fNuisancePars
const RooArgSet*fObservables
const RooArgSet*fParametersForTestStat
RooAbsPdf*fPdfmodel (can be alt or null)
RooAbsPdf*fPriorNuisanceprior pdf for nuisance parameters
RooStats::ProofConfig*fProofConfig!
const RooDataSet*fProtoDatain dev
stringfSamplingDistNamename of the model
Double_tfSize
vector<RooStats::TestStatistic*>fTestStatistics
Double_tfToysInTails
Bool_tfUseMultiGenUse PrepareMultiGen?
static Bool_tfgAlwaysUseMultiGenUse PrepareMultiGen always

Class Charts

Inheritance Chart:
RooStats::TestStatSampler
RooStats::ToyMCSampler
RooStats::ToyMCImportanceSampler

Function documentation

ToyMCSampler()
ToyMCSampler(RooStats::TestStatistic& ts, Int_t ntoys)
virtual ~ToyMCSampler()
void SetAlwaysUseMultiGen(Bool_t flag)
void SetUseMultiGen(Bool_t flag)
{ fUseMultiGen = flag ; }
SamplingDistribution* GetSamplingDistribution(RooArgSet& paramPoint)
 main interface
RooDataSet* GetSamplingDistributions(RooArgSet& paramPoint)
RooDataSet* GetSamplingDistributionsSingleWorker(RooArgSet& paramPoint)
SamplingDistribution* AppendSamplingDistribution(RooArgSet& allParameters, RooStats::SamplingDistribution* last, Int_t additionalMC)
 The pdf can be NULL in which case the density from SetPdf()
 is used. The snapshot and TestStatistic is also optional.
RooAbsData* GenerateToyData(RooArgSet& paramPoint, RooAbsPdf& pdf) const
 generates toy data
   without weight
return GenerateToyData(paramPoint, weight, pdf)
RooAbsData* GenerateToyData(RooArgSet& paramPoint) const
   with weight
{ return GenerateToyData(paramPoint,*fPdf); }
RooAbsData* GenerateToyData(RooArgSet& paramPoint, double& weight, RooAbsPdf& pdf) const
void GenerateGlobalObservables(RooAbsPdf& pdf) const
 generate global observables
Double_t EvaluateTestStatistic(RooAbsData& data, RooArgSet& nullPOI, int i)
 Main interface to evaluate the test statistic on a dataset
Double_t EvaluateTestStatistic(RooAbsData& data, RooArgSet& nullPOI)
{ return EvaluateTestStatistic( data,nullPOI, 0 ); }
RooArgList* EvaluateAllTestStatistics(RooAbsData& data, const RooArgSet& poi)
TestStatistic* GetTestStatistic(unsigned int i) const
TestStatistic* GetTestStatistic(unsigned int i) const
{ return GetTestStatistic(0); }
Double_t ConfidenceLevel() const
{ return 1. - fSize; }
void Initialize(RooAbsArg& , RooArgSet& , RooArgSet& )
{ return fNToys; }
void SetNToys(const Int_t ntoy)
{ fNToys = ntoy; }
void SetNEventsPerToy(const Int_t nevents)
 Forces n events even for extended PDFs. Set NEvents=0 to
 use the Poisson distributed events from the extended PDF.
void SetParametersForTestStat(const RooArgSet& nullpoi)
 Set the Pdf, add to the the workspace if not already there
void SetPdf(RooAbsPdf& pdf)
{ fPdf = &pdf; ClearCache(); }
void SetPriorNuisance(RooAbsPdf* pdf)
 How to randomize the prior. Set to NULL to deactivate randomization.
void SetNuisanceParameters(const RooArgSet& np)
 specify the nuisance parameters (eg. the rest of the parameters)
{ fNuisancePars = &np; }
void SetObservables(const RooArgSet& o)
 specify the observables in the dataset (needed to evaluate the test statistic)
{ fObservables = &o; }
void SetGlobalObservables(const RooArgSet& o)
 specify the conditional observables
void SetTestSize(Double_t size)
 set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
{ fSize = size; }
void SetConfidenceLevel(Double_t cl)
 set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
{ fSize = 1. - cl; }
void SetTestStatistic(RooStats::TestStatistic* testStatistic, unsigned int i)
 Set the TestStatistic (want the argument to be a function of the data & parameter points
void SetTestStatistic(RooStats::TestStatistic* t)
{ return SetTestStatistic(t,0); }
void SetExpectedNuisancePar(Bool_t i = kTRUE)
void SetAsimovNuisancePar(Bool_t i = kTRUE)
Bool_t CheckConfig(void)
 Checks for sufficient information to do a GetSamplingDistribution(...).
void SetGenerateBinned(bool binned = true)
 control to use bin data generation (=> see RooFit::AllBinned() option)
{ fGenerateBinned = binned; }
void SetGenerateBinnedTag(const char* binnedTag = "")
 name of the tag for individual components to be generated binned (=> see RooFit::GenBinned() option)
{ fGenerateBinnedTag = binnedTag; }
void SetGenerateAutoBinned(Bool_t autoBinned = kTRUE)
 set auto binned generation (=> see RooFit::AutoBinned() option)
{ fGenerateAutoBinned = autoBinned; }
void SetSamplingDistName(const char* name)
 Set the name of the sampling distribution used for plotting
{ if(name) fSamplingDistName = name; }
std::string GetSamplingDistName(void)
{ return fSamplingDistName; }
void SetMaxToys(Double_t t)
 This option forces a maximum number of total toys.
{ fMaxToys = t; }
void SetToysLeftTail(Double_t toys, Double_t threshold)
void SetToysRightTail(Double_t toys, Double_t threshold)
void SetToysBothTails(Double_t toys, Double_t low_threshold, Double_t high_threshold)
void SetProofConfig(RooStats::ProofConfig* pc = __null)
 calling with argument or NULL deactivates proof
{ fProofConfig = pc; }
void SetProtoData(const RooDataSet* d)
{ fProtoData = d; }
const RooArgList* EvaluateAllTestStatistics(RooAbsData& data, const RooArgSet& poi, RooStats::DetailedOutputAggregator& detOutAgg)
RooAbsData* Generate(RooAbsPdf& pdf, RooArgSet& observables, const RooDataSet* protoData = __null, int forceEvents = 0) const
 helper for GenerateToyData
void ClearCache()
 helper method for clearing  the cache