Logo ROOT   6.08/07
Reference Guide
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
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 99 of file ToyMCSampler.h.

Public Member Functions

 ToyMCSampler ()
 
 ToyMCSampler (TestStatistic &ts, Int_t ntoys)
 
virtual ~ToyMCSampler ()
 
virtual void AddTestStatistic (TestStatistic *t=NULL)
 
virtual SamplingDistributionAppendSamplingDistribution (RooArgSet &allParameters, SamplingDistribution *last, Int_t additionalMC)
 
Bool_t CheckConfig (void)
 
virtual Double_t ConfidenceLevel () const
 
virtual RooArgListEvaluateAllTestStatistics (RooAbsData &data, const RooArgSet &poi)
 
virtual Double_t EvaluateTestStatistic (RooAbsData &data, RooArgSet &nullPOI, int i)
 
virtual Double_t EvaluateTestStatistic (RooAbsData &data, RooArgSet &nullPOI)
 
virtual void GenerateGlobalObservables (RooAbsPdf &pdf) const
 
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint, RooAbsPdf &pdf) const
 
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint) const
 
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint, double &weight, RooAbsPdf &pdf) const
 
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint, double &weight) const
 
virtual Int_t GetNToys (void)
 
std::string GetSamplingDistName (void)
 
virtual SamplingDistributionGetSamplingDistribution (RooArgSet &paramPoint)
 
virtual RooDataSetGetSamplingDistributions (RooArgSet &paramPoint)
 
virtual RooDataSetGetSamplingDistributionsSingleWorker (RooArgSet &paramPoint)
 
virtual TestStatisticGetTestStatistic (unsigned int i) const
 
virtual TestStatisticGetTestStatistic (void) const
 
virtual void Initialize (RooAbsArg &, RooArgSet &, RooArgSet &)
 
virtual void SetAsimovNuisancePar (Bool_t i=kTRUE)
 
virtual void SetConfidenceLevel (Double_t cl)
 
virtual void SetExpectedNuisancePar (Bool_t i=kTRUE)
 
void SetGenerateAutoBinned (Bool_t autoBinned=kTRUE)
 
void SetGenerateBinned (bool binned=true)
 
void SetGenerateBinnedTag (const char *binnedTag="")
 
virtual void SetGlobalObservables (const RooArgSet &o)
 
void SetMaxToys (Double_t t)
 
virtual void SetNEventsPerToy (const Int_t nevents)
 
virtual void SetNToys (const Int_t ntoy)
 
virtual void SetNuisanceParameters (const RooArgSet &np)
 
virtual void SetObservables (const RooArgSet &o)
 
virtual void SetParametersForTestStat (const RooArgSet &nullpoi)
 
virtual void SetPdf (RooAbsPdf &pdf)
 
virtual void SetPriorNuisance (RooAbsPdf *pdf)
 
void SetProofConfig (ProofConfig *pc=NULL)
 
void SetProtoData (const RooDataSet *d)
 
void SetSamplingDistName (const char *name)
 
virtual void SetTestSize (Double_t size)
 
virtual void SetTestStatistic (TestStatistic *testStatistic, unsigned int i)
 
virtual void SetTestStatistic (TestStatistic *t)
 
void SetToysBothTails (Double_t toys, Double_t low_threshold, Double_t high_threshold)
 
void SetToysLeftTail (Double_t toys, Double_t threshold)
 
void SetToysRightTail (Double_t toys, Double_t threshold)
 
void SetUseMultiGen (Bool_t flag)
 
- Public Member Functions inherited from RooStats::TestStatSampler
virtual ~TestStatSampler ()
 

Static Public Member Functions

static void SetAlwaysUseMultiGen (Bool_t flag)
 

Protected Member Functions

virtual void ClearCache ()
 
const RooArgListEvaluateAllTestStatistics (RooAbsData &data, const RooArgSet &poi, DetailedOutputAggregator &detOutAgg)
 
RooAbsDataGenerate (RooAbsPdf &pdf, RooArgSet &observables, const RooDataSet *protoData=NULL, int forceEvents=0) const
 

Protected Attributes

RooArgSet_allVars
 
RooAbsPdf::GenSpec_gs1
 
RooAbsPdf::GenSpec_gs2
 GenSpec #1. More...
 
RooAbsPdf::GenSpec_gs3
 GenSpec #2. More...
 
RooAbsPdf::GenSpec_gs4
 GenSpec #3. More...
 
std::list< RooAbsPdf::GenSpec * > _gsList
 
std::list< RooArgSet * > _obsList
 
std::list< RooAbsPdf * > _pdfList
 
Double_t fAdaptiveHighLimit
 
Double_t fAdaptiveLowLimit
 
Bool_t fExpectedNuisancePar
 
Bool_t fGenerateAutoBinned
 
Bool_t fGenerateBinned
 
TString fGenerateBinnedTag
 
const RooArgSetfGlobalObservables
 
Double_t fMaxToys
 
Int_t fNEvents
 
Int_t fNToys
 
NuisanceParametersSamplerfNuisanceParametersSampler
 
const RooArgSetfNuisancePars
 
const RooArgSetfObservables
 
const RooArgSetfParametersForTestStat
 
RooAbsPdffPdf
 
RooAbsPdffPriorNuisance
 
ProofConfigfProofConfig
 
const RooDataSetfProtoData
 
std::string fSamplingDistName
 
Double_t fSize
 
std::vector< TestStatistic * > fTestStatistics
 
Double_t fToysInTails
 
Bool_t fUseMultiGen
 

Static Protected Attributes

static Bool_t fgAlwaysUseMultiGen = kFALSE
 GenSpec #4. More...
 

#include <RooStats/ToyMCSampler.h>

Inheritance diagram for RooStats::ToyMCSampler:
[legend]

Constructor & Destructor Documentation

◆ ToyMCSampler() [1/2]

RooStats::ToyMCSampler::ToyMCSampler ( )

Definition at line 134 of file ToyMCSampler.cxx.

◆ ToyMCSampler() [2/2]

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

Definition at line 174 of file ToyMCSampler.cxx.

◆ ~ToyMCSampler()

RooStats::ToyMCSampler::~ToyMCSampler ( )
virtual

Definition at line 216 of file ToyMCSampler.cxx.

Member Function Documentation

◆ AddTestStatistic()

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

Definition at line 125 of file ToyMCSampler.h.

◆ AppendSamplingDistribution()

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

Definition at line 658 of file ToyMCSampler.cxx.

◆ CheckConfig()

Bool_t RooStats::ToyMCSampler::CheckConfig ( void  )

Definition at line 223 of file ToyMCSampler.cxx.

◆ ClearCache()

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

Reimplemented in RooStats::ToyMCImportanceSampler.

Definition at line 680 of file ToyMCSampler.cxx.

◆ ConfidenceLevel()

virtual Double_t RooStats::ToyMCSampler::ConfidenceLevel ( ) const
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 168 of file ToyMCSampler.h.

◆ EvaluateAllTestStatistics() [1/2]

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

Definition at line 245 of file ToyMCSampler.cxx.

◆ EvaluateAllTestStatistics() [2/2]

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

Definition at line 257 of file ToyMCSampler.cxx.

◆ EvaluateTestStatistic() [1/2]

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

Definition at line 155 of file ToyMCSampler.h.

◆ EvaluateTestStatistic() [2/2]

virtual Double_t RooStats::ToyMCSampler::EvaluateTestStatistic ( RooAbsData data,
RooArgSet nullPOI 
)
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 158 of file ToyMCSampler.h.

◆ Generate()

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

Definition at line 573 of file ToyMCSampler.cxx.

◆ GenerateGlobalObservables()

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

Definition at line 440 of file ToyMCSampler.cxx.

◆ GenerateToyData() [1/4]

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

Definition at line 140 of file ToyMCSampler.h.

◆ GenerateToyData() [2/4]

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

Definition at line 145 of file ToyMCSampler.h.

◆ GenerateToyData() [3/4]

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

Definition at line 505 of file ToyMCSampler.cxx.

◆ GenerateToyData() [4/4]

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

Reimplemented in RooStats::ToyMCImportanceSampler.

Definition at line 148 of file ToyMCSampler.h.

◆ GetNToys()

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

Definition at line 175 of file ToyMCSampler.h.

◆ GetSamplingDistName()

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

Definition at line 241 of file ToyMCSampler.h.

◆ GetSamplingDistribution()

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

Implements RooStats::TestStatSampler.

Definition at line 280 of file ToyMCSampler.cxx.

◆ GetSamplingDistributions()

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

Definition at line 300 of file ToyMCSampler.cxx.

◆ GetSamplingDistributionsSingleWorker()

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

Reimplemented in RooStats::ToyMCImportanceSampler.

Definition at line 349 of file ToyMCSampler.cxx.

◆ GetTestStatistic() [1/2]

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

Definition at line 162 of file ToyMCSampler.h.

◆ GetTestStatistic() [2/2]

virtual TestStatistic* RooStats::ToyMCSampler::GetTestStatistic ( void  ) const
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 166 of file ToyMCSampler.h.

◆ Initialize()

virtual void RooStats::ToyMCSampler::Initialize ( RooAbsArg ,
RooArgSet ,
RooArgSet  
)
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 169 of file ToyMCSampler.h.

◆ SetAlwaysUseMultiGen()

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

Definition at line 130 of file ToyMCSampler.cxx.

◆ SetAsimovNuisancePar()

virtual void RooStats::ToyMCSampler::SetAsimovNuisancePar ( Bool_t  i = kTRUE)
inlinevirtual

Definition at line 227 of file ToyMCSampler.h.

◆ SetConfidenceLevel()

virtual void RooStats::ToyMCSampler::SetConfidenceLevel ( Double_t  cl)
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 211 of file ToyMCSampler.h.

◆ SetExpectedNuisancePar()

virtual void RooStats::ToyMCSampler::SetExpectedNuisancePar ( Bool_t  i = kTRUE)
inlinevirtual

Definition at line 226 of file ToyMCSampler.h.

◆ SetGenerateAutoBinned()

void RooStats::ToyMCSampler::SetGenerateAutoBinned ( Bool_t  autoBinned = kTRUE)
inline

Definition at line 237 of file ToyMCSampler.h.

◆ SetGenerateBinned()

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

Definition at line 233 of file ToyMCSampler.h.

◆ SetGenerateBinnedTag()

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

Definition at line 235 of file ToyMCSampler.h.

◆ SetGlobalObservables()

virtual void RooStats::ToyMCSampler::SetGlobalObservables ( const RooArgSet o)
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 205 of file ToyMCSampler.h.

◆ SetMaxToys()

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

Definition at line 244 of file ToyMCSampler.h.

◆ SetNEventsPerToy()

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

Definition at line 177 of file ToyMCSampler.h.

◆ SetNToys()

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

Definition at line 176 of file ToyMCSampler.h.

◆ SetNuisanceParameters()

virtual void RooStats::ToyMCSampler::SetNuisanceParameters ( const RooArgSet np)
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 201 of file ToyMCSampler.h.

◆ SetObservables()

virtual void RooStats::ToyMCSampler::SetObservables ( const RooArgSet o)
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 203 of file ToyMCSampler.h.

◆ SetParametersForTestStat()

virtual void RooStats::ToyMCSampler::SetParametersForTestStat ( const RooArgSet nullpoi)
inlinevirtual

Implements RooStats::TestStatSampler.

Reimplemented in RooStats::ToyMCImportanceSampler.

Definition at line 185 of file ToyMCSampler.h.

◆ SetPdf()

virtual void RooStats::ToyMCSampler::SetPdf ( RooAbsPdf pdf)
inlinevirtual

Implements RooStats::TestStatSampler.

Reimplemented in RooStats::ToyMCImportanceSampler.

Definition at line 190 of file ToyMCSampler.h.

◆ SetPriorNuisance()

virtual void RooStats::ToyMCSampler::SetPriorNuisance ( RooAbsPdf pdf)
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 193 of file ToyMCSampler.h.

◆ SetProofConfig()

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

Definition at line 263 of file ToyMCSampler.h.

◆ SetProtoData()

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

Definition at line 265 of file ToyMCSampler.h.

◆ SetSamplingDistName()

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

Implements RooStats::TestStatSampler.

Definition at line 240 of file ToyMCSampler.h.

◆ SetTestSize()

virtual void RooStats::ToyMCSampler::SetTestSize ( Double_t  size)
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 209 of file ToyMCSampler.h.

◆ SetTestStatistic() [1/2]

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

Definition at line 214 of file ToyMCSampler.h.

◆ SetTestStatistic() [2/2]

virtual void RooStats::ToyMCSampler::SetTestStatistic ( TestStatistic t)
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 224 of file ToyMCSampler.h.

◆ SetToysBothTails()

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

Definition at line 256 of file ToyMCSampler.h.

◆ SetToysLeftTail()

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

Definition at line 246 of file ToyMCSampler.h.

◆ SetToysRightTail()

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

Definition at line 251 of file ToyMCSampler.h.

◆ SetUseMultiGen()

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

Definition at line 109 of file ToyMCSampler.h.

Member Data Documentation

◆ _allVars

RooArgSet* RooStats::ToyMCSampler::_allVars
mutableprotected

Definition at line 314 of file ToyMCSampler.h.

◆ _gs1

RooAbsPdf::GenSpec* RooStats::ToyMCSampler::_gs1
mutableprotected

Definition at line 318 of file ToyMCSampler.h.

◆ _gs2

RooAbsPdf::GenSpec* RooStats::ToyMCSampler::_gs2
mutableprotected

GenSpec #1.

Definition at line 319 of file ToyMCSampler.h.

◆ _gs3

RooAbsPdf::GenSpec* RooStats::ToyMCSampler::_gs3
mutableprotected

GenSpec #2.

Definition at line 320 of file ToyMCSampler.h.

◆ _gs4

RooAbsPdf::GenSpec* RooStats::ToyMCSampler::_gs4
mutableprotected

GenSpec #3.

Definition at line 321 of file ToyMCSampler.h.

◆ _gsList

std::list<RooAbsPdf::GenSpec*> RooStats::ToyMCSampler::_gsList
mutableprotected

Definition at line 317 of file ToyMCSampler.h.

◆ _obsList

std::list<RooArgSet*> RooStats::ToyMCSampler::_obsList
mutableprotected

Definition at line 316 of file ToyMCSampler.h.

◆ _pdfList

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

Definition at line 315 of file ToyMCSampler.h.

◆ fAdaptiveHighLimit

Double_t RooStats::ToyMCSampler::fAdaptiveHighLimit
protected

Definition at line 305 of file ToyMCSampler.h.

◆ fAdaptiveLowLimit

Double_t RooStats::ToyMCSampler::fAdaptiveLowLimit
protected

Definition at line 304 of file ToyMCSampler.h.

◆ fExpectedNuisancePar

Bool_t RooStats::ToyMCSampler::fExpectedNuisancePar
protected

Definition at line 291 of file ToyMCSampler.h.

◆ fgAlwaysUseMultiGen

Bool_t RooStats::ToyMCSampler::fgAlwaysUseMultiGen = kFALSE
staticprotected

GenSpec #4.

Definition at line 323 of file ToyMCSampler.h.

◆ fGenerateAutoBinned

Bool_t RooStats::ToyMCSampler::fGenerateAutoBinned
protected

Definition at line 294 of file ToyMCSampler.h.

◆ fGenerateBinned

Bool_t RooStats::ToyMCSampler::fGenerateBinned
protected

Definition at line 292 of file ToyMCSampler.h.

◆ fGenerateBinnedTag

TString RooStats::ToyMCSampler::fGenerateBinnedTag
protected

Definition at line 293 of file ToyMCSampler.h.

◆ fGlobalObservables

const RooArgSet* RooStats::ToyMCSampler::fGlobalObservables
protected

Definition at line 287 of file ToyMCSampler.h.

◆ fMaxToys

Double_t RooStats::ToyMCSampler::fMaxToys
protected

Definition at line 302 of file ToyMCSampler.h.

◆ fNEvents

Int_t RooStats::ToyMCSampler::fNEvents
protected

Definition at line 289 of file ToyMCSampler.h.

◆ fNToys

Int_t RooStats::ToyMCSampler::fNToys
protected

Definition at line 288 of file ToyMCSampler.h.

◆ fNuisanceParametersSampler

NuisanceParametersSampler* RooStats::ToyMCSampler::fNuisanceParametersSampler
mutableprotected

Definition at line 311 of file ToyMCSampler.h.

◆ fNuisancePars

const RooArgSet* RooStats::ToyMCSampler::fNuisancePars
protected

Definition at line 285 of file ToyMCSampler.h.

◆ fObservables

const RooArgSet* RooStats::ToyMCSampler::fObservables
protected

Definition at line 286 of file ToyMCSampler.h.

◆ fParametersForTestStat

const RooArgSet* RooStats::ToyMCSampler::fParametersForTestStat
protected

Definition at line 280 of file ToyMCSampler.h.

◆ fPdf

RooAbsPdf* RooStats::ToyMCSampler::fPdf
protected

Definition at line 279 of file ToyMCSampler.h.

◆ fPriorNuisance

RooAbsPdf* RooStats::ToyMCSampler::fPriorNuisance
protected

Definition at line 284 of file ToyMCSampler.h.

◆ fProofConfig

ProofConfig* RooStats::ToyMCSampler::fProofConfig
protected

Definition at line 309 of file ToyMCSampler.h.

◆ fProtoData

const RooDataSet* RooStats::ToyMCSampler::fProtoData
protected

Definition at line 307 of file ToyMCSampler.h.

◆ fSamplingDistName

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

Definition at line 283 of file ToyMCSampler.h.

◆ fSize

Double_t RooStats::ToyMCSampler::fSize
protected

Definition at line 290 of file ToyMCSampler.h.

◆ fTestStatistics

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

Definition at line 281 of file ToyMCSampler.h.

◆ fToysInTails

Double_t RooStats::ToyMCSampler::fToysInTails
protected

Definition at line 299 of file ToyMCSampler.h.

◆ fUseMultiGen

Bool_t RooStats::ToyMCSampler::fUseMultiGen
protected

Definition at line 324 of file ToyMCSampler.h.


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