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

Public Member Functions

 ToyMCImportanceSampler ()
 
 ToyMCImportanceSampler (TestStatistic &ts, Int_t ntoys)
 
virtual ~ToyMCImportanceSampler ()
 
void AddImportanceDensity (RooAbsPdf *p, const RooArgSet *s)
 
void AddNullDensity (RooAbsPdf *p, const RooArgSet *s=NULL)
 
int CreateImpDensitiesForOnePOIAdaptively (RooAbsPdf &pdf, const RooArgSet &allPOI, RooRealVar &poi, double nStdDevOverlap=0.5, double poiValueForBackground=0.0)
 
int CreateNImpDensitiesForOnePOI (RooAbsPdf &pdf, const RooArgSet &allPOI, RooRealVar &poi, int n, double poiValueForBackground=0.0)
 
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint, double &weight) const
 
virtual RooAbsDataGenerateToyData (RooArgSet &paramPoint, double &weight, std::vector< double > &impNLLs, double &nullNLL) const
 
virtual RooAbsDataGenerateToyData (std::vector< double > &weights) const
 
virtual RooAbsDataGenerateToyData (std::vector< double > &weights, std::vector< double > &nullNLLs, std::vector< double > &impNLLs) const
 
virtual RooDataSetGetSamplingDistributionsSingleWorker (RooArgSet &paramPoint)
 
void SetApplyVeto (bool b=true)
 
virtual void SetConditionalObservables (const RooArgSet &set)
 
void SetDensityToGenerateFromByIndex (unsigned int i, bool fromNull=false)
 specifies the pdf to sample from More...
 
void SetEqualNumToysPerDensity (void)
 
void SetExpIncreasingNumToysPerDensity (void)
 
void SetParametersForTestStat (const RooArgSet &nullpoi)
 
virtual void SetPdf (RooAbsPdf &pdf)
 
void SetReuseNLL (bool r=true)
 
- Public Member Functions inherited from RooStats::ToyMCSampler
 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 Int_t GetNToys (void)
 
std::string GetSamplingDistName (void)
 
virtual SamplingDistributionGetSamplingDistribution (RooArgSet &paramPoint)
 
virtual RooDataSetGetSamplingDistributions (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 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 ()
 

Protected Member Functions

virtual void ClearCache ()
 
- Protected Member Functions inherited from RooStats::ToyMCSampler
const RooArgListEvaluateAllTestStatistics (RooAbsData &data, const RooArgSet &poi, DetailedOutputAggregator &detOutAgg)
 
RooAbsDataGenerate (RooAbsPdf &pdf, RooArgSet &observables, const RooDataSet *protoData=NULL, int forceEvents=0) const
 

Protected Attributes

bool fApplyVeto
 
RooArgSet fConditionalObs
 
bool fGenerateFromNull
 
std::vector< RooAbsReal * > fImpNLLs
 
std::vector< RooAbsPdf * > fImportanceDensities
 
std::vector< const RooArgSet * > fImportanceSnapshots
 
unsigned int fIndexGenDensity
 
std::vector< RooAbsPdf * > fNullDensities
 
std::vector< RooAbsReal * > fNullNLLs
 
std::vector< const RooArgSet * > fNullSnapshots
 
bool fReuseNLL
 
toysStrategies fToysStrategy
 
- Protected Attributes inherited from RooStats::ToyMCSampler
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
 

Additional Inherited Members

- Static Public Member Functions inherited from RooStats::ToyMCSampler
static void SetAlwaysUseMultiGen (Bool_t flag)
 
- Static Protected Attributes inherited from RooStats::ToyMCSampler
static Bool_t fgAlwaysUseMultiGen = kFALSE
 GenSpec #4. More...
 

#include <RooStats/ToyMCImportanceSampler.h>

Inheritance diagram for RooStats::ToyMCImportanceSampler:
[legend]

Constructor & Destructor Documentation

◆ ToyMCImportanceSampler() [1/2]

RooStats::ToyMCImportanceSampler::ToyMCImportanceSampler ( )
inline

Definition at line 40 of file ToyMCImportanceSampler.h.

◆ ToyMCImportanceSampler() [2/2]

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

Definition at line 51 of file ToyMCImportanceSampler.h.

◆ ~ToyMCImportanceSampler()

RooStats::ToyMCImportanceSampler::~ToyMCImportanceSampler ( )
virtual

Definition at line 30 of file ToyMCImportanceSampler.cxx.

Member Function Documentation

◆ AddImportanceDensity()

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

Definition at line 103 of file ToyMCImportanceSampler.h.

◆ AddNullDensity()

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

Definition at line 124 of file ToyMCImportanceSampler.h.

◆ ClearCache()

void RooStats::ToyMCImportanceSampler::ClearCache ( void  )
protectedvirtual

Reimplemented from RooStats::ToyMCSampler.

Definition at line 34 of file ToyMCImportanceSampler.cxx.

◆ CreateImpDensitiesForOnePOIAdaptively()

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

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 
)

Definition at line 447 of file ToyMCImportanceSampler.cxx.

◆ GenerateToyData() [1/4]

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

Reimplemented from RooStats::ToyMCSampler.

Definition at line 135 of file ToyMCImportanceSampler.cxx.

◆ GenerateToyData() [2/4]

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

Definition at line 174 of file ToyMCImportanceSampler.cxx.

◆ GenerateToyData() [3/4]

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

Definition at line 211 of file ToyMCImportanceSampler.cxx.

◆ GenerateToyData() [4/4]

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

Definition at line 227 of file ToyMCImportanceSampler.cxx.

◆ GetSamplingDistributionsSingleWorker()

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

Reimplemented from RooStats::ToyMCSampler.

Definition at line 49 of file ToyMCImportanceSampler.cxx.

◆ SetApplyVeto()

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

Definition at line 166 of file ToyMCImportanceSampler.h.

◆ SetConditionalObservables()

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

Definition at line 174 of file ToyMCImportanceSampler.h.

◆ SetDensityToGenerateFromByIndex()

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

specifies the pdf to sample from

Definition at line 83 of file ToyMCImportanceSampler.h.

◆ SetEqualNumToysPerDensity()

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

Definition at line 192 of file ToyMCImportanceSampler.h.

◆ SetExpIncreasingNumToysPerDensity()

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

Definition at line 193 of file ToyMCImportanceSampler.h.

◆ SetParametersForTestStat()

void RooStats::ToyMCImportanceSampler::SetParametersForTestStat ( const RooArgSet nullpoi)
inlinevirtual

Reimplemented from RooStats::ToyMCSampler.

Definition at line 150 of file ToyMCImportanceSampler.h.

◆ SetPdf()

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

Reimplemented from RooStats::ToyMCSampler.

Definition at line 140 of file ToyMCImportanceSampler.h.

◆ SetReuseNLL()

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

Definition at line 168 of file ToyMCImportanceSampler.h.

Member Data Documentation

◆ fApplyVeto

bool RooStats::ToyMCImportanceSampler::fApplyVeto
protected

Definition at line 202 of file ToyMCImportanceSampler.h.

◆ fConditionalObs

RooArgSet RooStats::ToyMCImportanceSampler::fConditionalObs
protected

Definition at line 204 of file ToyMCImportanceSampler.h.

◆ fGenerateFromNull

bool RooStats::ToyMCImportanceSampler::fGenerateFromNull
protected

Definition at line 201 of file ToyMCImportanceSampler.h.

◆ fImpNLLs

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

Definition at line 219 of file ToyMCImportanceSampler.h.

◆ fImportanceDensities

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

Definition at line 211 of file ToyMCImportanceSampler.h.

◆ fImportanceSnapshots

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

Definition at line 212 of file ToyMCImportanceSampler.h.

◆ fIndexGenDensity

unsigned int RooStats::ToyMCImportanceSampler::fIndexGenDensity
protected

Definition at line 200 of file ToyMCImportanceSampler.h.

◆ fNullDensities

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

Definition at line 207 of file ToyMCImportanceSampler.h.

◆ fNullNLLs

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

Definition at line 218 of file ToyMCImportanceSampler.h.

◆ fNullSnapshots

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

Definition at line 208 of file ToyMCImportanceSampler.h.

◆ fReuseNLL

bool RooStats::ToyMCImportanceSampler::fReuseNLL
protected

Definition at line 214 of file ToyMCImportanceSampler.h.

◆ fToysStrategy

toysStrategies RooStats::ToyMCImportanceSampler::fToysStrategy
protected

Definition at line 216 of file ToyMCImportanceSampler.h.


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