12 #ifndef ROOSTATS_ToyMCImportanceSampler
13 #define ROOSTATS_ToyMCImportanceSampler
56 virtual RooAbsData*
GenerateToyData(std::vector<double>& weights, std::vector<double>& nullNLLs, std::vector<double>& impNLLs)
const;
123 oocoutE((
TObject*)0,
InputArguments) <<
"Cannot use SetPdf() when already multiple null densities are specified. Please use AddNullDensity()." << std::endl;
135 oocoutE((
TObject*)0,
InputArguments) <<
"Cannot use SetParametersForTestStat() when already multiple null densities are specified. Please use AddNullDensity()." << std::endl;
156 double poiValueForBackground = 0.0
162 double nStdDevOverlap = 0.5,
163 double poiValueForBackground = 0.0
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
virtual void SetParametersForTestStat(const RooArgSet &nullpoi)
void SetParametersForTestStat(const RooArgSet &nullpoi)
void SetExpIncreasingNumToysPerDensity(void)
virtual RooAbsData * GenerateToyData(RooArgSet ¶mPoint, RooAbsPdf &pdf) const
virtual void ClearCache()
clear the cache obtained from the pdf used for speeding the toy and global observables generation nee...
ToyMCImportanceSampler is an extension of the ToyMCSampler for Importance Sampling.
void SetReuseNLL(bool r=true)
#define ClassDef(name, id)
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
virtual RooAbsData * GenerateToyData(RooArgSet ¶mPoint, double &weight) const
std::vector< RooAbsReal * > fNullNLLs
RooRealVar represents a fundamental (non-derived) real valued object.
std::vector< const RooArgSet * > fNullSnapshots
ToyMCImportanceSampler(TestStatistic &ts, Int_t ntoys)
virtual ~ToyMCImportanceSampler()
virtual void SetConditionalObservables(const RooArgSet &set)
virtual void SetPdf(RooAbsPdf &pdf)
std::vector< const RooArgSet * > fImportanceSnapshots
RooAbsData is the common abstract base class for binned and unbinned datasets.
ToyMCSampler is an implementation of the TestStatSampler interface.
RooDataSet is a container class to hold unbinned data.
int CreateNImpDensitiesForOnePOI(RooAbsPdf &pdf, const RooArgSet &allPOI, RooRealVar &poi, int n, double poiValueForBackground=0.0)
n is the number of importance densities
std::vector< RooAbsPdf * > fNullDensities
virtual RooDataSet * GetSamplingDistributionsSingleWorker(RooArgSet ¶mPoint)
This is the main function for serial runs.
unsigned int fIndexGenDensity
std::vector< RooAbsReal * > fImpNLLs
toysStrategies fToysStrategy
virtual void SetPdf(RooAbsPdf &pdf)
Mother of all ROOT objects.
void SetDensityToGenerateFromByIndex(unsigned int i, bool fromNull=false)
specifies the pdf to sample from
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
void SetEqualNumToysPerDensity(void)
std::vector< RooAbsPdf * > fImportanceDensities
const RooArgSet * fParametersForTestStat
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
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.
void AddNullDensity(RooAbsPdf *p, const RooArgSet *s=NULL)
void AddImportanceDensity(RooAbsPdf *p, const RooArgSet *s)
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
void SetApplyVeto(bool b=true)
RooArgSet fConditionalObs