13 #ifndef ROOSTATS_ToyMCSampler 14 #define ROOSTATS_ToyMCSampler 41 class DetailedOutputAggregator;
107 static void SetAlwaysUseMultiGen(
Bool_t flag);
133 fTestStatistics.push_back( t );
141 if(fExpectedNuisancePar)
oocoutE((
TObject*)
NULL,
InputArguments) <<
"ToyMCSampler: using expected nuisance parameters but ignoring weight. Use GetSamplingDistribution(paramPoint, weight) instead." << std::endl;
143 return GenerateToyData(paramPoint, weight, pdf);
151 virtual void GenerateGlobalObservables(
RooAbsPdf& pdf)
const;
156 return fTestStatistics[i]->Evaluate(data, nullPOI);
163 if( fTestStatistics.size() <= i )
return NULL;
164 return fTestStatistics[i];
186 if( fParametersForTestStat )
delete fParametersForTestStat;
194 fPriorNuisance = pdf;
195 if (fNuisanceParametersSampler) {
196 delete fNuisanceParametersSampler;
197 fNuisanceParametersSampler =
NULL;
215 if( fTestStatistics.size() < i ) {
219 if( fTestStatistics.size() == i)
220 fTestStatistics.push_back(testStatistic);
222 fTestStatistics[i] = testStatistic;
248 fAdaptiveLowLimit = threshold;
253 fAdaptiveHighLimit = threshold;
258 fAdaptiveHighLimit = high_threshold;
259 fAdaptiveLowLimit = low_threshold;
275 virtual void ClearCache();
317 mutable std::list<RooAbsPdf::GenSpec*>
_gsList ;
Holds configuration options for proof and proof-lite.
virtual void SetParametersForTestStat(const RooArgSet &nullpoi)
virtual void SetTestStatistic(TestStatistic *t)
void SetToysLeftTail(Double_t toys, Double_t threshold)
virtual void SetGlobalObservables(const RooArgSet &o)
Bool_t fGenerateAutoBinned
virtual Double_t EvaluateTestStatistic(RooAbsData &data, RooArgSet &nullPOI, int i)
TestStatSampler is an interface class for a tools which produce RooStats SamplingDistributions.
virtual Double_t ConfidenceLevel() const
RooAbsPdf::GenSpec * _gs1
virtual void SetExpectedNuisancePar(Bool_t i=kTRUE)
virtual void SetNEventsPerToy(const Int_t nevents)
std::string fSamplingDistName
NuisanceParametersSampler * fNuisanceParametersSampler
virtual void SetConfidenceLevel(Double_t cl)
virtual RooAbsData * GenerateToyData(RooArgSet ¶mPoint) const
virtual TestStatistic * GetTestStatistic(unsigned int i) const
virtual void SetTestStatistic(TestStatistic *testStatistic, unsigned int i)
Double_t fAdaptiveLowLimit
virtual RooAbsData * GenerateToyData(RooArgSet ¶mPoint, double &weight) const
#define ClassDef(name, id)
void SetToysRightTail(Double_t toys, Double_t threshold)
void SetToysBothTails(Double_t toys, Double_t low_threshold, Double_t high_threshold)
TString fGenerateBinnedTag
Double_t fAdaptiveHighLimit
void SetGenerateAutoBinned(Bool_t autoBinned=kTRUE)
std::list< RooArgSet * > _obsList
virtual void SetNToys(const Int_t ntoy)
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
void SetGenerateBinnedTag(const char *binnedTag="")
virtual void Initialize(RooAbsArg &, RooArgSet &, RooArgSet &)
virtual Int_t GetNToys(void)
const RooDataSet * fProtoData
void SetProofConfig(ProofConfig *pc=NULL)
ProofConfig * fProofConfig
static Double_t infinity()
Return internal infinity representation.
std::vector< TestStatistic * > fTestStatistics
const RooArgSet * fGlobalObservables
RooAbsData is the common abstract base class for binned and unbinned datasets.
ToyMCSampler is an implementation of the TestStatSampler interface.
void SetSamplingDistName(const char *name)
RooDataSet is a container class to hold unbinned data.
This class simply holds a sampling distribution of some test statistic.
virtual void SetAsimovNuisancePar(Bool_t i=kTRUE)
Namespace for the RooStats classes.
RooAbsPdf::GenSpec * _gs4
GenSpec #3.
virtual void SetObservables(const RooArgSet &o)
void SetMaxToys(Double_t t)
void SetProtoData(const RooDataSet *d)
std::list< RooAbsPdf::GenSpec * > _gsList
virtual void SetPdf(RooAbsPdf &pdf)
static Bool_t fgAlwaysUseMultiGen
GenSpec #4.
virtual RooAbsData * GenerateToyData(RooArgSet ¶mPoint, RooAbsPdf &pdf) const
virtual void SetPriorNuisance(RooAbsPdf *pdf)
Mother of all ROOT objects.
const RooArgSet * fObservables
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
const RooArgSet * fParametersForTestStat
virtual void SetTestSize(Double_t size)
void SetUseMultiGen(Bool_t flag)
RooAbsPdf::GenSpec * _gs3
GenSpec #2.
void SetGenerateBinned(bool binned=true)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
RooAbsPdf::GenSpec * _gs2
GenSpec #1.
std::string GetSamplingDistName(void)
const RooArgSet * fNuisancePars
virtual void SetNuisanceParameters(const RooArgSet &np)
Bool_t fExpectedNuisancePar
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
virtual void AddTestStatistic(TestStatistic *t=NULL)
RooAbsPdf * fPriorNuisance
std::list< RooAbsPdf * > _pdfList
virtual TestStatistic * GetTestStatistic(void) const
virtual Double_t EvaluateTestStatistic(RooAbsData &data, RooArgSet &nullPOI)