|
ROOT 6.12/06 Reference Guide |
ToyMCImportanceSampler is an extension of the ToyMCSampler for Importance Sampling.
Implementation based on a work by Cranmer, Kreiss, Read (in Preparation)
Definition at line 21 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) |
| poi has to be fitted beforehand. This function expects this to be the muhat value. More... | |
| int | CreateNImpDensitiesForOnePOI (RooAbsPdf &pdf, const RooArgSet &allPOI, RooRealVar &poi, int n, double poiValueForBackground=0.0) |
| n is the number of importance densities More... | |
| virtual RooAbsData * | GenerateToyData (RooArgSet ¶mPoint, RooAbsPdf &pdf) const |
| virtual RooAbsData * | GenerateToyData (RooArgSet ¶mPoint) const |
| virtual RooAbsData * | GenerateToyData (RooArgSet ¶mPoint, double &weight, RooAbsPdf &pdf) const |
| This method generates a toy data set for the given parameter point taking global observables into account. More... | |
| virtual RooAbsData * | GenerateToyData (RooArgSet ¶mPoint, double &weight) const |
| virtual RooAbsData * | GenerateToyData (RooArgSet ¶mPoint, double &weight) const |
| virtual RooAbsData * | GenerateToyData (RooArgSet ¶mPoint, double &weight, std::vector< double > &impNLLs, double &nullNLL) const |
| virtual RooAbsData * | GenerateToyData (std::vector< double > &weights) const |
| virtual RooAbsData * | GenerateToyData (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. More... | |
| virtual RooDataSet * | GetSamplingDistributionsSingleWorker (RooArgSet ¶mPoint) |
| This is the main function for serial runs. More... | |
| 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 () | |
| Proof constructor. Do not use. More... | |
| ToyMCSampler (TestStatistic &ts, Int_t ntoys) | |
| virtual | ~ToyMCSampler () |
| virtual void | AddTestStatistic (TestStatistic *t=NULL) |
| virtual SamplingDistribution * | AppendSamplingDistribution (RooArgSet &allParameters, SamplingDistribution *last, Int_t additionalMC) |
| Extended interface to append to sampling distribution more samples. More... | |
| Bool_t | CheckConfig (void) |
| only checks, no guessing/determination (do this in calculators, e.g. More... | |
| virtual Double_t | ConfidenceLevel () const |
| virtual RooArgList * | EvaluateAllTestStatistics (RooAbsData &data, const RooArgSet &poi) |
| Evaluate all test statistics, returning result and any detailed output. More... | |
| 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 RooAbsData * | GenerateToyData (RooArgSet ¶mPoint, RooAbsPdf &pdf) const |
| virtual RooAbsData * | GenerateToyData (RooArgSet ¶mPoint) const |
| virtual RooAbsData * | GenerateToyData (RooArgSet ¶mPoint, double &weight, RooAbsPdf &pdf) const |
| This method generates a toy data set for the given parameter point taking global observables into account. More... | |
| virtual Int_t | GetNToys (void) |
| std::string | GetSamplingDistName (void) |
| virtual SamplingDistribution * | GetSamplingDistribution (RooArgSet ¶mPoint) |
| virtual RooDataSet * | GetSamplingDistributions (RooArgSet ¶mPoint) |
| Use for serial and parallel runs. More... | |
| virtual TestStatistic * | GetTestStatistic (unsigned int i) const |
| virtual TestStatistic * | GetTestStatistic (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 () |
| 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 More... | |
Protected Member Functions inherited from RooStats::ToyMCSampler | |
| const RooArgList * | EvaluateAllTestStatistics (RooAbsData &data, const RooArgSet &poi, DetailedOutputAggregator &detOutAgg) |
| RooAbsData * | Generate (RooAbsPdf &pdf, RooArgSet &observables, const RooDataSet *protoData=NULL, int forceEvents=0) const |
| This is the generate function to use in the context of the ToyMCSampler instead of the standard RooAbsPdf::generate(...). More... | |
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>
|
inline |
Definition at line 24 of file ToyMCImportanceSampler.h.
|
inline |
Definition at line 35 of file ToyMCImportanceSampler.h.
|
virtual |
Definition at line 37 of file ToyMCImportanceSampler.cxx.
|
inline |
Definition at line 80 of file ToyMCImportanceSampler.h.
|
inline |
Definition at line 101 of file ToyMCImportanceSampler.h.
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 from RooStats::ToyMCSampler.
Definition at line 44 of file ToyMCImportanceSampler.cxx.
| 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 434 of file ToyMCImportanceSampler.cxx.
| 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 457 of file ToyMCImportanceSampler.cxx.
|
inline |
Definition at line 110 of file ToyMCSampler.h.
|
inline |
Definition at line 115 of file ToyMCSampler.h.
| RooAbsData * RooStats::ToyMCSampler::GenerateToyData |
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.
Definition at line 539 of file ToyMCSampler.cxx.
|
inline |
Definition at line 118 of file ToyMCSampler.h.
|
virtual |
Reimplemented from RooStats::ToyMCSampler.
Definition at line 135 of file ToyMCImportanceSampler.cxx.
|
virtual |
Definition at line 177 of file ToyMCImportanceSampler.cxx.
|
virtual |
Definition at line 216 of file ToyMCImportanceSampler.cxx.
|
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 240 of file ToyMCImportanceSampler.cxx.
|
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).
Make sure the cache is clear. It is important to clear it hear, because the cache might be invalid even when just the firstPOI was changed, for which no accessor has to be called. (Fixes a bug when ToyMCSampler is used with the Neyman Construction)
Reimplemented from RooStats::ToyMCSampler.
Definition at line 53 of file ToyMCImportanceSampler.cxx.
|
inline |
Definition at line 142 of file ToyMCImportanceSampler.h.
|
inlinevirtual |
Definition at line 149 of file ToyMCImportanceSampler.h.
|
inline |
specifies the pdf to sample from
Definition at line 60 of file ToyMCImportanceSampler.h.
Definition at line 166 of file ToyMCImportanceSampler.h.
Definition at line 167 of file ToyMCImportanceSampler.h.
|
inlinevirtual |
Reimplemented from RooStats::ToyMCSampler.
Definition at line 127 of file ToyMCImportanceSampler.h.
Reimplemented from RooStats::ToyMCSampler.
Definition at line 117 of file ToyMCImportanceSampler.h.
|
inline |
Definition at line 144 of file ToyMCImportanceSampler.h.
|
protected |
Definition at line 176 of file ToyMCImportanceSampler.h.
|
protected |
Definition at line 178 of file ToyMCImportanceSampler.h.
|
protected |
Definition at line 175 of file ToyMCImportanceSampler.h.
|
mutableprotected |
Definition at line 193 of file ToyMCImportanceSampler.h.
|
protected |
Definition at line 185 of file ToyMCImportanceSampler.h.
|
protected |
Definition at line 186 of file ToyMCImportanceSampler.h.
|
protected |
Definition at line 174 of file ToyMCImportanceSampler.h.
|
protected |
Definition at line 181 of file ToyMCImportanceSampler.h.
|
mutableprotected |
Definition at line 192 of file ToyMCImportanceSampler.h.
|
mutableprotected |
Definition at line 182 of file ToyMCImportanceSampler.h.
|
protected |
Definition at line 188 of file ToyMCImportanceSampler.h.
|
protected |
Definition at line 190 of file ToyMCImportanceSampler.h.