112            "Adjusted number of toys to number of bins of nuisance parameters: " << 
fNToys << std::endl;
 
  143   : fSamplingDistName(
ts.GetVarName().Data()),
 
  146     fAdaptiveLowLimit(-
RooNumber::infinity()),
 
  147     fAdaptiveHighLimit(
RooNumber::infinity())
 
 
  187   if (!
allTS) 
return nullptr;
 
 
  195   std::unique_ptr<RooArgSet> allVars;
 
  196   std::unique_ptr<RooArgSet> 
saveAll;
 
  201      saveAll = std::make_unique<RooArgSet>();
 
 
  228      oocoutW(
nullptr, 
InputArguments) << 
"Multiple test statistics defined, but only one distribution will be returned." << std::endl;
 
  235   if(
r == 
nullptr || 
r->numEntries() == 0) {
 
  236      oocoutW(
nullptr, 
Generation) << 
"no sampling distribution generated" << std::endl;
 
 
  265         << 
"Bad COnfiguration in ToyMCSampler " 
  274   std::unique_ptr<RooArgSet> 
saveAll{allVars->snapshot()};
 
  288      if ( i% 500 == 0 && i>0 ) {
 
  307                         [](
const RooAbsArg *arg) { return dynamic_cast<const RooAbsCategory *>(arg) != nullptr; })) {
 
  309              << 
"ToyMCSampler: Generated toy data didn't contain a category variable, although" 
  310                 " a simultaneous PDF is in use. To generate events for a simultaneous PDF, all components need to be" 
  311                 " extended. Otherwise, the number of events to generate per component cannot be determined." 
 
  375            for (
int i=0; i < 
nCat; ++i){
 
  388         for (
unsigned int i = 0; i < 
_pdfList.size(); ++i) {
 
  401      allVars->assign(*values);
 
 
  429         oocoutI(
nullptr,
InputArguments) << 
"Cannot use multigen when nuisance parameters vary for every toy" << std::endl;
 
  441   std::unique_ptr<RooArgSet> 
saveVars{allVars->snapshot()};
 
 
 
  486  std::unique_ptr<RooAbsData> 
data;
 
  495      std::stringstream 
ss;
 
  496      ss << 
"ToyMCSampler: Error : pdf is not extended and number of events per toy is zero";
 
  498      throw std::runtime_error(
ss.str());
 
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
const_iterator begin() const
const_iterator end() const
Common abstract base class for objects that represent a value and a "shape" in RooFit.
RooFit::OwningPtr< RooArgSet > getVariables(bool stripDisconnected=true) const
Return RooArgSet with all variables (tree leaf nodes of expression tree)
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
virtual double expectedEvents(const RooArgSet *nset) const
Return expected number of events to be used in calculation of extended likelihood.
bool canBeExtended() const
If true, PDF can provide extended likelihood term.
GenSpec * prepareMultiGen(const RooArgSet &whatVars, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={})
Prepare GenSpec configuration object for efficient generation of multiple datasets from identical spe...
RooFit::OwningPtr< RooDataSet > generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={})
See RooAbsPdf::generate(const RooArgSet&,const RooCmdArg&,const RooCmdArg&,const RooCmdArg&,...
virtual RooFit::OwningPtr< RooDataSet > generateSimGlobal(const RooArgSet &whatVars, Int_t nEvents)
Special generator interface for generation of 'global observables' – for RooStats tools.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
Object to represent discrete states.
Container class to hold unbinned data.
static RooMsgService & instance()
Return reference to singleton instance.
Provides numeric constants used in RooFit.
Variable that can be changed from the outside.
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
This class is designed to aid in the construction of RooDataSets and RooArgSets, particularly those n...
This class simply holds a sampling distribution of some test statistic.
void Add(const SamplingDistribution *other)
merge two sampling distributions
TestStatistic is an interface class to provide a facility for construction test statistics distributi...
const RooArgSet * fGlobalObservables
std::string fSamplingDistName
name of the model
virtual void GenerateGlobalObservables(RooAbsPdf &pdf) const
generate global observables
virtual RooDataSet * GetSamplingDistributionsSingleWorker(RooArgSet ¶mPoint)
This is the main function for serial runs.
std::unique_ptr< const RooArgSet > fParametersForTestStat
virtual SamplingDistribution * AppendSamplingDistribution(RooArgSet &allParameters, SamplingDistribution *last, Int_t additionalMC)
Extended interface to append to sampling distribution more samples.
NuisanceParametersSampler * fNuisanceParametersSampler
!
std::unique_ptr< RooAbsPdf::GenSpec > _gs4
! GenSpec #4
const RooArgSet * fObservables
double fAdaptiveHighLimit
double fToysInTails
minimum no of toys in tails for adaptive sampling (taking weights into account, therefore double) Def...
virtual RooArgList * EvaluateAllTestStatistics(RooAbsData &data, const RooArgSet &poi)
Evaluate all test statistics, returning result and any detailed output.
RooAbsPdf * fPdf
densities, snapshots, and test statistics to reweight to
SamplingDistribution * GetSamplingDistribution(RooArgSet ¶mPoint) override
main interface
std::unique_ptr< RooAbsPdf::GenSpec > _gs1
! GenSpec #1
virtual RooDataSet * GetSamplingDistributions(RooArgSet ¶mPoint)
Use for serial and parallel runs.
virtual void AddTestStatistic(TestStatistic *t=nullptr)
The pdf can be nullptr in which case the density from SetPdf() is used.
ToyMCSampler(TestStatistic &ts, Int_t ntoys)
virtual RooAbsData * GenerateToyData(RooArgSet ¶mPoint, RooAbsPdf &pdf) const
generates toy data without weight
bool fExpectedNuisancePar
whether to use expectation values for nuisance parameters (ie Asimov data set)
bool fUseMultiGen
Use PrepareMultiGen?
std::unique_ptr< RooAbsPdf::GenSpec > _gs2
! GenSpec #2
const RooArgSet * fNuisancePars
std::unique_ptr< RooAbsPdf::GenSpec > _gs3
! GenSpec #3
std::vector< TestStatistic * > fTestStatistics
Int_t fNEvents
number of events per toy (may be ignored depending on settings)
std::unique_ptr< RooArgSet > _allVars
!
std::unique_ptr< RooAbsData > Generate(RooAbsPdf &pdf, RooArgSet &observables, const RooDataSet *protoData=nullptr, int forceEvents=0) const
helper for GenerateToyData
static void SetAlwaysUseMultiGen(bool flag)
std::vector< RooAbsPdf * > _pdfList
! We don't own those objects
Int_t fNToys
number of toys to generate
virtual void ClearCache()
helper method for clearing the cache
bool CheckConfig(void)
Checks for sufficient information to do a GetSamplingDistribution(...).
std::vector< std::unique_ptr< RooArgSet > > _obsList
!
static bool fgAlwaysUseMultiGen
Use PrepareMultiGen always.
double fMaxToys
maximum no of toys (taking weights into account, therefore double)
const RooDataSet * fProtoData
in dev
TString fGenerateBinnedTag
std::vector< std::unique_ptr< RooAbsPdf::GenSpec > > _gsList
!
RooAbsPdf * fPriorNuisance
prior pdf for nuisance parameters
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
RooCmdArg Extended(bool flag=true)
RooCmdArg ProtoData(const RooDataSet &protoData, bool randomizeOrder=false, bool resample=false)
RooCmdArg AutoBinned(bool flag=true)
RooCmdArg NumEvents(Int_t numEvents)
RooCmdArg GenBinned(const char *tag)
RooCmdArg ExpectedData(bool flag=true)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Namespace for the RooStats classes.