ROOT 6.14/05 Reference Guide |
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 71 of file ToyMCSampler.h.
Static Public Member Functions | |
static void | SetAlwaysUseMultiGen (Bool_t flag) |
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... | |
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... | |
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 RooArgSet * | fGlobalObservables |
Double_t | fMaxToys |
Int_t | fNEvents |
Int_t | fNToys |
NuisanceParametersSampler * | fNuisanceParametersSampler |
const RooArgSet * | fNuisancePars |
const RooArgSet * | fObservables |
const RooArgSet * | fParametersForTestStat |
RooAbsPdf * | fPdf |
RooAbsPdf * | fPriorNuisance |
ProofConfig * | fProofConfig |
const RooDataSet * | fProtoData |
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>
RooStats::ToyMCSampler::ToyMCSampler | ( | ) |
Proof constructor. Do not use.
Definition at line 154 of file ToyMCSampler.cxx.
RooStats::ToyMCSampler::ToyMCSampler | ( | TestStatistic & | ts, |
Int_t | ntoys | ||
) |
Definition at line 195 of file ToyMCSampler.cxx.
|
virtual |
Definition at line 237 of file ToyMCSampler.cxx.
|
inlinevirtual |
Definition at line 97 of file ToyMCSampler.h.
|
virtual |
Extended interface to append to sampling distribution more samples.
Definition at line 685 of file ToyMCSampler.cxx.
only checks, no guessing/determination (do this in calculators, e.g.
using ModelConfig::GuessObsAndNuisance(...))
Definition at line 247 of file ToyMCSampler.cxx.
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 in RooStats::ToyMCImportanceSampler.
Definition at line 708 of file ToyMCSampler.cxx.
|
inlinevirtual |
Implements RooStats::TestStatSampler.
Definition at line 138 of file ToyMCSampler.h.
|
virtual |
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 271 of file ToyMCSampler.cxx.
|
protected |
Definition at line 281 of file ToyMCSampler.cxx.
|
inlinevirtual |
Definition at line 125 of file ToyMCSampler.h.
|
inlinevirtual |
Implements RooStats::TestStatSampler.
Definition at line 128 of file ToyMCSampler.h.
|
protected |
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 (ie RooDataHist).
Definition at line 607 of file ToyMCSampler.cxx.
Definition at line 467 of file ToyMCSampler.cxx.
|
inlinevirtual |
Definition at line 110 of file ToyMCSampler.h.
|
inlinevirtual |
Definition at line 115 of file ToyMCSampler.h.
|
virtual |
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.
|
inlinevirtual |
Reimplemented in RooStats::ToyMCImportanceSampler.
Definition at line 118 of file ToyMCSampler.h.
Definition at line 145 of file ToyMCSampler.h.
|
inline |
Definition at line 211 of file ToyMCSampler.h.
|
virtual |
Implements RooStats::TestStatSampler.
Definition at line 305 of file ToyMCSampler.cxx.
|
virtual |
Use for serial and parallel runs.
Definition at line 327 of file ToyMCSampler.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 in RooStats::ToyMCImportanceSampler.
Definition at line 386 of file ToyMCSampler.cxx.
|
inlinevirtual |
Definition at line 132 of file ToyMCSampler.h.
|
inlinevirtual |
Implements RooStats::TestStatSampler.
Definition at line 136 of file ToyMCSampler.h.
|
inlinevirtual |
Implements RooStats::TestStatSampler.
Definition at line 139 of file ToyMCSampler.h.
Definition at line 149 of file ToyMCSampler.cxx.
Definition at line 197 of file ToyMCSampler.h.
Implements RooStats::TestStatSampler.
Definition at line 181 of file ToyMCSampler.h.
Definition at line 196 of file ToyMCSampler.h.
Definition at line 207 of file ToyMCSampler.h.
|
inline |
Definition at line 203 of file ToyMCSampler.h.
|
inline |
Definition at line 205 of file ToyMCSampler.h.
Implements RooStats::TestStatSampler.
Definition at line 175 of file ToyMCSampler.h.
Definition at line 214 of file ToyMCSampler.h.
Definition at line 147 of file ToyMCSampler.h.
Definition at line 146 of file ToyMCSampler.h.
Implements RooStats::TestStatSampler.
Definition at line 171 of file ToyMCSampler.h.
Implements RooStats::TestStatSampler.
Definition at line 173 of file ToyMCSampler.h.
|
inlinevirtual |
Implements RooStats::TestStatSampler.
Reimplemented in RooStats::ToyMCImportanceSampler.
Definition at line 155 of file ToyMCSampler.h.
Implements RooStats::TestStatSampler.
Reimplemented in RooStats::ToyMCImportanceSampler.
Definition at line 160 of file ToyMCSampler.h.
Implements RooStats::TestStatSampler.
Definition at line 163 of file ToyMCSampler.h.
|
inline |
Definition at line 233 of file ToyMCSampler.h.
|
inline |
Definition at line 235 of file ToyMCSampler.h.
|
inlinevirtual |
Implements RooStats::TestStatSampler.
Definition at line 210 of file ToyMCSampler.h.
Implements RooStats::TestStatSampler.
Definition at line 179 of file ToyMCSampler.h.
|
inlinevirtual |
Definition at line 184 of file ToyMCSampler.h.
|
inlinevirtual |
Implements RooStats::TestStatSampler.
Definition at line 194 of file ToyMCSampler.h.
|
inline |
Definition at line 226 of file ToyMCSampler.h.
Definition at line 216 of file ToyMCSampler.h.
Definition at line 221 of file ToyMCSampler.h.
Definition at line 81 of file ToyMCSampler.h.
|
mutableprotected |
Definition at line 284 of file ToyMCSampler.h.
|
mutableprotected |
Definition at line 288 of file ToyMCSampler.h.
|
mutableprotected |
GenSpec #1.
Definition at line 289 of file ToyMCSampler.h.
|
mutableprotected |
GenSpec #2.
Definition at line 290 of file ToyMCSampler.h.
|
mutableprotected |
GenSpec #3.
Definition at line 291 of file ToyMCSampler.h.
|
mutableprotected |
Definition at line 287 of file ToyMCSampler.h.
|
mutableprotected |
Definition at line 286 of file ToyMCSampler.h.
|
mutableprotected |
Definition at line 285 of file ToyMCSampler.h.
|
protected |
Definition at line 275 of file ToyMCSampler.h.
|
protected |
Definition at line 274 of file ToyMCSampler.h.
|
protected |
Definition at line 261 of file ToyMCSampler.h.
GenSpec #4.
Definition at line 293 of file ToyMCSampler.h.
|
protected |
Definition at line 264 of file ToyMCSampler.h.
|
protected |
Definition at line 262 of file ToyMCSampler.h.
|
protected |
Definition at line 263 of file ToyMCSampler.h.
|
protected |
Definition at line 257 of file ToyMCSampler.h.
|
protected |
Definition at line 272 of file ToyMCSampler.h.
|
protected |
Definition at line 259 of file ToyMCSampler.h.
|
protected |
Definition at line 258 of file ToyMCSampler.h.
|
mutableprotected |
Definition at line 281 of file ToyMCSampler.h.
|
protected |
Definition at line 255 of file ToyMCSampler.h.
|
protected |
Definition at line 256 of file ToyMCSampler.h.
|
protected |
Definition at line 250 of file ToyMCSampler.h.
|
protected |
Definition at line 249 of file ToyMCSampler.h.
|
protected |
Definition at line 254 of file ToyMCSampler.h.
|
protected |
Definition at line 279 of file ToyMCSampler.h.
|
protected |
Definition at line 277 of file ToyMCSampler.h.
|
protected |
Definition at line 253 of file ToyMCSampler.h.
|
protected |
Definition at line 260 of file ToyMCSampler.h.
|
protected |
Definition at line 251 of file ToyMCSampler.h.
|
protected |
Definition at line 269 of file ToyMCSampler.h.
|
protected |
Definition at line 294 of file ToyMCSampler.h.