13 #ifndef ROOSTATS_ToyMCSampler 14 #define ROOSTATS_ToyMCSampler 37 class DetailedOutputAggregator;
79 static void SetAlwaysUseMultiGen(
Bool_t flag);
105 fTestStatistics.push_back( t );
111 if(fExpectedNuisancePar)
oocoutE((
TObject*)
NULL,
InputArguments) <<
"ToyMCSampler: using expected nuisance parameters but ignoring weight. Use GetSamplingDistribution(paramPoint, weight) instead." << std::endl;
113 return GenerateToyData(paramPoint, weight, pdf);
121 virtual void GenerateGlobalObservables(
RooAbsPdf& pdf)
const;
126 return fTestStatistics[i]->Evaluate(data, nullPOI);
133 if( fTestStatistics.size() <= i )
return NULL;
134 return fTestStatistics[i];
156 if( fParametersForTestStat )
delete fParametersForTestStat;
164 fPriorNuisance = pdf;
165 if (fNuisanceParametersSampler) {
166 delete fNuisanceParametersSampler;
167 fNuisanceParametersSampler =
NULL;
185 if( fTestStatistics.size() < i ) {
189 if( fTestStatistics.size() == i)
190 fTestStatistics.push_back(testStatistic);
192 fTestStatistics[i] = testStatistic;
218 fAdaptiveLowLimit = threshold;
223 fAdaptiveHighLimit = threshold;
228 fAdaptiveHighLimit = high_threshold;
229 fAdaptiveLowLimit = low_threshold;
245 virtual void ClearCache();
287 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
This class is designed to aid in the construction of RooDataSets and RooArgSets, particularly those n...
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)