Logo ROOT  
Reference Guide
RooStats::ToyMCSampler Class Reference

ToyMCSampler is an implementation of the TestStatSampler interface.

It generates Toy Monte Carlo for a given parameter point and evaluates a TestStatistic.

For parallel runs, ToyMCSampler can be given an instance of ProofConfig and then run in parallel using proof or proof-lite. Internally, it uses ToyMCStudy with the RooStudyManager.

Definition at line 67 of file ToyMCSampler.h.

Public Member Functions

 ToyMCSampler ()
 Proof constructor. Do not use. More...
 
 ToyMCSampler (TestStatistic &ts, Int_t ntoys)
 
 ~ToyMCSampler () override
 
virtual void AddTestStatistic (TestStatistic *t=nullptr)
 The pdf can be nullptr in which case the density from SetPdf() is used. More...
 
virtual SamplingDistributionAppendSamplingDistribution (RooArgSet &allParameters, SamplingDistribution *last, Int_t additionalMC)
 Extended interface to append to sampling distribution more samples. More...
 
bool CheckConfig (void)
 Checks for sufficient information to do a GetSamplingDistribution(...). More...
 
double ConfidenceLevel () const override
 Get the Confidence level for the test. More...
 
virtual RooArgListEvaluateAllTestStatistics (RooAbsData &data, const RooArgSet &poi)
 Evaluate all test statistics, returning result and any detailed output. More...
 
double EvaluateTestStatistic (RooAbsData &data, RooArgSet &nullPOI) override
 Main interface to evaluate the test statistic on a dataset. More...
 
virtual double EvaluateTestStatistic (RooAbsData &data, RooArgSet &nullPOI, int i)
 Main interface to evaluate the test statistic on a dataset. More...
 
virtual void GenerateGlobalObservables (RooAbsPdf &pdf) const
 generate global observables More...
 
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint) const
 
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint, double &weight) const
 
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint, double &weight, RooAbsPdf &pdf) const
 generates toy data with weight More...
 
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint, RooAbsPdf &pdf) const
 generates toy data without weight More...
 
virtual Int_t GetNToys (void)
 
std::string GetSamplingDistName (void)
 
SamplingDistributionGetSamplingDistribution (RooArgSet &paramPoint) override
 main interface More...
 
virtual RooDataSetGetSamplingDistributions (RooArgSet &paramPoint)
 Use for serial and parallel runs. More...
 
virtual RooDataSetGetSamplingDistributionsSingleWorker (RooArgSet &paramPoint)
 This is the main function for serial runs. More...
 
virtual TestStatisticGetTestStatistic (unsigned int i) const
 
TestStatisticGetTestStatistic (void) const override
 Get the TestStatistic. More...
 
void Initialize (RooAbsArg &, RooArgSet &, RooArgSet &) override
 Common Initialization. More...
 
TClassIsA () const override
 
virtual void SetAsimovNuisancePar (bool i=true)
 
void SetConfidenceLevel (double cl) override
 set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval) More...
 
virtual void SetExpectedNuisancePar (bool i=true)
 
void SetGenerateAutoBinned (bool autoBinned=true)
 set auto binned generation (=> see RooFit::AutoBinned() option) More...
 
void SetGenerateBinned (bool binned=true)
 control to use bin data generation (=> see RooFit::AllBinned() option) More...
 
void SetGenerateBinnedTag (const char *binnedTag="")
 name of the tag for individual components to be generated binned (=> see RooFit::GenBinned() option) More...
 
void SetGlobalObservables (const RooArgSet &o) override
 specify the conditional observables More...
 
void SetMaxToys (double t)
 This option forces a maximum number of total toys. More...
 
virtual void SetNEventsPerToy (const Int_t nevents)
 Forces the generation of exactly n events even for extended PDFs. More...
 
virtual void SetNToys (const Int_t ntoy)
 
void SetNuisanceParameters (const RooArgSet &np) override
 specify the nuisance parameters (eg. the rest of the parameters) More...
 
void SetObservables (const RooArgSet &o) override
 specify the observables in the dataset (needed to evaluate the test statistic) More...
 
void SetParametersForTestStat (const RooArgSet &nullpoi) override
 Set the Pdf, add to the workspace if not already there. More...
 
void SetPdf (RooAbsPdf &pdf) override
 Set the Pdf, add to the workspace if not already there. More...
 
void SetPriorNuisance (RooAbsPdf *pdf) override
 How to randomize the prior. Set to nullptr to deactivate randomization. More...
 
void SetProofConfig (ProofConfig *pc=nullptr)
 calling with argument or nullptr deactivates proof More...
 
void SetProtoData (const RooDataSet *d)
 
void SetSamplingDistName (const char *name) override
 Set the name of the sampling distribution used for plotting. More...
 
void SetTestSize (double size) override
 set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval) More...
 
void SetTestStatistic (TestStatistic *t) override
 Set the TestStatistic (want the argument to be a function of the data & parameter points. More...
 
virtual void SetTestStatistic (TestStatistic *testStatistic, unsigned int i)
 Set the TestStatistic (want the argument to be a function of the data & parameter points. More...
 
void SetToysBothTails (double toys, double low_threshold, double high_threshold)
 
void SetToysLeftTail (double toys, double threshold)
 
void SetToysRightTail (double toys, double threshold)
 
void SetUseMultiGen (bool flag)
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from RooStats::TestStatSampler
virtual ~TestStatSampler ()
 
virtual double ConfidenceLevel () const =0
 Get the Confidence level for the test. More...
 
virtual double EvaluateTestStatistic (RooAbsData &data, RooArgSet &paramsOfInterest)=0
 Main interface to evaluate the test statistic on a dataset. More...
 
virtual SamplingDistributionGetSamplingDistribution (RooArgSet &paramsOfInterest)=0
 Main interface to get a ConfInterval, pure virtual. More...
 
virtual TestStatisticGetTestStatistic () const =0
 Get the TestStatistic. More...
 
virtual void Initialize (RooAbsArg &testStatistic, RooArgSet &paramsOfInterest, RooArgSet &nuisanceParameters)=0
 Common Initialization. More...
 
virtual TClassIsA () const
 
virtual void SetConfidenceLevel (double cl)=0
 set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval) More...
 
virtual void SetGlobalObservables (const RooArgSet &)=0
 specify the conditional observables More...
 
virtual void SetNuisanceParameters (const RooArgSet &)=0
 specify the nuisance parameters (eg. the rest of the parameters) More...
 
virtual void SetObservables (const RooArgSet &)=0
 specify the observables in the dataset (needed to evaluate the test statistic) More...
 
virtual void SetParametersForTestStat (const RooArgSet &)=0
 specify the values of parameters used when evaluating test statistic More...
 
virtual void SetPdf (RooAbsPdf &)=0
 Set the Pdf, add to the workspace if not already there. More...
 
virtual void SetPriorNuisance (RooAbsPdf *)=0
 How to randomize the prior. Set to nullptr to deactivate randomization. More...
 
virtual void SetSamplingDistName (const char *name)=0
 Set the name of the sampling distribution used for plotting. More...
 
virtual void SetTestSize (double size)=0
 set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval) More...
 
virtual void SetTestStatistic (TestStatistic *testStatistic)=0
 Set the TestStatistic (want the argument to be a function of the data & parameter points. More...
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static void SetAlwaysUseMultiGen (bool flag)
 
- Static Public Member Functions inherited from RooStats::TestStatSampler
static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Member Functions

virtual void ClearCache ()
 helper method for clearing the cache More...
 
const RooArgListEvaluateAllTestStatistics (RooAbsData &data, const RooArgSet &poi, DetailedOutputAggregator &detOutAgg)
 
RooAbsDataGenerate (RooAbsPdf &pdf, RooArgSet &observables, const RooDataSet *protoData=nullptr, int forceEvents=0) const
 helper for GenerateToyData More...
 

Protected Attributes

std::unique_ptr< RooArgSet_allVars
 ! More...
 
std::unique_ptr< RooAbsPdf::GenSpec_gs1
 ! GenSpec #1 More...
 
std::unique_ptr< RooAbsPdf::GenSpec_gs2
 ! GenSpec #2 More...
 
std::unique_ptr< RooAbsPdf::GenSpec_gs3
 ! GenSpec #3 More...
 
std::unique_ptr< RooAbsPdf::GenSpec_gs4
 ! GenSpec #4 More...
 
std::vector< std::unique_ptr< RooAbsPdf::GenSpec > > _gsList
 ! More...
 
std::vector< std::unique_ptr< RooArgSet > > _obsList
 ! More...
 
std::vector< RooAbsPdf * > _pdfList
 ! We don't own those objects More...
 
double fAdaptiveHighLimit
 
double fAdaptiveLowLimit
 tails More...
 
bool fExpectedNuisancePar
 whether to use expectation values for nuisance parameters (ie Asimov data set) More...
 
bool fGenerateAutoBinned
 
bool fGenerateBinned
 
TString fGenerateBinnedTag
 
const RooArgSetfGlobalObservables
 
double fMaxToys
 maximum no of toys (taking weights into account, therefore double) More...
 
Int_t fNEvents
 number of events per toy (may be ignored depending on settings) More...
 
Int_t fNToys
 number of toys to generate More...
 
NuisanceParametersSamplerfNuisanceParametersSampler
 ! More...
 
const RooArgSetfNuisancePars
 
const RooArgSetfObservables
 
std::unique_ptr< const RooArgSetfParametersForTestStat
 
RooAbsPdffPdf
 densities, snapshots, and test statistics to reweight to More...
 
RooAbsPdffPriorNuisance
 prior pdf for nuisance parameters More...
 
ProofConfigfProofConfig
 ! More...
 
const RooDataSetfProtoData
 in dev More...
 
std::string fSamplingDistName
 name of the model More...
 
double fSize
 
std::vector< TestStatistic * > fTestStatistics
 
double fToysInTails
 minimum no of toys in tails for adaptive sampling (taking weights into account, therefore double) Default: 0.0 which means no adaptive sampling More...
 
bool fUseMultiGen
 Use PrepareMultiGen? More...
 

Static Protected Attributes

static bool fgAlwaysUseMultiGen = false
 Use PrepareMultiGen always. More...
 

#include <RooStats/ToyMCSampler.h>

Inheritance diagram for RooStats::ToyMCSampler:
[legend]

Constructor & Destructor Documentation

◆ ToyMCSampler() [1/2]

RooStats::ToyMCSampler::ToyMCSampler ( )

Proof constructor. Do not use.

Definition at line 149 of file ToyMCSampler.cxx.

◆ ToyMCSampler() [2/2]

RooStats::ToyMCSampler::ToyMCSampler ( TestStatistic ts,
Int_t  ntoys 
)

Definition at line 183 of file ToyMCSampler.cxx.

◆ ~ToyMCSampler()

RooStats::ToyMCSampler::~ToyMCSampler ( )
override

Definition at line 218 of file ToyMCSampler.cxx.

Member Function Documentation

◆ AddTestStatistic()

virtual void RooStats::ToyMCSampler::AddTestStatistic ( TestStatistic t = nullptr)
inlinevirtual

The pdf can be nullptr in which case the density from SetPdf() is used.

The snapshot and TestStatistic is also optional.

Definition at line 93 of file ToyMCSampler.h.

◆ AppendSamplingDistribution()

SamplingDistribution * RooStats::ToyMCSampler::AppendSamplingDistribution ( RooArgSet allParameters,
SamplingDistribution last,
Int_t  additionalMC 
)
virtual

Extended interface to append to sampling distribution more samples.

Definition at line 659 of file ToyMCSampler.cxx.

◆ CheckConfig()

bool RooStats::ToyMCSampler::CheckConfig ( void  )

Checks for sufficient information to do a GetSamplingDistribution(...).

only checks, no guessing/determination (do this in calculators, e.g.

using ModelConfig::GuessObsAndNuisance(...))

Definition at line 228 of file ToyMCSampler.cxx.

◆ Class()

static TClass * RooStats::ToyMCSampler::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * RooStats::ToyMCSampler::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static Version_t RooStats::ToyMCSampler::Class_Version ( )
inlinestatic
Returns
Version of this class

Definition at line 291 of file ToyMCSampler.h.

◆ ClearCache()

void RooStats::ToyMCSampler::ClearCache ( void  )
protectedvirtual

helper method for clearing the cache

clear the cache obtained from the pdf used for speeding the toy and global observables generation needs to be called every time the model pdf (fPdf) changes

Reimplemented in RooStats::ToyMCImportanceSampler.

Definition at line 682 of file ToyMCSampler.cxx.

◆ ConfidenceLevel()

double RooStats::ToyMCSampler::ConfidenceLevel ( ) const
inlineoverridevirtual

Get the Confidence level for the test.

Implements RooStats::TestStatSampler.

Definition at line 133 of file ToyMCSampler.h.

◆ DeclFileName()

static const char * RooStats::ToyMCSampler::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 291 of file ToyMCSampler.h.

◆ EvaluateAllTestStatistics() [1/2]

RooArgList * RooStats::ToyMCSampler::EvaluateAllTestStatistics ( RooAbsData data,
const RooArgSet poi 
)
virtual

Evaluate all test statistics, returning result and any detailed output.

PDF parameter values are saved in case they are modified by TestStatistic::Evaluate (eg. SimpleLikelihoodRatioTestStat).

Definition at line 244 of file ToyMCSampler.cxx.

◆ EvaluateAllTestStatistics() [2/2]

const RooArgList * RooStats::ToyMCSampler::EvaluateAllTestStatistics ( RooAbsData data,
const RooArgSet poi,
DetailedOutputAggregator detOutAgg 
)
protected

Definition at line 254 of file ToyMCSampler.cxx.

◆ EvaluateTestStatistic() [1/2]

double RooStats::ToyMCSampler::EvaluateTestStatistic ( RooAbsData data,
RooArgSet paramsOfInterest 
)
inlineoverridevirtual

Main interface to evaluate the test statistic on a dataset.

Implements RooStats::TestStatSampler.

Definition at line 123 of file ToyMCSampler.h.

◆ EvaluateTestStatistic() [2/2]

virtual double RooStats::ToyMCSampler::EvaluateTestStatistic ( RooAbsData data,
RooArgSet nullPOI,
int  i 
)
inlinevirtual

Main interface to evaluate the test statistic on a dataset.

Definition at line 120 of file ToyMCSampler.h.

◆ Generate()

RooAbsData * RooStats::ToyMCSampler::Generate ( RooAbsPdf pdf,
RooArgSet observables,
const RooDataSet protoData = nullptr,
int  forceEvents = 0 
) const
protected

helper for GenerateToyData

This is the generate function to use in the context of the ToyMCSampler instead of the standard RooAbsPdf::generate(...).

It takes into account whether the number of events is given explicitly or whether it should use the expected number of events. It also takes into account the option to generate a binned data set (i.e. RooDataHist).

Definition at line 588 of file ToyMCSampler.cxx.

◆ GenerateGlobalObservables()

void RooStats::ToyMCSampler::GenerateGlobalObservables ( RooAbsPdf pdf) const
virtual

generate global observables

Definition at line 451 of file ToyMCSampler.cxx.

◆ GenerateToyData() [1/4]

virtual RooAbsData * RooStats::ToyMCSampler::GenerateToyData ( RooArgSet paramPoint) const
inlinevirtual

Reimplemented in RooStats::ToyMCImportanceSampler.

Definition at line 109 of file ToyMCSampler.h.

◆ GenerateToyData() [2/4]

virtual RooAbsData * RooStats::ToyMCSampler::GenerateToyData ( RooArgSet paramPoint,
double weight 
) const
inlinevirtual

Reimplemented in RooStats::ToyMCImportanceSampler, and RooStats::ToyMCImportanceSampler.

Definition at line 113 of file ToyMCSampler.h.

◆ GenerateToyData() [3/4]

RooAbsData * RooStats::ToyMCSampler::GenerateToyData ( RooArgSet paramPoint,
double weight,
RooAbsPdf pdf 
) const
virtual

generates toy data with weight

This method generates a toy data set for the given parameter point taking global observables into account.

The values of the generated global observables remain in the pdf's variables. They have to have those values for the subsequent evaluation of the test statistics.

Reimplemented in RooStats::ToyMCImportanceSampler.

Definition at line 520 of file ToyMCSampler.cxx.

◆ GenerateToyData() [4/4]

virtual RooAbsData * RooStats::ToyMCSampler::GenerateToyData ( RooArgSet paramPoint,
RooAbsPdf pdf 
) const
inlinevirtual

generates toy data without weight

Reimplemented in RooStats::ToyMCImportanceSampler.

Definition at line 104 of file ToyMCSampler.h.

◆ GetNToys()

virtual Int_t RooStats::ToyMCSampler::GetNToys ( void  )
inlinevirtual

Definition at line 140 of file ToyMCSampler.h.

◆ GetSamplingDistName()

std::string RooStats::ToyMCSampler::GetSamplingDistName ( void  )
inline

Definition at line 205 of file ToyMCSampler.h.

◆ GetSamplingDistribution()

SamplingDistribution * RooStats::ToyMCSampler::GetSamplingDistribution ( RooArgSet paramPoint)
overridevirtual

main interface

Implements RooStats::TestStatSampler.

Definition at line 280 of file ToyMCSampler.cxx.

◆ GetSamplingDistributions()

RooDataSet * RooStats::ToyMCSampler::GetSamplingDistributions ( RooArgSet paramPoint)
virtual

Use for serial and parallel runs.

Definition at line 302 of file ToyMCSampler.cxx.

◆ GetSamplingDistributionsSingleWorker()

RooDataSet * RooStats::ToyMCSampler::GetSamplingDistributionsSingleWorker ( RooArgSet paramPointIn)
virtual

This is the main function for serial runs.

It is called automatically from inside GetSamplingDistribution when no ProofConfig is given. You should not call this function yourself. This function should be used by ToyMCStudy on the workers (ie. when you explicitly want a serial run although ProofConfig is present).

Reimplemented in RooStats::ToyMCImportanceSampler.

Definition at line 357 of file ToyMCSampler.cxx.

◆ GetTestStatistic() [1/2]

virtual TestStatistic * RooStats::ToyMCSampler::GetTestStatistic ( unsigned int  i) const
inlinevirtual

Definition at line 127 of file ToyMCSampler.h.

◆ GetTestStatistic() [2/2]

TestStatistic * RooStats::ToyMCSampler::GetTestStatistic ( void  ) const
inlineoverridevirtual

Get the TestStatistic.

Implements RooStats::TestStatSampler.

Definition at line 131 of file ToyMCSampler.h.

◆ Initialize()

void RooStats::ToyMCSampler::Initialize ( RooAbsArg testStatistic,
RooArgSet paramsOfInterest,
RooArgSet nuisanceParameters 
)
inlineoverridevirtual

Common Initialization.

Implements RooStats::TestStatSampler.

Definition at line 134 of file ToyMCSampler.h.

◆ IsA()

TClass * RooStats::ToyMCSampler::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from RooStats::TestStatSampler.

Definition at line 291 of file ToyMCSampler.h.

◆ SetAlwaysUseMultiGen()

void RooStats::ToyMCSampler::SetAlwaysUseMultiGen ( bool  flag)
static

Definition at line 144 of file ToyMCSampler.cxx.

◆ SetAsimovNuisancePar()

virtual void RooStats::ToyMCSampler::SetAsimovNuisancePar ( bool  i = true)
inlinevirtual

Definition at line 191 of file ToyMCSampler.h.

◆ SetConfidenceLevel()

void RooStats::ToyMCSampler::SetConfidenceLevel ( double  cl)
inlineoverridevirtual

set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)

Implements RooStats::TestStatSampler.

Definition at line 175 of file ToyMCSampler.h.

◆ SetExpectedNuisancePar()

virtual void RooStats::ToyMCSampler::SetExpectedNuisancePar ( bool  i = true)
inlinevirtual

Definition at line 190 of file ToyMCSampler.h.

◆ SetGenerateAutoBinned()

void RooStats::ToyMCSampler::SetGenerateAutoBinned ( bool  autoBinned = true)
inline

set auto binned generation (=> see RooFit::AutoBinned() option)

Definition at line 201 of file ToyMCSampler.h.

◆ SetGenerateBinned()

void RooStats::ToyMCSampler::SetGenerateBinned ( bool  binned = true)
inline

control to use bin data generation (=> see RooFit::AllBinned() option)

Definition at line 197 of file ToyMCSampler.h.

◆ SetGenerateBinnedTag()

void RooStats::ToyMCSampler::SetGenerateBinnedTag ( const char *  binnedTag = "")
inline

name of the tag for individual components to be generated binned (=> see RooFit::GenBinned() option)

Definition at line 199 of file ToyMCSampler.h.

◆ SetGlobalObservables()

void RooStats::ToyMCSampler::SetGlobalObservables ( const RooArgSet o)
inlineoverridevirtual

specify the conditional observables

Implements RooStats::TestStatSampler.

Definition at line 169 of file ToyMCSampler.h.

◆ SetMaxToys()

void RooStats::ToyMCSampler::SetMaxToys ( double  t)
inline

This option forces a maximum number of total toys.

Definition at line 208 of file ToyMCSampler.h.

◆ SetNEventsPerToy()

virtual void RooStats::ToyMCSampler::SetNEventsPerToy ( const Int_t  nevents)
inlinevirtual

Forces the generation of exactly n events even for extended PDFs.

Set to 0 to use the Poisson-distributed events from the extended PDF.

Definition at line 144 of file ToyMCSampler.h.

◆ SetNToys()

virtual void RooStats::ToyMCSampler::SetNToys ( const Int_t  ntoy)
inlinevirtual

Definition at line 141 of file ToyMCSampler.h.

◆ SetNuisanceParameters()

void RooStats::ToyMCSampler::SetNuisanceParameters ( const RooArgSet np)
inlineoverridevirtual

specify the nuisance parameters (eg. the rest of the parameters)

Implements RooStats::TestStatSampler.

Definition at line 165 of file ToyMCSampler.h.

◆ SetObservables()

void RooStats::ToyMCSampler::SetObservables ( const RooArgSet o)
inlineoverridevirtual

specify the observables in the dataset (needed to evaluate the test statistic)

Implements RooStats::TestStatSampler.

Definition at line 167 of file ToyMCSampler.h.

◆ SetParametersForTestStat()

void RooStats::ToyMCSampler::SetParametersForTestStat ( const RooArgSet nullpoi)
inlineoverridevirtual

Set the Pdf, add to the workspace if not already there.

Implements RooStats::TestStatSampler.

Definition at line 150 of file ToyMCSampler.h.

◆ SetPdf()

void RooStats::ToyMCSampler::SetPdf ( RooAbsPdf )
inlineoverridevirtual

Set the Pdf, add to the workspace if not already there.

Implements RooStats::TestStatSampler.

Definition at line 154 of file ToyMCSampler.h.

◆ SetPriorNuisance()

void RooStats::ToyMCSampler::SetPriorNuisance ( RooAbsPdf pdf)
inlineoverridevirtual

How to randomize the prior. Set to nullptr to deactivate randomization.

Implements RooStats::TestStatSampler.

Definition at line 157 of file ToyMCSampler.h.

◆ SetProofConfig()

void RooStats::ToyMCSampler::SetProofConfig ( ProofConfig pc = nullptr)
inline

calling with argument or nullptr deactivates proof

Definition at line 227 of file ToyMCSampler.h.

◆ SetProtoData()

void RooStats::ToyMCSampler::SetProtoData ( const RooDataSet d)
inline

Definition at line 229 of file ToyMCSampler.h.

◆ SetSamplingDistName()

void RooStats::ToyMCSampler::SetSamplingDistName ( const char *  name)
inlineoverridevirtual

Set the name of the sampling distribution used for plotting.

Implements RooStats::TestStatSampler.

Definition at line 204 of file ToyMCSampler.h.

◆ SetTestSize()

void RooStats::ToyMCSampler::SetTestSize ( double  size)
inlineoverridevirtual

set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)

Implements RooStats::TestStatSampler.

Definition at line 173 of file ToyMCSampler.h.

◆ SetTestStatistic() [1/2]

void RooStats::ToyMCSampler::SetTestStatistic ( TestStatistic testStatistic)
inlineoverridevirtual

Set the TestStatistic (want the argument to be a function of the data & parameter points.

Implements RooStats::TestStatSampler.

Definition at line 188 of file ToyMCSampler.h.

◆ SetTestStatistic() [2/2]

virtual void RooStats::ToyMCSampler::SetTestStatistic ( TestStatistic testStatistic,
unsigned int  i 
)
inlinevirtual

Set the TestStatistic (want the argument to be a function of the data & parameter points.

Definition at line 178 of file ToyMCSampler.h.

◆ SetToysBothTails()

void RooStats::ToyMCSampler::SetToysBothTails ( double  toys,
double  low_threshold,
double  high_threshold 
)
inline

Definition at line 220 of file ToyMCSampler.h.

◆ SetToysLeftTail()

void RooStats::ToyMCSampler::SetToysLeftTail ( double  toys,
double  threshold 
)
inline

Definition at line 210 of file ToyMCSampler.h.

◆ SetToysRightTail()

void RooStats::ToyMCSampler::SetToysRightTail ( double  toys,
double  threshold 
)
inline

Definition at line 215 of file ToyMCSampler.h.

◆ SetUseMultiGen()

void RooStats::ToyMCSampler::SetUseMultiGen ( bool  flag)
inline

Definition at line 77 of file ToyMCSampler.h.

◆ Streamer()

void RooStats::ToyMCSampler::Streamer ( TBuffer )
overridevirtual

Reimplemented from RooStats::TestStatSampler.

◆ StreamerNVirtual()

void RooStats::ToyMCSampler::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 291 of file ToyMCSampler.h.

Member Data Documentation

◆ _allVars

std::unique_ptr<RooArgSet> RooStats::ToyMCSampler::_allVars
mutableprotected

!

Definition at line 278 of file ToyMCSampler.h.

◆ _gs1

std::unique_ptr<RooAbsPdf::GenSpec> RooStats::ToyMCSampler::_gs1
mutableprotected

! GenSpec #1

Definition at line 282 of file ToyMCSampler.h.

◆ _gs2

std::unique_ptr<RooAbsPdf::GenSpec> RooStats::ToyMCSampler::_gs2
mutableprotected

! GenSpec #2

Definition at line 283 of file ToyMCSampler.h.

◆ _gs3

std::unique_ptr<RooAbsPdf::GenSpec> RooStats::ToyMCSampler::_gs3
mutableprotected

! GenSpec #3

Definition at line 284 of file ToyMCSampler.h.

◆ _gs4

std::unique_ptr<RooAbsPdf::GenSpec> RooStats::ToyMCSampler::_gs4
mutableprotected

! GenSpec #4

Definition at line 285 of file ToyMCSampler.h.

◆ _gsList

std::vector<std::unique_ptr<RooAbsPdf::GenSpec> > RooStats::ToyMCSampler::_gsList
mutableprotected

!

Definition at line 281 of file ToyMCSampler.h.

◆ _obsList

std::vector<std::unique_ptr<RooArgSet> > RooStats::ToyMCSampler::_obsList
mutableprotected

!

Definition at line 280 of file ToyMCSampler.h.

◆ _pdfList

std::vector<RooAbsPdf*> RooStats::ToyMCSampler::_pdfList
mutableprotected

! We don't own those objects

Definition at line 279 of file ToyMCSampler.h.

◆ fAdaptiveHighLimit

double RooStats::ToyMCSampler::fAdaptiveHighLimit
protected

Definition at line 269 of file ToyMCSampler.h.

◆ fAdaptiveLowLimit

double RooStats::ToyMCSampler::fAdaptiveLowLimit
protected

tails

Definition at line 268 of file ToyMCSampler.h.

◆ fExpectedNuisancePar

bool RooStats::ToyMCSampler::fExpectedNuisancePar
protected

whether to use expectation values for nuisance parameters (ie Asimov data set)

Definition at line 255 of file ToyMCSampler.h.

◆ fgAlwaysUseMultiGen

bool RooStats::ToyMCSampler::fgAlwaysUseMultiGen = false
staticprotected

Use PrepareMultiGen always.

Definition at line 287 of file ToyMCSampler.h.

◆ fGenerateAutoBinned

bool RooStats::ToyMCSampler::fGenerateAutoBinned
protected

Definition at line 258 of file ToyMCSampler.h.

◆ fGenerateBinned

bool RooStats::ToyMCSampler::fGenerateBinned
protected

Definition at line 256 of file ToyMCSampler.h.

◆ fGenerateBinnedTag

TString RooStats::ToyMCSampler::fGenerateBinnedTag
protected

Definition at line 257 of file ToyMCSampler.h.

◆ fGlobalObservables

const RooArgSet* RooStats::ToyMCSampler::fGlobalObservables
protected

Definition at line 251 of file ToyMCSampler.h.

◆ fMaxToys

double RooStats::ToyMCSampler::fMaxToys
protected

maximum no of toys (taking weights into account, therefore double)

Definition at line 266 of file ToyMCSampler.h.

◆ fNEvents

Int_t RooStats::ToyMCSampler::fNEvents
protected

number of events per toy (may be ignored depending on settings)

Definition at line 253 of file ToyMCSampler.h.

◆ fNToys

Int_t RooStats::ToyMCSampler::fNToys
protected

number of toys to generate

Definition at line 252 of file ToyMCSampler.h.

◆ fNuisanceParametersSampler

NuisanceParametersSampler* RooStats::ToyMCSampler::fNuisanceParametersSampler
mutableprotected

!

Definition at line 275 of file ToyMCSampler.h.

◆ fNuisancePars

const RooArgSet* RooStats::ToyMCSampler::fNuisancePars
protected

Definition at line 249 of file ToyMCSampler.h.

◆ fObservables

const RooArgSet* RooStats::ToyMCSampler::fObservables
protected

Definition at line 250 of file ToyMCSampler.h.

◆ fParametersForTestStat

std::unique_ptr<const RooArgSet> RooStats::ToyMCSampler::fParametersForTestStat
protected

Definition at line 244 of file ToyMCSampler.h.

◆ fPdf

RooAbsPdf* RooStats::ToyMCSampler::fPdf
protected

densities, snapshots, and test statistics to reweight to

model (can be alt or null)

Definition at line 243 of file ToyMCSampler.h.

◆ fPriorNuisance

RooAbsPdf* RooStats::ToyMCSampler::fPriorNuisance
protected

prior pdf for nuisance parameters

Definition at line 248 of file ToyMCSampler.h.

◆ fProofConfig

ProofConfig* RooStats::ToyMCSampler::fProofConfig
protected

!

Definition at line 273 of file ToyMCSampler.h.

◆ fProtoData

const RooDataSet* RooStats::ToyMCSampler::fProtoData
protected

in dev

Definition at line 271 of file ToyMCSampler.h.

◆ fSamplingDistName

std::string RooStats::ToyMCSampler::fSamplingDistName
protected

name of the model

Definition at line 247 of file ToyMCSampler.h.

◆ fSize

double RooStats::ToyMCSampler::fSize
protected

Definition at line 254 of file ToyMCSampler.h.

◆ fTestStatistics

std::vector<TestStatistic*> RooStats::ToyMCSampler::fTestStatistics
protected

Definition at line 245 of file ToyMCSampler.h.

◆ fToysInTails

double RooStats::ToyMCSampler::fToysInTails
protected

minimum no of toys in tails for adaptive sampling (taking weights into account, therefore double) Default: 0.0 which means no adaptive sampling

Definition at line 263 of file ToyMCSampler.h.

◆ fUseMultiGen

bool RooStats::ToyMCSampler::fUseMultiGen
protected

Use PrepareMultiGen?

Definition at line 288 of file ToyMCSampler.h.

Libraries for RooStats::ToyMCSampler:
[legend]

The documentation for this class was generated from the following files: