ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ()
 
void SetUseMultiGen (Bool_t flag)
 
virtual SamplingDistributionGetSamplingDistribution (RooArgSet &paramPoint)
 
virtual RooDataSetGetSamplingDistributions (RooArgSet &paramPoint)
 
virtual RooDataSetGetSamplingDistributionsSingleWorker (RooArgSet &paramPoint)
 
virtual SamplingDistributionAppendSamplingDistribution (RooArgSet &allParameters, SamplingDistribution *last, Int_t additionalMC)
 
virtual void AddTestStatistic (TestStatistic *t=NULL)
 
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 void GenerateGlobalObservables (RooAbsPdf &pdf) const
 
virtual Double_t EvaluateTestStatistic (RooAbsData &data, RooArgSet &nullPOI, int i)
 
virtual Double_t EvaluateTestStatistic (RooAbsData &data, RooArgSet &nullPOI)
 
virtual RooArgListEvaluateAllTestStatistics (RooAbsData &data, const RooArgSet &poi)
 
virtual TestStatisticGetTestStatistic (unsigned int i) const
 
virtual TestStatisticGetTestStatistic (void) const
 
virtual Double_t ConfidenceLevel () const
 
virtual void Initialize (RooAbsArg &, RooArgSet &, RooArgSet &)
 
virtual Int_t GetNToys (void)
 
virtual void SetNToys (const Int_t ntoy)
 
virtual void SetNEventsPerToy (const Int_t nevents)
 
virtual void SetParametersForTestStat (const RooArgSet &nullpoi)
 
virtual void SetPdf (RooAbsPdf &pdf)
 
virtual void SetPriorNuisance (RooAbsPdf *pdf)
 
virtual void SetNuisanceParameters (const RooArgSet &np)
 
virtual void SetObservables (const RooArgSet &o)
 
virtual void SetGlobalObservables (const RooArgSet &o)
 
virtual void SetTestSize (Double_t size)
 
virtual void SetConfidenceLevel (Double_t cl)
 
virtual void SetTestStatistic (TestStatistic *testStatistic, unsigned int i)
 
virtual void SetTestStatistic (TestStatistic *t)
 
virtual void SetExpectedNuisancePar (Bool_t i=kTRUE)
 
virtual void SetAsimovNuisancePar (Bool_t i=kTRUE)
 
Bool_t CheckConfig (void)
 
void SetGenerateBinned (bool binned=true)
 
void SetGenerateBinnedTag (const char *binnedTag="")
 
void SetGenerateAutoBinned (Bool_t autoBinned=kTRUE)
 
void SetSamplingDistName (const char *name)
 
std::string GetSamplingDistName (void)
 
void SetMaxToys (Double_t 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 (ProofConfig *pc=NULL)
 
void SetProtoData (const RooDataSet *d)
 
- Public Member Functions inherited from RooStats::TestStatSampler
virtual ~TestStatSampler ()
 

Static Public Member Functions

static void SetAlwaysUseMultiGen (Bool_t flag)
 

Protected Member Functions

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

Protected Attributes

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

Static Protected Attributes

static Bool_t fgAlwaysUseMultiGen
 GenSpec #4. More...
 

#include <RooStats/ToyMCSampler.h>

Inheritance diagram for RooStats::ToyMCSampler:
[legend]

Constructor & Destructor Documentation

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

Member Function Documentation

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

Definition at line 125 of file ToyMCSampler.h.

virtual SamplingDistribution* RooStats::ToyMCSampler::AppendSamplingDistribution ( RooArgSet allParameters,
SamplingDistribution last,
Int_t  additionalMC 
)
virtual
Bool_t RooStats::ToyMCSampler::CheckConfig ( void  )
virtual void RooStats::ToyMCSampler::ClearCache ( )
protectedvirtual

Reimplemented in RooStats::ToyMCImportanceSampler.

Referenced by SetPdf().

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

Implements RooStats::TestStatSampler.

Definition at line 168 of file ToyMCSampler.h.

virtual RooArgList* RooStats::ToyMCSampler::EvaluateAllTestStatistics ( RooAbsData data,
const RooArgSet poi 
)
virtual
const RooArgList* RooStats::ToyMCSampler::EvaluateAllTestStatistics ( RooAbsData data,
const RooArgSet poi,
DetailedOutputAggregator detOutAgg 
)
protected
virtual Double_t RooStats::ToyMCSampler::EvaluateTestStatistic ( RooAbsData data,
RooArgSet nullPOI,
int  i 
)
inlinevirtual

Definition at line 155 of file ToyMCSampler.h.

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

Implements RooStats::TestStatSampler.

Definition at line 158 of file ToyMCSampler.h.

Referenced by EvaluateTestStatistic().

RooAbsData* RooStats::ToyMCSampler::Generate ( RooAbsPdf pdf,
RooArgSet observables,
const RooDataSet protoData = NULL,
int  forceEvents = 0 
) const
protected
virtual void RooStats::ToyMCSampler::GenerateGlobalObservables ( RooAbsPdf pdf) const
virtual
virtual RooAbsData* RooStats::ToyMCSampler::GenerateToyData ( RooArgSet paramPoint,
RooAbsPdf pdf 
) const
inlinevirtual

Definition at line 140 of file ToyMCSampler.h.

Referenced by RooStats::HypoTestInverter::RebuildDistributions().

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

Definition at line 145 of file ToyMCSampler.h.

Referenced by GenerateToyData().

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

Reimplemented in RooStats::ToyMCImportanceSampler.

Definition at line 148 of file ToyMCSampler.h.

Referenced by GenerateToyData().

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

Definition at line 175 of file ToyMCSampler.h.

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

Definition at line 241 of file ToyMCSampler.h.

virtual SamplingDistribution* RooStats::ToyMCSampler::GetSamplingDistribution ( RooArgSet paramPoint)
virtual
virtual RooDataSet* RooStats::ToyMCSampler::GetSamplingDistributions ( RooArgSet paramPoint)
virtual
virtual RooDataSet* RooStats::ToyMCSampler::GetSamplingDistributionsSingleWorker ( RooArgSet paramPoint)
virtual
virtual TestStatistic* RooStats::ToyMCSampler::GetTestStatistic ( unsigned int  i) const
inlinevirtual
virtual TestStatistic* RooStats::ToyMCSampler::GetTestStatistic ( void  ) const
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 166 of file ToyMCSampler.h.

Referenced by GetTestStatistic().

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

Implements RooStats::TestStatSampler.

Definition at line 169 of file ToyMCSampler.h.

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

Definition at line 227 of file ToyMCSampler.h.

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

Implements RooStats::TestStatSampler.

Definition at line 211 of file ToyMCSampler.h.

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

Definition at line 226 of file ToyMCSampler.h.

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

Definition at line 237 of file ToyMCSampler.h.

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

Definition at line 233 of file ToyMCSampler.h.

Referenced by StandardHypoTestDemo().

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

Definition at line 235 of file ToyMCSampler.h.

virtual void RooStats::ToyMCSampler::SetGlobalObservables ( const RooArgSet o)
inlinevirtual
void RooStats::ToyMCSampler::SetMaxToys ( Double_t  t)
inline

Definition at line 244 of file ToyMCSampler.h.

virtual void RooStats::ToyMCSampler::SetNEventsPerToy ( const Int_t  nevents)
inlinevirtual
virtual void RooStats::ToyMCSampler::SetNToys ( const Int_t  ntoy)
inlinevirtual
virtual void RooStats::ToyMCSampler::SetNuisanceParameters ( const RooArgSet np)
inlinevirtual
virtual void RooStats::ToyMCSampler::SetObservables ( const RooArgSet o)
inlinevirtual
virtual void RooStats::ToyMCSampler::SetParametersForTestStat ( const RooArgSet nullpoi)
inlinevirtual
virtual void RooStats::ToyMCSampler::SetPdf ( RooAbsPdf pdf)
inlinevirtual
virtual void RooStats::ToyMCSampler::SetPriorNuisance ( RooAbsPdf pdf)
inlinevirtual

Implements RooStats::TestStatSampler.

Definition at line 193 of file ToyMCSampler.h.

void RooStats::ToyMCSampler::SetProofConfig ( ProofConfig pc = NULL)
inline
void RooStats::ToyMCSampler::SetProtoData ( const RooDataSet d)
inline

Definition at line 265 of file ToyMCSampler.h.

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

Implements RooStats::TestStatSampler.

Definition at line 240 of file ToyMCSampler.h.

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

Implements RooStats::TestStatSampler.

Definition at line 209 of file ToyMCSampler.h.

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

Definition at line 214 of file ToyMCSampler.h.

Referenced by ClassImp(), and StandardHypoTestDemo().

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

Implements RooStats::TestStatSampler.

Definition at line 224 of file ToyMCSampler.h.

Referenced by SetTestStatistic().

void RooStats::ToyMCSampler::SetToysBothTails ( Double_t  toys,
Double_t  low_threshold,
Double_t  high_threshold 
)
inline
void RooStats::ToyMCSampler::SetToysLeftTail ( Double_t  toys,
Double_t  threshold 
)
inline
void RooStats::ToyMCSampler::SetToysRightTail ( Double_t  toys,
Double_t  threshold 
)
inline
void RooStats::ToyMCSampler::SetUseMultiGen ( Bool_t  flag)
inline

Definition at line 109 of file ToyMCSampler.h.

Member Data Documentation

RooArgSet* RooStats::ToyMCSampler::_allVars
mutableprotected

Definition at line 314 of file ToyMCSampler.h.

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

Definition at line 318 of file ToyMCSampler.h.

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

GenSpec #1.

Definition at line 319 of file ToyMCSampler.h.

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

GenSpec #2.

Definition at line 320 of file ToyMCSampler.h.

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

GenSpec #3.

Definition at line 321 of file ToyMCSampler.h.

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

Definition at line 317 of file ToyMCSampler.h.

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

Definition at line 316 of file ToyMCSampler.h.

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

Definition at line 315 of file ToyMCSampler.h.

Double_t RooStats::ToyMCSampler::fAdaptiveHighLimit
protected

Definition at line 305 of file ToyMCSampler.h.

Referenced by SetToysBothTails(), SetToysLeftTail(), and SetToysRightTail().

Double_t RooStats::ToyMCSampler::fAdaptiveLowLimit
protected

Definition at line 304 of file ToyMCSampler.h.

Referenced by SetToysBothTails(), SetToysLeftTail(), and SetToysRightTail().

Bool_t RooStats::ToyMCSampler::fExpectedNuisancePar
protected

Definition at line 291 of file ToyMCSampler.h.

Referenced by GenerateToyData(), SetAsimovNuisancePar(), and SetExpectedNuisancePar().

Bool_t RooStats::ToyMCSampler::fgAlwaysUseMultiGen
staticprotected

GenSpec #4.

Definition at line 323 of file ToyMCSampler.h.

Bool_t RooStats::ToyMCSampler::fGenerateAutoBinned
protected

Definition at line 294 of file ToyMCSampler.h.

Referenced by SetGenerateAutoBinned().

Bool_t RooStats::ToyMCSampler::fGenerateBinned
protected

Definition at line 292 of file ToyMCSampler.h.

Referenced by SetGenerateBinned().

TString RooStats::ToyMCSampler::fGenerateBinnedTag
protected

Definition at line 293 of file ToyMCSampler.h.

Referenced by SetGenerateBinnedTag().

const RooArgSet* RooStats::ToyMCSampler::fGlobalObservables
protected

Definition at line 287 of file ToyMCSampler.h.

Referenced by SetGlobalObservables().

Double_t RooStats::ToyMCSampler::fMaxToys
protected

Definition at line 302 of file ToyMCSampler.h.

Referenced by SetMaxToys().

Int_t RooStats::ToyMCSampler::fNEvents
protected

Definition at line 289 of file ToyMCSampler.h.

Referenced by SetNEventsPerToy().

Int_t RooStats::ToyMCSampler::fNToys
protected

Definition at line 288 of file ToyMCSampler.h.

Referenced by GetNToys(), and SetNToys().

NuisanceParametersSampler* RooStats::ToyMCSampler::fNuisanceParametersSampler
mutableprotected

Definition at line 311 of file ToyMCSampler.h.

Referenced by SetPriorNuisance().

const RooArgSet* RooStats::ToyMCSampler::fNuisancePars
protected

Definition at line 285 of file ToyMCSampler.h.

Referenced by SetNuisanceParameters().

const RooArgSet* RooStats::ToyMCSampler::fObservables
protected

Definition at line 286 of file ToyMCSampler.h.

Referenced by SetObservables().

const RooArgSet* RooStats::ToyMCSampler::fParametersForTestStat
protected
RooAbsPdf* RooStats::ToyMCSampler::fPdf
protected
RooAbsPdf* RooStats::ToyMCSampler::fPriorNuisance
protected

Definition at line 284 of file ToyMCSampler.h.

Referenced by SetPriorNuisance().

ProofConfig* RooStats::ToyMCSampler::fProofConfig
protected

Definition at line 309 of file ToyMCSampler.h.

Referenced by SetProofConfig().

const RooDataSet* RooStats::ToyMCSampler::fProtoData
protected

Definition at line 307 of file ToyMCSampler.h.

Referenced by SetProtoData().

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

Definition at line 283 of file ToyMCSampler.h.

Referenced by GetSamplingDistName(), and SetSamplingDistName().

Double_t RooStats::ToyMCSampler::fSize
protected

Definition at line 290 of file ToyMCSampler.h.

Referenced by ConfidenceLevel(), SetConfidenceLevel(), and SetTestSize().

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

Definition at line 299 of file ToyMCSampler.h.

Referenced by SetToysBothTails(), SetToysLeftTail(), and SetToysRightTail().

Bool_t RooStats::ToyMCSampler::fUseMultiGen
protected

Definition at line 324 of file ToyMCSampler.h.

Referenced by SetUseMultiGen().

Collaboration diagram for RooStats::ToyMCSampler:
[legend]

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