Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RooStats::ToyMCImportanceSampler Class Reference

ToyMCImportanceSampler is an extension of the ToyMCSampler for Importance Sampling.

Implementation based on a work by Cranmer, Kreiss, Read (in Preparation)

Definition at line 22 of file ToyMCImportanceSampler.h.

Public Member Functions

 ToyMCImportanceSampler (TestStatistic &ts, Int_t ntoys)
 ~ToyMCImportanceSampler () override
void AddImportanceDensity (RooAbsPdf *p, const RooArgSet *s)
 For importance sampling with multiple densities/snapshots: This is used to check the current Likelihood against Likelihoods from other importance densities apart from the one given as importance snapshot.
void AddNullDensity (RooAbsPdf *p, const RooArgSet *s=nullptr)
 The pdf can be nullptr in which case the density from SetPdf() is used.
virtual void AddTestStatistic (TestStatistic *t=nullptr)
 The pdf can be nullptr in which case the density from SetPdf() is used.
virtual SamplingDistributionAppendSamplingDistribution (RooArgSet &allParameters, SamplingDistribution *last, Int_t additionalMC)
 Extended interface to append to sampling distribution more samples.
bool CheckConfig (void)
 Checks for sufficient information to do a GetSamplingDistribution(...).
double ConfidenceLevel () const override
 Get the Confidence level for the test.
int CreateImpDensitiesForOnePOIAdaptively (RooAbsPdf &pdf, const RooArgSet &allPOI, RooRealVar &poi, double nStdDevOverlap=0.5, double poiValueForBackground=0.0)
 poi has to be fitted beforehand. This function expects this to be the muhat value.
int CreateNImpDensitiesForOnePOI (RooAbsPdf &pdf, const RooArgSet &allPOI, RooRealVar &poi, int n, double poiValueForBackground=0.0)
 n is the number of importance densities
virtual RooArgListEvaluateAllTestStatistics (RooAbsData &data, const RooArgSet &poi)
 Evaluate all test statistics, returning result and any detailed output.
double EvaluateTestStatistic (RooAbsData &data, RooArgSet &nullPOI) override
 Main interface to evaluate the test statistic on a dataset.
virtual double EvaluateTestStatistic (RooAbsData &data, RooArgSet &nullPOI, int i)
 Main interface to evaluate the test statistic on a dataset.
virtual void GenerateGlobalObservables (RooAbsPdf &pdf) const
 generate global observables
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint) const
RooAbsDataGenerateToyData (RooArgSet &paramPoint, double &weight) const override
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint, double &weight, RooAbsPdf &pdf) const
 generates toy data with weight
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint, double &weight, std::vector< double > &impNLLs, double &nullNLL) const
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint, RooAbsPdf &pdf) const
 generates toy data without weight
virtual RooAbsDataGenerateToyData (std::vector< double > &weights) const
virtual RooAbsDataGenerateToyData (std::vector< double > &weights, std::vector< double > &nullNLLs, std::vector< double > &impNLLs) const
 This method generates a toy data set for importance sampling for the given parameter point taking global observables into account.
virtual Int_t GetNToys (void)
std::string GetSamplingDistName (void)
SamplingDistributionGetSamplingDistribution (RooArgSet &paramPoint) override
 main interface
virtual RooDataSetGetSamplingDistributions (RooArgSet &paramPoint)
 Use for serial and parallel runs.
RooDataSetGetSamplingDistributionsSingleWorker (RooArgSet &paramPoint) override
 overwrite GetSamplingDistributionsSingleWorker(paramPoint) with a version that loops over nulls and importance densities, but calls the parent ToyMCSampler::GetSamplingDistributionsSingleWorker(paramPoint).
virtual TestStatisticGetTestStatistic (unsigned int i) const
TestStatisticGetTestStatistic (void) const override
 Get the TestStatistic.
void Initialize (RooAbsArg &, RooArgSet &, RooArgSet &) override
 Common Initialization.
TClassIsA () const override
int nEventsPerToy () const
void SetApplyVeto (bool b=true)
 When set to true, this sets the weight of all toys to zero that do not have the largest likelihood under the density it was generated compared to the other densities.
virtual void SetAsimovNuisancePar (bool i=true)
virtual void SetConditionalObservables (const RooArgSet &set)
 set the conditional observables which will be used when creating the NLL so the pdf's will not be normalized on the conditional observables when computing the NLL Since the class use a NLL we need to set the conditional observables if they exist in the model
void SetConfidenceLevel (double cl) override
 set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
void SetDensityToGenerateFromByIndex (unsigned int i, bool fromNull=false)
 specifies the pdf to sample from
void SetEqualNumToysPerDensity (void)
virtual void SetExpectedNuisancePar (bool i=true)
void SetExpIncreasingNumToysPerDensity (void)
void SetGenerateAutoBinned (bool autoBinned=true)
 set auto binned generation (=> see RooFit::AutoBinned() option)
void SetGenerateBinned (bool binned=true)
 control to use bin data generation (=> see RooFit::AllBinned() option)
void SetGenerateBinnedTag (const char *binnedTag="")
 name of the tag for individual components to be generated binned (=> see RooFit::GenBinned() option)
void SetGlobalObservables (const RooArgSet &o) override
 specify the conditional observables
void SetMaxToys (double t)
 This option forces a maximum number of total toys.
virtual void SetNEventsPerToy (const Int_t nevents)
 Forces the generation of exactly n events even for extended PDFs.
virtual void SetNToys (const Int_t ntoy)
void SetNuisanceParameters (const RooArgSet &np) override
 specify the nuisance parameters (eg. the rest of the parameters)
void SetObservables (const RooArgSet &o) override
 specify the observables in the dataset (needed to evaluate the test statistic)
void SetParametersForTestStat (const RooArgSet &nullpoi) override
 overwrite from ToyMCSampler
void SetPdf (RooAbsPdf &pdf) override
 overwrite from ToyMCSampler
void SetPriorNuisance (RooAbsPdf *pdf) override
 How to randomize the prior. Set to nullptr to deactivate randomization.
void SetProtoData (const RooAbsData *d)
void SetReuseNLL (bool r=true)
void SetSamplingDistName (const char *name) override
 Set the name of the sampling distribution used for plotting.
void SetTestSize (double size) override
 set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
void SetTestStatistic (TestStatistic *t) override
 Set the TestStatistic (want the argument to be a function of the data & parameter points.
virtual void SetTestStatistic (TestStatistic *testStatistic, unsigned int i)
 Set the TestStatistic (want the argument to be a function of the data & parameter points.
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)

Static Public Member Functions

static TClassClass ()
static const char * Class_Name ()
static constexpr Version_t Class_Version ()
static const char * DeclFileName ()
static void SetAlwaysUseMultiGen (bool flag)

Protected Member Functions

void ClearCache () override
 helper method for clearing the cache
const RooArgListEvaluateAllTestStatistics (RooAbsData &data, const RooArgSet &poi, DetailedOutputAggregator &detOutAgg)
std::unique_ptr< RooAbsDataGenerate (RooAbsPdf &pdf, RooArgSet &observables, const RooAbsData *protoData=nullptr, int forceEvents=0) const
 helper for GenerateToyData

Protected Attributes

std::unique_ptr< RooArgSet_allVars
 !
std::unique_ptr< RooAbsPdf::GenSpec_gs1
 ! GenSpec #1
std::unique_ptr< RooAbsPdf::GenSpec_gs2
 ! GenSpec #2
std::unique_ptr< RooAbsPdf::GenSpec_gs3
 ! GenSpec #3
std::unique_ptr< RooAbsPdf::GenSpec_gs4
 ! GenSpec #4
std::vector< std::unique_ptr< RooAbsPdf::GenSpec > > _gsList
 !
std::vector< std::unique_ptr< RooArgSet > > _obsList
 !
std::vector< RooAbsPdf * > _pdfList
 ! We don't own those objects
double fAdaptiveHighLimit
double fAdaptiveLowLimit
 tails
bool fApplyVeto = true
RooArgSet fConditionalObs
 set of conditional observables
bool fExpectedNuisancePar
 whether to use expectation values for nuisance parameters (ie Asimov data set)
bool fGenerateAutoBinned = true
bool fGenerateBinned = false
TString fGenerateBinnedTag = ""
bool fGenerateFromNull = true
const RooArgSetfGlobalObservables = nullptr
std::vector< std::unique_ptr< RooAbsReal > > fImpNLLs
 !
std::vector< RooAbsPdf * > fImportanceDensities
std::vector< const RooArgSet * > fImportanceSnapshots
unsigned int fIndexGenDensity = 0
double fMaxToys
 maximum no of toys (taking weights into account, therefore double)
Int_t fNEvents = 0
 number of events per toy (may be ignored depending on settings)
Int_t fNToys
 number of toys to generate
NuisanceParametersSamplerfNuisanceParametersSampler = nullptr
 !
const RooArgSetfNuisancePars = nullptr
std::vector< RooAbsPdf * > fNullDensities
 support multiple null densities
std::vector< std::unique_ptr< RooAbsReal > > fNullNLLs
 !
std::vector< const RooArgSet * > fNullSnapshots
const RooArgSetfObservables = nullptr
std::unique_ptr< const RooArgSetfParametersForTestStat
RooAbsPdffPdf = nullptr
 densities, snapshots, and test statistics to reweight to
RooAbsPdffPriorNuisance = nullptr
 prior pdf for nuisance parameters
const RooAbsDatafProtoData = nullptr
 in dev
bool fReuseNLL = true
std::string fSamplingDistName
 name of the model
double fSize = 0.05
std::vector< TestStatistic * > fTestStatistics
double fToysInTails = 0.0
 minimum no of toys in tails for adaptive sampling (taking weights into account, therefore double) Default: 0.0 which means no adaptive sampling
toysStrategies fToysStrategy = EQUALTOYSPERDENSITY
bool fUseMultiGen = false
 Use PrepareMultiGen?

Static Protected Attributes

static bool fgAlwaysUseMultiGen = false
 Use PrepareMultiGen always.

#include <RooStats/ToyMCImportanceSampler.h>

Inheritance diagram for RooStats::ToyMCImportanceSampler:
RooStats::ToyMCSampler RooStats::TestStatSampler

Constructor & Destructor Documentation

◆ ToyMCImportanceSampler()

RooStats::ToyMCImportanceSampler::ToyMCImportanceSampler ( TestStatistic & ts,
Int_t ntoys )
inline

Definition at line 25 of file ToyMCImportanceSampler.h.

◆ ~ToyMCImportanceSampler()

RooStats::ToyMCImportanceSampler::~ToyMCImportanceSampler ( )
override

Definition at line 36 of file ToyMCImportanceSampler.cxx.

Member Function Documentation

◆ AddImportanceDensity()

void RooStats::ToyMCImportanceSampler::AddImportanceDensity ( RooAbsPdf * p,
const RooArgSet * s )
inline

For importance sampling with multiple densities/snapshots: This is used to check the current Likelihood against Likelihoods from other importance densities apart from the one given as importance snapshot.

The pdf can be nullptr in which case the density from SetImportanceDensity() is used. The snapshot is also optional.

Definition at line 62 of file ToyMCImportanceSampler.h.

◆ AddNullDensity()

void RooStats::ToyMCImportanceSampler::AddNullDensity ( RooAbsPdf * p,
const RooArgSet * s = nullptr )
inline

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

The snapshot and TestStatistic is also optional.

Definition at line 83 of file ToyMCImportanceSampler.h.

◆ AddTestStatistic()

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

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

The snapshot and TestStatistic is also optional.

Definition at line 91 of file ToyMCSampler.h.

◆ AppendSamplingDistribution()

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

Extended interface to append to sampling distribution more samples.

Definition at line 551 of file ToyMCSampler.cxx.

◆ CheckConfig()

bool RooStats::ToyMCSampler::CheckConfig ( void )
inherited

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 168 of file ToyMCSampler.cxx.

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

constexpr Version_t RooStats::ToyMCImportanceSampler::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 177 of file ToyMCImportanceSampler.h.

◆ ClearCache()

void RooStats::ToyMCImportanceSampler::ClearCache ( void )
overrideprotectedvirtual

helper method for clearing the cache

Reimplemented from RooStats::ToyMCSampler.

Definition at line 43 of file ToyMCImportanceSampler.cxx.

◆ ConfidenceLevel()

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

Get the Confidence level for the test.

Implements RooStats::TestStatSampler.

Definition at line 131 of file ToyMCSampler.h.

◆ CreateImpDensitiesForOnePOIAdaptively()

int RooStats::ToyMCImportanceSampler::CreateImpDensitiesForOnePOIAdaptively ( RooAbsPdf & pdf,
const RooArgSet & allPOI,
RooRealVar & poi,
double nStdDevOverlap = 0.5,
double poiValueForBackground = 0.0 )

poi has to be fitted beforehand. This function expects this to be the muhat value.

Definition at line 427 of file ToyMCImportanceSampler.cxx.

◆ CreateNImpDensitiesForOnePOI()

int RooStats::ToyMCImportanceSampler::CreateNImpDensitiesForOnePOI ( RooAbsPdf & pdf,
const RooArgSet & allPOI,
RooRealVar & poi,
int n,
double poiValueForBackground = 0.0 )

n is the number of importance densities

Definition at line 450 of file ToyMCImportanceSampler.cxx.

◆ DeclFileName()

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

Definition at line 177 of file ToyMCImportanceSampler.h.

◆ EvaluateAllTestStatistics() [1/2]

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

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 184 of file ToyMCSampler.cxx.

◆ EvaluateAllTestStatistics() [2/2]

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

Definition at line 194 of file ToyMCSampler.cxx.

◆ EvaluateTestStatistic() [1/2]

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

Main interface to evaluate the test statistic on a dataset.

Implements RooStats::TestStatSampler.

Definition at line 121 of file ToyMCSampler.h.

◆ EvaluateTestStatistic() [2/2]

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

Main interface to evaluate the test statistic on a dataset.

Definition at line 118 of file ToyMCSampler.h.

◆ Generate()

std::unique_ptr< RooAbsData > RooStats::ToyMCSampler::Generate ( RooAbsPdf & pdf,
RooArgSet & observables,
const RooAbsData * protoData = nullptr,
int forceEvents = 0 ) const
protectedinherited

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 479 of file ToyMCSampler.cxx.

◆ GenerateGlobalObservables()

void RooStats::ToyMCSampler::GenerateGlobalObservables ( RooAbsPdf & pdf) const
virtualinherited

generate global observables

Definition at line 347 of file ToyMCSampler.cxx.

◆ GenerateToyData() [1/7]

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

Reimplemented from RooStats::ToyMCSampler.

Definition at line 107 of file ToyMCSampler.h.

◆ GenerateToyData() [2/7]

RooAbsData * RooStats::ToyMCImportanceSampler::GenerateToyData ( RooArgSet & paramPoint,
double & weight ) const
overridevirtual

Reimplemented from RooStats::ToyMCSampler.

Definition at line 128 of file ToyMCImportanceSampler.cxx.

◆ GenerateToyData() [3/7]

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 from RooStats::ToyMCSampler.

Definition at line 110 of file ToyMCSampler.cxx.

◆ GenerateToyData() [4/7]

RooAbsData * RooStats::ToyMCImportanceSampler::GenerateToyData ( RooArgSet & paramPoint,
double & weight,
std::vector< double > & impNLLs,
double & nullNLL ) const
virtual

Definition at line 170 of file ToyMCImportanceSampler.cxx.

◆ GenerateToyData() [5/7]

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

generates toy data without weight

Reimplemented from RooStats::ToyMCSampler.

Definition at line 102 of file ToyMCSampler.h.

◆ GenerateToyData() [6/7]

RooAbsData * RooStats::ToyMCImportanceSampler::GenerateToyData ( std::vector< double > & weights) const
virtual

Definition at line 209 of file ToyMCImportanceSampler.cxx.

◆ GenerateToyData() [7/7]

RooAbsData * RooStats::ToyMCImportanceSampler::GenerateToyData ( std::vector< double > & weights,
std::vector< double > & nullNLLs,
std::vector< double > & impNLLs ) const
virtual

This method generates a toy data set for importance sampling 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.

Definition at line 233 of file ToyMCImportanceSampler.cxx.

◆ GetNToys()

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

Definition at line 138 of file ToyMCSampler.h.

◆ GetSamplingDistName()

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

Definition at line 211 of file ToyMCSampler.h.

◆ GetSamplingDistribution()

SamplingDistribution * RooStats::ToyMCSampler::GetSamplingDistribution ( RooArgSet & paramPoint)
overridevirtualinherited

main interface

Implements RooStats::TestStatSampler.

Definition at line 226 of file ToyMCSampler.cxx.

◆ GetSamplingDistributions()

RooDataSet * RooStats::ToyMCSampler::GetSamplingDistributions ( RooArgSet & paramPoint)
virtualinherited

Use for serial and parallel runs.

Definition at line 246 of file ToyMCSampler.cxx.

◆ GetSamplingDistributionsSingleWorker()

RooDataSet * RooStats::ToyMCImportanceSampler::GetSamplingDistributionsSingleWorker ( RooArgSet & paramPoint)
overridevirtual

overwrite GetSamplingDistributionsSingleWorker(paramPoint) with a version that loops over nulls and importance densities, but calls the parent ToyMCSampler::GetSamplingDistributionsSingleWorker(paramPoint).

Reimplemented from RooStats::ToyMCSampler.

Definition at line 52 of file ToyMCImportanceSampler.cxx.

◆ GetTestStatistic() [1/2]

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

Definition at line 125 of file ToyMCSampler.h.

◆ GetTestStatistic() [2/2]

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

Get the TestStatistic.

Implements RooStats::TestStatSampler.

Definition at line 129 of file ToyMCSampler.h.

◆ Initialize()

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

Common Initialization.

Implements RooStats::TestStatSampler.

Definition at line 132 of file ToyMCSampler.h.

◆ IsA()

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

Reimplemented from RooStats::TestStatSampler.

Definition at line 177 of file ToyMCImportanceSampler.h.

◆ nEventsPerToy()

int RooStats::ToyMCSampler::nEventsPerToy ( ) const
inlineinherited

Definition at line 147 of file ToyMCSampler.h.

◆ SetAlwaysUseMultiGen()

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

Definition at line 138 of file ToyMCSampler.cxx.

◆ SetApplyVeto()

void RooStats::ToyMCImportanceSampler::SetApplyVeto ( bool b = true)
inline

When set to true, this sets the weight of all toys to zero that do not have the largest likelihood under the density it was generated compared to the other densities.

Definition at line 124 of file ToyMCImportanceSampler.h.

◆ SetAsimovNuisancePar()

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

Definition at line 197 of file ToyMCSampler.h.

◆ SetConditionalObservables()

virtual void RooStats::ToyMCImportanceSampler::SetConditionalObservables ( const RooArgSet & set)
inlinevirtual

set the conditional observables which will be used when creating the NLL so the pdf's will not be normalized on the conditional observables when computing the NLL Since the class use a NLL we need to set the conditional observables if they exist in the model

Definition at line 131 of file ToyMCImportanceSampler.h.

◆ SetConfidenceLevel()

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

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

Implements RooStats::TestStatSampler.

Definition at line 180 of file ToyMCSampler.h.

◆ SetDensityToGenerateFromByIndex()

void RooStats::ToyMCImportanceSampler::SetDensityToGenerateFromByIndex ( unsigned int i,
bool fromNull = false )
inline

specifies the pdf to sample from

Definition at line 42 of file ToyMCImportanceSampler.h.

◆ SetEqualNumToysPerDensity()

void RooStats::ToyMCImportanceSampler::SetEqualNumToysPerDensity ( void )
inline

Definition at line 148 of file ToyMCImportanceSampler.h.

◆ SetExpectedNuisancePar()

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

Definition at line 196 of file ToyMCSampler.h.

◆ SetExpIncreasingNumToysPerDensity()

void RooStats::ToyMCImportanceSampler::SetExpIncreasingNumToysPerDensity ( void )
inline

Definition at line 149 of file ToyMCImportanceSampler.h.

◆ SetGenerateAutoBinned()

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

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

Definition at line 207 of file ToyMCSampler.h.

◆ SetGenerateBinned()

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

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

Definition at line 203 of file ToyMCSampler.h.

◆ SetGenerateBinnedTag()

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

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

Definition at line 205 of file ToyMCSampler.h.

◆ SetGlobalObservables()

void RooStats::ToyMCSampler::SetGlobalObservables ( const RooArgSet & o)
inlineoverridevirtualinherited

specify the conditional observables

Implements RooStats::TestStatSampler.

Definition at line 174 of file ToyMCSampler.h.

◆ SetMaxToys()

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

This option forces a maximum number of total toys.

Definition at line 214 of file ToyMCSampler.h.

◆ SetNEventsPerToy()

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

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 142 of file ToyMCSampler.h.

◆ SetNToys()

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

Definition at line 139 of file ToyMCSampler.h.

◆ SetNuisanceParameters()

void RooStats::ToyMCSampler::SetNuisanceParameters ( const RooArgSet & np)
inlineoverridevirtualinherited

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

Implements RooStats::TestStatSampler.

Definition at line 170 of file ToyMCSampler.h.

◆ SetObservables()

void RooStats::ToyMCSampler::SetObservables ( const RooArgSet & o)
inlineoverridevirtualinherited

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

Implements RooStats::TestStatSampler.

Definition at line 172 of file ToyMCSampler.h.

◆ SetParametersForTestStat()

void RooStats::ToyMCImportanceSampler::SetParametersForTestStat ( const RooArgSet & nullpoi)
inlineoverridevirtual

overwrite from ToyMCSampler

Implements RooStats::TestStatSampler.

Definition at line 109 of file ToyMCImportanceSampler.h.

◆ SetPdf()

void RooStats::ToyMCImportanceSampler::SetPdf ( RooAbsPdf & pdf)
inlineoverridevirtual

overwrite from ToyMCSampler

Implements RooStats::TestStatSampler.

Definition at line 99 of file ToyMCImportanceSampler.h.

◆ SetPriorNuisance()

void RooStats::ToyMCSampler::SetPriorNuisance ( RooAbsPdf * pdf)
inlineoverridevirtualinherited

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

Implements RooStats::TestStatSampler.

Definition at line 162 of file ToyMCSampler.h.

◆ SetProtoData()

void RooStats::ToyMCSampler::SetProtoData ( const RooAbsData * d)
inlineinherited

Definition at line 232 of file ToyMCSampler.h.

◆ SetReuseNLL()

void RooStats::ToyMCImportanceSampler::SetReuseNLL ( bool r = true)
inline

Definition at line 126 of file ToyMCImportanceSampler.h.

◆ SetSamplingDistName()

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

Set the name of the sampling distribution used for plotting.

Implements RooStats::TestStatSampler.

Definition at line 210 of file ToyMCSampler.h.

◆ SetTestSize()

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

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 178 of file ToyMCSampler.h.

◆ SetTestStatistic() [1/2]

void RooStats::ToyMCSampler::SetTestStatistic ( TestStatistic * testStatistic)
inlineoverridevirtualinherited

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

Implements RooStats::TestStatSampler.

Definition at line 194 of file ToyMCSampler.h.

◆ SetTestStatistic() [2/2]

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

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

Definition at line 183 of file ToyMCSampler.h.

◆ SetToysBothTails()

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

Definition at line 226 of file ToyMCSampler.h.

◆ SetToysLeftTail()

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

Definition at line 216 of file ToyMCSampler.h.

◆ SetToysRightTail()

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

Definition at line 221 of file ToyMCSampler.h.

◆ SetUseMultiGen()

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

Definition at line 75 of file ToyMCSampler.h.

◆ Streamer()

void RooStats::ToyMCImportanceSampler::Streamer ( TBuffer & )
overridevirtual

Reimplemented from RooStats::TestStatSampler.

◆ StreamerNVirtual()

void RooStats::ToyMCImportanceSampler::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 177 of file ToyMCImportanceSampler.h.

Member Data Documentation

◆ _allVars

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

!

Definition at line 280 of file ToyMCSampler.h.

◆ _gs1

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

! GenSpec #1

Definition at line 284 of file ToyMCSampler.h.

◆ _gs2

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

! GenSpec #2

Definition at line 285 of file ToyMCSampler.h.

◆ _gs3

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

! GenSpec #3

Definition at line 286 of file ToyMCSampler.h.

◆ _gs4

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

! GenSpec #4

Definition at line 287 of file ToyMCSampler.h.

◆ _gsList

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

!

Definition at line 283 of file ToyMCSampler.h.

◆ _obsList

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

!

Definition at line 282 of file ToyMCSampler.h.

◆ _pdfList

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

! We don't own those objects

Definition at line 281 of file ToyMCSampler.h.

◆ fAdaptiveHighLimit

double RooStats::ToyMCSampler::fAdaptiveHighLimit
protectedinherited

Definition at line 273 of file ToyMCSampler.h.

◆ fAdaptiveLowLimit

double RooStats::ToyMCSampler::fAdaptiveLowLimit
protectedinherited

tails

Definition at line 272 of file ToyMCSampler.h.

◆ fApplyVeto

bool RooStats::ToyMCImportanceSampler::fApplyVeto = true
protected

Definition at line 158 of file ToyMCImportanceSampler.h.

◆ fConditionalObs

RooArgSet RooStats::ToyMCImportanceSampler::fConditionalObs
protected

set of conditional observables

Definition at line 160 of file ToyMCImportanceSampler.h.

◆ fExpectedNuisancePar

bool RooStats::ToyMCSampler::fExpectedNuisancePar
protectedinherited
Initial value:
=
false

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

Definition at line 258 of file ToyMCSampler.h.

◆ fgAlwaysUseMultiGen

bool RooStats::ToyMCSampler::fgAlwaysUseMultiGen = false
staticprotectedinherited

Use PrepareMultiGen always.

Definition at line 289 of file ToyMCSampler.h.

◆ fGenerateAutoBinned

bool RooStats::ToyMCSampler::fGenerateAutoBinned = true
protectedinherited

Definition at line 262 of file ToyMCSampler.h.

◆ fGenerateBinned

bool RooStats::ToyMCSampler::fGenerateBinned = false
protectedinherited

Definition at line 260 of file ToyMCSampler.h.

◆ fGenerateBinnedTag

TString RooStats::ToyMCSampler::fGenerateBinnedTag = ""
protectedinherited

Definition at line 261 of file ToyMCSampler.h.

◆ fGenerateFromNull

bool RooStats::ToyMCImportanceSampler::fGenerateFromNull = true
protected

Definition at line 157 of file ToyMCImportanceSampler.h.

◆ fGlobalObservables

const RooArgSet* RooStats::ToyMCSampler::fGlobalObservables = nullptr
protectedinherited

Definition at line 254 of file ToyMCSampler.h.

◆ fImpNLLs

std::vector<std::unique_ptr<RooAbsReal> > RooStats::ToyMCImportanceSampler::fImpNLLs
mutableprotected

!

Definition at line 175 of file ToyMCImportanceSampler.h.

◆ fImportanceDensities

std::vector<RooAbsPdf*> RooStats::ToyMCImportanceSampler::fImportanceDensities
protected

Definition at line 167 of file ToyMCImportanceSampler.h.

◆ fImportanceSnapshots

std::vector<const RooArgSet*> RooStats::ToyMCImportanceSampler::fImportanceSnapshots
protected

Definition at line 168 of file ToyMCImportanceSampler.h.

◆ fIndexGenDensity

unsigned int RooStats::ToyMCImportanceSampler::fIndexGenDensity = 0
protected

Definition at line 156 of file ToyMCImportanceSampler.h.

◆ fMaxToys

double RooStats::ToyMCSampler::fMaxToys
protectedinherited

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

Definition at line 270 of file ToyMCSampler.h.

◆ fNEvents

Int_t RooStats::ToyMCSampler::fNEvents = 0
protectedinherited

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

Definition at line 256 of file ToyMCSampler.h.

◆ fNToys

Int_t RooStats::ToyMCSampler::fNToys
protectedinherited

number of toys to generate

Definition at line 255 of file ToyMCSampler.h.

◆ fNuisanceParametersSampler

NuisanceParametersSampler* RooStats::ToyMCSampler::fNuisanceParametersSampler = nullptr
mutableprotectedinherited

!

Definition at line 277 of file ToyMCSampler.h.

◆ fNuisancePars

const RooArgSet* RooStats::ToyMCSampler::fNuisancePars = nullptr
protectedinherited

Definition at line 252 of file ToyMCSampler.h.

◆ fNullDensities

std::vector<RooAbsPdf*> RooStats::ToyMCImportanceSampler::fNullDensities
protected

support multiple null densities

Definition at line 163 of file ToyMCImportanceSampler.h.

◆ fNullNLLs

std::vector<std::unique_ptr<RooAbsReal> > RooStats::ToyMCImportanceSampler::fNullNLLs
mutableprotected

!

Definition at line 174 of file ToyMCImportanceSampler.h.

◆ fNullSnapshots

std::vector<const RooArgSet*> RooStats::ToyMCImportanceSampler::fNullSnapshots
mutableprotected

Definition at line 164 of file ToyMCImportanceSampler.h.

◆ fObservables

const RooArgSet* RooStats::ToyMCSampler::fObservables = nullptr
protectedinherited

Definition at line 253 of file ToyMCSampler.h.

◆ fParametersForTestStat

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

Definition at line 247 of file ToyMCSampler.h.

◆ fPdf

RooAbsPdf* RooStats::ToyMCSampler::fPdf = nullptr
protectedinherited

densities, snapshots, and test statistics to reweight to

model (can be alt or null)

Definition at line 246 of file ToyMCSampler.h.

◆ fPriorNuisance

RooAbsPdf* RooStats::ToyMCSampler::fPriorNuisance = nullptr
protectedinherited

prior pdf for nuisance parameters

Definition at line 251 of file ToyMCSampler.h.

◆ fProtoData

const RooAbsData* RooStats::ToyMCSampler::fProtoData = nullptr
protectedinherited

in dev

Definition at line 275 of file ToyMCSampler.h.

◆ fReuseNLL

bool RooStats::ToyMCImportanceSampler::fReuseNLL = true
protected

Definition at line 170 of file ToyMCImportanceSampler.h.

◆ fSamplingDistName

std::string RooStats::ToyMCSampler::fSamplingDistName
protectedinherited

name of the model

Definition at line 250 of file ToyMCSampler.h.

◆ fSize

double RooStats::ToyMCSampler::fSize = 0.05
protectedinherited

Definition at line 257 of file ToyMCSampler.h.

◆ fTestStatistics

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

Definition at line 248 of file ToyMCSampler.h.

◆ fToysInTails

double RooStats::ToyMCSampler::fToysInTails = 0.0
protectedinherited

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 267 of file ToyMCSampler.h.

◆ fToysStrategy

toysStrategies RooStats::ToyMCImportanceSampler::fToysStrategy = EQUALTOYSPERDENSITY
protected

Definition at line 172 of file ToyMCImportanceSampler.h.

◆ fUseMultiGen

bool RooStats::ToyMCSampler::fUseMultiGen = false
protectedinherited

Use PrepareMultiGen?

Definition at line 290 of file ToyMCSampler.h.


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