24std::unique_ptr<RooArgSet>
30 std::string
errMsg =
"RooAbsPdf::fitTo: GlobalObservables and GlobalObservablesTag options mutually exclusive!";
32 throw std::invalid_argument(
errMsg);
34 if (globalObservables) {
36 return std::make_unique<RooArgSet>(*globalObservables);
40 oocoutI(&pdf, Minimization) <<
"User-defined specification of global observables definition with tag named '"
47 oocoutI(&pdf, Minimization) <<
"p.d.f. provides built-in specification of global observables definition "
99 bool takeGlobalObservablesFromData)
122 if (!
cPars.empty()) {
133 oocoutI(&pdf, Minimization) <<
" Including the following constraint terms in minimization: " <<
allConstraints
138 if (
data.getGlobalObservables() && takeGlobalObservablesFromData) {
143 <<
"The following global observables have been automatically defined according to the dataset "
144 <<
"which also provides their values: " << *
data.getGlobalObservables() << std::endl;
145 glObs = std::make_unique<RooArgSet>(*
data.getGlobalObservables());
151 oocoutI(&pdf, Minimization) <<
"The following global observables have been defined: " << *
glObs <<
","
153 <<
" obtained from the dataset and the other values from the model."
158 <<
"The following global observables have been defined and their values are taken from the model: "
159 << *
glObs << std::endl;
161 takeGlobalObservablesFromData =
false;
165 <<
"The global observables are not defined , normalize constraints with respect to the parameters "
166 <<
cPars << std::endl;
168 takeGlobalObservablesFromData =
false;
172 takeGlobalObservablesFromData);
std::unique_ptr< RooAbsReal > createConstraintTerm(std::string const &name, RooAbsPdf const &pdf, RooAbsData const &data, RooArgSet const *constrainedParameters, RooArgSet const *externalConstraints, RooArgSet const *globalObservables, const char *globalObservablesTag, bool takeGlobalObservablesFromData)
Create the parameter constraint sum to add to the negative log-likelihood.
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'.
RooFit::OwningPtr< RooArgSet > getVariables(bool stripDisconnected=true) const
Return RooArgSet with all variables (tree leaf nodes of expression tree)
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
RooArgSet * getAllConstraints(const RooArgSet &observables, RooArgSet &constrainedParams, bool stripDisconnected=true) 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.
const char * GetName() const override
Returns name of object.
std::string getColonSeparatedNameString(RooArgSet const &argSet, char delim=':')