ToyMCSampler is a simple implementation of the TestStatSampler interface. It generates Toy Monte Carlo for a given parameter point, and evaluates a test statistic that the user specifies (passed via the RooStats::TestStatistic interface). Development notes: We need to provide a nice way for the user to:
Int_t | fCounter | counter for naming sampling dist objects |
const char* | fDataName | name of data set in workspace |
Bool_t | fExtended | if nEvents should fluctuate |
RooDataSet* | fLastDataSet | work around for memory issues in nllvar->setData(data, noclone) |
Int_t | fNevents | number of events per toy (may be ignored depending on settings) |
Int_t | fNtoys | number of toys to generate |
RooArgSet* | fNuisParams | RooArgSet specifying nuisance parameters for interval |
RooArgSet* | fObservables | RooArgSet specifying the observables in the dataset (needed to evaluate the test statistic) |
Bool_t | fOwnsWorkspace | flag if this object owns its workspace |
RooArgSet* | fPOI | RooArgSet specifying parameters of interest for interval |
const char* | fPdfName | name of common PDF in workspace |
TRandom* | fRand | random generator |
Double_t | fSize | |
RooStats::TestStatistic* | fTestStat | pointer to the test statistic that is being sampled |
TString | fVarName | name of test statistic |
RooWorkspace* | fWS | a workspace that owns all the components to be used by the calculator |
Extended interface to append to sampling distribution more samples
Main interface to get a SamplingDistribution
This method generates a toy dataset for the given parameter point.
Main interface to evaluate the test statistic on a dataset
specify the name of the dataset in the workspace to be used
{fDataName = name;}
specify the name of the PDF in the workspace to be used
{fPdfName = name;}
specify the nuisance parameters (eg. the rest of the parameters)
{fNuisParams = &set;}
specify the observables in the dataset (needed to evaluate the test statistic)
{fObservables = &set;}
set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
{fSize = size;}
set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
{fSize = 1.-cl;}
Set the TestStatistic (want the argument to be a function of the data & parameter points
{}