54namespace TestStatistics {
96 oocoutI(
nullptr,
Minimization) <<
"User-defined specification of global observables definition with tag named '"
104 <<
"p.d.f. provides built-in specification of global observables definition with tag named '"
106 std::unique_ptr<RooArgSet> allVars{pdf->
getVariables()};
114 std::unique_ptr<RooArgSet> constraints{
161 std::string
name(
"likelihood for pdf ");
222 throw std::logic_error(
223 "getSimultaneousComponents ERROR, index category of simultaneous pdf is missing in dataset, aborting");
240 std::vector<std::unique_ptr<RooAbsL>> components;
253 ooccoutI(
nullptr,
Fitting) <<
"getSimultaneousComponents: creating slave calculator #" <<
n <<
" for state "
254 <<
catName <<
" (" <<
dset->numEntries() <<
" dataset entries)" << std::endl;
257 bool binnedL = (binnedPdf !=
nullptr);
261 if (
component->getAttribute(
"MAIN_MEASUREMENT")) {
272 components.push_back(std::make_unique<RooBinnedL>((binnedPdf ? binnedPdf :
component_pdf),
dset));
274 components.push_back(
295 <<
" has no data entries, no slave calculator created" << std::endl;
299 oocoutI(
nullptr,
Fitting) <<
"getSimultaneousComponents: created " <<
n <<
" slave calculators." << std::endl;
326 std::unique_ptr<RooAbsL> likelihood;
327 std::vector<std::unique_ptr<RooAbsL>> components;
332 likelihood = std::make_unique<RooBinnedL>(binnedPdf, &
_data);
341 components.push_back(std::move(likelihood));
345 if (!components.empty()) {
346 likelihood = std::make_unique<RooSumL>(&
_pdf, &
_data, std::move(components),
_extended);
RooAbsData * _data
Pointer to original input dataset.
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
RooFit::OwningPtr< RooArgSet > getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
bool getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
RooFit::OwningPtr< RooArgSet > getVariables(bool stripDisconnected=true) const
Return RooArgSet with all variables (tree leaf nodes of expression tree)
Abstract base class for objects that represent a discrete value that can be set from the outside,...
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
Abstract base class for binned and unbinned datasets.
virtual const RooArgSet * get() const
virtual RooFit::OwningPtr< TList > split(const RooAbsCategory &splitCat, bool createEmptyDataSets=false) const
Split the dataset into subsets based on states of a categorical variable in this dataset.
Abstract interface for all probability density functions.
TClass * IsA() const override
RooArgSet * getAllConstraints(const RooArgSet &observables, RooArgSet &constrainedParams, bool stripDisconnected=true, bool removeConstraintsFromPdf=false) const
This helper function finds and collects all constraints terms of all component p.d....
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * selectCommon(const RooAbsCollection &refColl) const
Use RooAbsCollection::selecCommon(), but return as RooArgSet.
RooArgSet _globalObservables
RooFit::EvalBackend _evalBackend
std::unique_ptr< RooAbsL > build()
std::vector< std::unique_ptr< RooAbsL > > getSimultaneousComponents()
NLLFactory & EvalBackend(RooFit::EvalBackend evalBackend)
RooArgSet _externalConstraints
NLLFactory(RooAbsPdf &pdf, RooAbsData &data)
Create a likelihood builder for a given pdf and dataset.
std::string _globalObservablesTag
RooAbsL::Extended _extended
NLLFactory & ExternalConstraints(const RooArgSet &externalconstraints)
NLLFactory & Extended(RooAbsL::Extended extended)
NLLFactory & GlobalObservables(const RooArgSet &globalObservables)
NLLFactory & ConstrainedParameters(const RooArgSet &constrainedParameters)
RooArgSet _constrainedParameters
NLLFactory & GlobalObservablesTag(const char *globalObservablesTag)
static bool isExtendedHelper(RooAbsPdf *pdf, Extended extended)
Efficient implementation of a product of PDFs of the form.
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
const char * GetName() const override
Returns name of object.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...