48#ifdef ROOFIT_LEGACY_EVAL_BACKEND
54using RooFit::Detail::RooNLLVarNew;
83 <<
"RooAbsPdf::fitTo(" << pdf.
GetName()
84 <<
") WARNING: Asymptotic error correction is requested for a binned data set. "
85 "This method is not designed to handle binned data. A standard chi2 fit will likely be more suitable.";
89 std::unique_ptr<RooFitResult>
rw(minimizer.
save());
93 <<
"RooAbsPdf::fitTo(" << pdf.
GetName()
94 <<
") Calculating covariance matrix according to the asymptotically correct approach. If you find this "
95 "method useful please consider citing https://arxiv.org/abs/1911.01303.\n";
107 std::vector<std::unique_ptr<RooDerivative>>
derivatives;
113 const double eps = 1.0e-4;
127 for (std::size_t k = 0; k <
floated.size(); k++) {
144 for (
int j = 0;
j <
data.numEntries();
j++) {
149 for (std::size_t k = 0; k <
floated.size(); k++) {
160 for (std::size_t k = 0; k <
floated.size(); k++) {
161 for (std::size_t
l = 0;
l <
floated.size();
l++) {
166 num.Similarity(
matV);
174 return rw->covQual();
192 std::unique_ptr<RooFitResult>
rw{minimizer.
save()};
193 nll.applyWeightSquared(
true);
195 <<
") Calculating sum-of-weights-squared correction matrix for covariance matrix\n";
197 std::unique_ptr<RooFitResult>
rw2{minimizer.
save()};
198 nll.applyWeightSquared(
false);
206 <<
") ERROR: Cannot apply sum-of-weights correction to covariance matrix: correction "
207 "matrix calculated with weight-squared is singular\n";
215 for (
int i = 0; i <
matC.GetNrows(); ++i) {
216 for (
int j = 0;
j < i; ++
j) {
225 return std::min(
rw->covQual(),
rw2->covQual());
231 double recoverFromNaN = 10.;
249 bool enableParallelGradient =
false;
250 bool enableParallelDescent =
false;
251 bool timingAnalysis =
false;
254 std::string
minAlg =
"minuit";
264 <<
"p.d.f. provides expected number of events, including extended term in likelihood." << std::endl;
275 std::string
errMsg =
"You used the Extended(false) option on a pdf where the fit MUST be extended! "
276 "The parameters are not well defined and you're getting nonsensical results.";
312 if (arg->isCategory())
314 auto &observable =
static_cast<RooRealVar &
>(*arg);
317 observable.getMax(
subrange.c_str()));
328template <
typename TermFactory>
352 std::unique_ptr<RooArgSet> observables{
360 combined->addOwnedComponents(std::move(terms));
369 RooNLLVarNew::Config cfg;
370 cfg.statistic = RooNLLVarNew::Statistic::Chi2;
372 cfg.chi2ErrorType = etype;
374 return std::make_unique<RooNLLVarNew>(
name.c_str(),
name.c_str(),
channelPdf, observables, cfg);
377 chi2->setAttribute(
"Chi2EvaluationActive");
386 RooNLLVarNew::Config cfg;
391 return std::make_unique<RooNLLVarNew>(
name.c_str(),
name.c_str(),
channelPdf, observables, cfg);
408 simPdf->wrapPdfsInBinSamplingPdfs(
data, precision);
438 _pdf->setAttribute(
"SplitRange",
false);
439 _pdf->setStringAttribute(
"RangeName",
nullptr);
460 ctx.setLikelihoodMode(likelihoodMode);
462 std::unique_ptr<RooAbsPdf>
pdfClone{&
dynamic_cast<RooAbsPdf &
>(*head.release())};
482 observables.
remove(projDeps,
true,
true);
485 <<
") fixing normalization set for coefficient determination to observables in data"
496 RooNLLVarNew::Config cfg;
497 cfg.extended = isExtended;
499 nllTerms.addOwned(std::make_unique<RooNLLVarNew>(
"RooNLLVarNew",
"RooNLLVarNew",
finalPdf, observables, cfg));
502 nllTerms.addOwned(std::move(constraints));
515namespace RooFit::FitHelpers {
563 cfg.recoverFromNaN = pc.
getDouble(
"RecoverFromUndefinedRegions");
564 cfg.optConst = pc.
getInt(
"optConst");
565 cfg.verbose = pc.
getInt(
"verbose");
566 cfg.doSave = pc.
getInt(
"doSave");
567 cfg.doTimer = pc.
getInt(
"doTimer");
568 cfg.printLevel = pc.
getInt(
"printLevel");
569 cfg.strategy = pc.
getInt(
"strategy");
570 cfg.initHesse = pc.
getInt(
"initHesse");
571 cfg.hesse = pc.
getInt(
"hesse");
572 cfg.minos = pc.
getInt(
"minos");
573 cfg.numee = pc.
getInt(
"numee");
574 cfg.doEEWall = pc.
getInt(
"doEEWall");
575 cfg.doWarn = pc.
getInt(
"doWarn");
576 cfg.doSumW2 = pc.
getInt(
"doSumW2");
577 cfg.doAsymptotic = pc.
getInt(
"doAsymptoticError");
578 cfg.maxCalls = pc.
getInt(
"maxCalls");
579 cfg.minosSet = pc.
getSet(
"minosSet");
580 cfg.minType = pc.
getString(
"mintype",
"");
581 cfg.minAlg = pc.
getString(
"minalg",
"minuit");
582 cfg.doOffset = pc.
getInt(
"doOffset");
583 cfg.parallelize = pc.
getInt(
"parallelize");
584 cfg.enableParallelGradient = pc.
getInt(
"enableParallelGradient");
585 cfg.enableParallelDescent = pc.
getInt(
"enableParallelDescent");
586 cfg.timingAnalysis = pc.
getInt(
"timingAnalysis");
593 const bool isChi2 =
nll.getAttribute(
"Chi2EvaluationActive");
595 std::string
msgPrefix = std::string{
"RooAbsPdf::fitTo("} + pdf.
GetName() +
"): ";
600 R
"(WARNING: a likelihood fit is requested of what appears to be weighted data.
601 While the estimated values of the parameters will always be calculated taking the weights into account,
602 there are multiple ways to estimate the errors of the parameters. You are advised to make an
603 explicit choice for the error calculation:
604 - Either provide SumW2Error(true), to calculate a sum-of-weights-corrected HESSE error matrix
605 (error will be proportional to the number of events in MC).
606 - Or provide SumW2Error(false), to return errors from original HESSE error matrix
607 (which will be proportional to the sum of the weights, i.e., a dataset with <sum of weights> events).
608 - Or provide AsymptoticError(true), to use the asymptotically correct expression
609 (for details see https://arxiv.org/abs/1911.01303)."
613 if (cfg.minos && (cfg.doSumW2 == 1 || cfg.doAsymptotic == 1)) {
616 <<
" sum-of-weights and asymptotic error correction do not work with MINOS errors. Not fitting.\n";
619 if (cfg.doAsymptotic == 1 && cfg.minos) {
620 oocoutW(&pdf, InputArguments) <<
msgPrefix <<
"WARNING: asymptotic correction does not apply to MINOS errors\n";
624 if (cfg.doSumW2 == 1 && cfg.doAsymptotic == 1) {
626 <<
"ERROR: Cannot compute both asymptotically correct and SumW2 errors.\n";
639 m.setMinimizerType(cfg.minType);
640 m.setEvalErrorWall(cfg.doEEWall);
641 m.setRecoverFromNaNStrength(cfg.recoverFromNaN);
642 m.setPrintEvalErrors(cfg.numee);
643 if (cfg.maxCalls > 0)
644 m.setMaxFunctionCalls(cfg.maxCalls);
645 if (cfg.printLevel != 1)
646 m.setPrintLevel(cfg.printLevel);
648 m.optimizeConst(cfg.optConst);
653 if (cfg.strategy != 1)
654 m.setStrategy(cfg.strategy);
657 m.minimize(cfg.minType.c_str(), cfg.minAlg.c_str());
663 if (!
isChi2 &&
m.getNPar() > 0) {
664 if (cfg.doAsymptotic == 1)
666 if (cfg.doSumW2 == 1)
671 cfg.minosSet ?
m.minos(*cfg.minosSet) :
m.minos();
674 std::unique_ptr<RooFitResult>
ret;
676 auto name = std::string(
"fitresult_") + pdf.
GetName() +
"_" +
data.GetName();
677 auto title = std::string(
"Result of fit of p.d.f. ") + pdf.
GetName() +
" to dataset " +
data.GetName();
678 ret = std::unique_ptr<RooFitResult>{
m.save(
name.c_str(), title.c_str())};
679 if ((cfg.doSumW2 == 1 || cfg.doAsymptotic == 1) &&
m.getNPar() > 0)
690 auto timingScope = std::make_unique<ROOT::Math::Util::TimingScope>(
691 [&pdf](std::string
const &
msg) {
oocoutI(&pdf, Fitting) <<
msg << std::endl; },
"Creation of NLL object took");
698 pc.
defineString(
"rangeName",
"RangeWithName", 0,
"",
true);
700 pc.
defineString(
"globstag",
"GlobalObservablesTag", 0,
"");
701 pc.
defineString(
"globssource",
"GlobalObservablesSource", 0,
"data");
704 pc.
defineInt(
"splitRange",
"SplitRange", 0, 0);
707 pc.
defineInt(
"interleave",
"NumCPU", 1, 0);
708 pc.
defineInt(
"verbose",
"Verbose", 0, 0);
709 pc.
defineInt(
"optConst",
"Optimize", 0, 0);
710 pc.
defineInt(
"cloneData",
"CloneData", 0, 2);
711 pc.
defineSet(
"projDepSet",
"ProjectedObservables", 0,
nullptr);
712 pc.
defineSet(
"cPars",
"Constrain", 0,
nullptr);
713 pc.
defineSet(
"glObs",
"GlobalObservables", 0,
nullptr);
714 pc.
defineInt(
"doOffset",
"OffsetLikelihood", 0, 0);
715 pc.
defineSet(
"extCons",
"ExternalConstraints", 0,
nullptr);
717 pc.
defineDouble(
"IntegrateBins",
"IntegrateBins", 0, -1.);
719 pc.
defineMutex(
"GlobalObservables",
"GlobalObservablesTag");
720 pc.
defineInt(
"ModularL",
"ModularL", 0, 0);
735 if (pc.
getInt(
"ModularL")) {
736 int lut[3] = {2, 1, 0};
756 builder.Extended(
ext)
760 .GlobalObservablesTag(
rangeName.c_str());
762 return std::make_unique<RooFit::TestStatistics::RooRealL>(
"likelihood",
"", builder.build());
781 double rangeLo = pc.
getDouble(
"rangeLo");
782 double rangeHi = pc.
getDouble(
"rangeHi");
787 for (
auto arg : obs) {
790 rrv->setRange(
"fit", rangeLo, rangeHi);
808 std::string
errMsg =
"RooAbsPdf::fitTo: GlobalObservablesSource can only be \"data\" or \"model\"!";
810 throw std::invalid_argument(
errMsg);
817 auto createConstr = [&]() -> std::unique_ptr<RooAbsReal> {
837 for (
auto i : projDeps) {
838 auto res =
normSet.find(i->GetName());
839 if (res !=
nullptr) {
840 res->setAttribute(
"__conditional__");
847 std::unique_ptr<RooAbsPdf>
pdfClone =
852 <<
") fixing interpretation of coefficients of any component to range "
863 pc.getDouble(
"IntegrateBins"),
offset);
868 oocoutI(&pdf, Fitting) <<
"[FitHelpers] Detected correction term from RooAbsPdf::getCorrection(). "
869 <<
"Adding penalty to NLL." << std::endl;
873 "Penalty term from getCorrection()",
correction);
876 auto correctedNLL = std::make_unique<RooAddition>((
baseName +
"_corrected").c_str(),
"NLL + penalty",
884 auto nllWrapper = std::make_unique<RooFit::Experimental::RooEvaluatorWrapper>(
897 nllWrapper->setUseGeneratedFunctionCode(
true);
900 nllWrapper->addOwnedComponents(std::move(nll));
906 std::unique_ptr<RooAbsReal>
nll;
908#ifdef ROOFIT_LEGACY_EVAL_BACKEND
915 oocoutW(&pdf, Minimization) <<
"Cannot use a NumCpu Strategy = 3 when the pdf is not a RooSimultaneous, "
916 "falling back to default strategy = 0"
927 RooAbsTestStatistic::Configuration cfg;
932 cfg.splitCutRange =
static_cast<bool>(
splitRange);
933 cfg.cloneInputData =
static_cast<bool>(
cloneData);
934 cfg.integrateOverBinsPrecision = pc.
getDouble(
"IntegrateBins");
938 auto nllVar = std::make_unique<RooNLLVar>(
baseName.c_str(),
"-log(likelihood)",
actualPdf,
data, projDeps,
ext, cfg);
940 nll = std::move(nllVar);
944 if (std::unique_ptr<RooAbsReal> constraintTerm =
createConstr()) {
956 constraintTerm->setData(
data,
false);
963 nll = std::make_unique<RooAddition>((
baseName +
"_with_constr").c_str(),
"nllWithCons",
965 nll->addOwnedComponents(std::move(
orignll), std::move(constraintTerm));
973 nll->enableOffsetting(
true);
977 oocoutI(&pdf, Fitting) <<
"[FitHelpers] Detected correction term from RooAbsPdf::getCorrection(). "
978 <<
"Adding penalty to NLL." << std::endl;
982 "Penalty term from getCorrection()",
correction);
993 throw std::runtime_error(
"RooFit was not built with the legacy evaluation backend");
1007 pc.
defineInt(
"verbose",
"Verbose", 0, 0);
1008 pc.
defineString(
"rangeName",
"RangeWithName", 0,
"",
true);
1014 pc.
defineInt(
"splitRange",
"SplitRange", 0, 0);
1015 pc.
defineDouble(
"integrate_bins",
"IntegrateBins", 0, -1);
1016 pc.
defineString(
"addCoefRange",
"SumCoefRange", 0,
"");
1025 real.removeStringAttribute(
"fitrange");
1027 std::string
baseName =
"chi2_" + std::string(
real.GetName()) +
"_" +
data.GetName();
1042 const double rangeLo = pc.
getDouble(
"rangeLo");
1043 const double rangeHi = pc.
getDouble(
"rangeHi");
1045 real.getObservables(
data.get(), obs);
1046 for (
auto arg : obs) {
1048 rrv->setRange(
"fit", rangeLo, rangeHi);
1060 std::unique_ptr<RooFit::Experimental::RooEvaluatorWrapper>
wrapper;
1066 real.getObservables(
data.get(), observables);
1067 RooNLLVarNew::Config cfg;
1068 cfg.statistic = RooNLLVarNew::Statistic::Chi2;
1069 cfg.chi2ErrorType = etype;
1071 wrapper = std::make_unique<RooFit::Experimental::RooEvaluatorWrapper>(
1083 <<
") fixing normalization set for coefficient determination to observables in data\n";
1086 std::unique_ptr<RooAbsPdf>
pdfClone =
1094 std::unique_ptr<RooAbsReal>
chi2;
1101 RooNLLVarNew::Config cfg;
1102 cfg.statistic = RooNLLVarNew::Statistic::Chi2;
1104 cfg.chi2ErrorType = etype;
1108 wrapper = std::make_unique<RooFit::Experimental::RooEvaluatorWrapper>(
1120 wrapper->setUseGeneratedFunctionCode(
true);
1127#ifdef ROOFIT_LEGACY_EVAL_BACKEND
1128 RooAbsTestStatistic::Configuration cfg;
1144 cfg.nCPU = pc.
getInt(
"numcpu");
1146 cfg.verbose =
static_cast<bool>(pc.
getInt(
"verbose"));
1147 cfg.cloneInputData =
false;
1148 cfg.integrateOverBinsPrecision = pc.
getDouble(
"integrate_bins");
1150 cfg.splitCutRange =
static_cast<bool>(
splitRange);
1158 throw std::runtime_error(
"createChi2() is not supported without the legacy evaluation backend");
1170#ifdef ROOFIT_LEGACY_EVAL_BACKEND
1175 pc.
defineInt(
"verbose",
"Verbose", 0, 0);
1176 pc.
defineString(
"rangeName",
"RangeWithName", 0,
"",
true);
1178 RooAbsTestStatistic::Configuration cfg;
1180 pc.
defineInt(
"integrate",
"Integrate", 0, 0);
1182 pc.
defineInt(
"interleave",
"NumCPU", 1, 0);
1191 bool integrate = pc.
getInt(
"integrate");
1198 oocoutW(&
real, Minimization) <<
"Cannot use a NumCpu Strategy = 3 when the pdf is not a RooSimultaneous, "
1199 "falling back to default strategy = 0"
1210 cfg.verbose =
false;
1212 std::string
name =
"chi2_" + std::string(
real.GetName()) +
"_" +
data.GetName();
1217 throw std::runtime_error(
"createChi2() is not supported without the legacy evaluation backend");
1232 "RangeWithName,SumCoefRange,NumCPU,SplitRange,Constrained,Constrain,ExternalConstraints,"
1233 "CloneData,GlobalObservables,GlobalObservablesSource,GlobalObservablesTag,"
1234 "EvalBackend,IntegrateBins,ModularL";
1241 "AddCoefRange,SplitRange,DataError,Extended,EvalBackend";
1258 if (pc.
getInt(
"timingAnalysis") && !
real.InheritsFrom(
"RooSimultaneous")) {
1259 oocoutW(&
real, Minimization) <<
"The timingAnalysis feature was built for minimization with RooSimultaneous "
1260 "and is not implemented for other PDF's. Please create a RooSimultaneous to "
1261 "enable this feature."
1269 size_t nEvents =
static_cast<size_t>(
prefit *
data.numEntries());
1270 if (
prefit > 0.5 || nEvents < 100) {
1271 oocoutW(&
real, InputArguments) <<
"PrefitDataFraction should be in suitable range."
1272 <<
"With the current PrefitDataFraction=" <<
prefit
1273 <<
", the number of events would be " << nEvents <<
" out of "
1274 <<
data.numEntries() <<
". Skipping prefit..." << std::endl;
1276 size_t step =
data.numEntries() / nEvents;
1280 for (
int i = 0; i <
data.numEntries(); i += step) {
1297 if (pc.
getInt(
"parallelize") != 0 || pc.
getInt(
"enableParallelGradient") || pc.
getInt(
"enableParallelDescent")) {
1303 std::unique_ptr<RooAbsReal>
nll;
1311 return RooFit::FitHelpers::minimize(
real, *nll,
data, pc);
header file containing the templated implementation of matrix inversion routines for use with ROOT's ...
ROOT::RRangeCast< T, false, Range_t > static_range_cast(Range_t &&coll)
int Int_t
Signed integer 4 bytes (int)
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 Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
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 Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t child
Binding & operator=(OUT(*fun)(void))
class to compute the Cholesky decomposition of a matrix
Common abstract base class for objects that represent a value and a "shape" in RooFit.
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
RooFit::OwningPtr< RooArgSet > getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
void removeStringAttribute(const Text_t *key)
Delete a string attribute with a given key.
void setAttribute(const Text_t *name, bool value=true)
Set (default) or clear a named boolean attribute of this object.
Abstract base class for objects that represent a discrete value that can be set from the outside,...
virtual bool remove(const RooAbsArg &var, bool silent=false, bool matchByNameOnly=false)
Remove the specified argument from our list.
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
void assign(const RooAbsCollection &other) const
Sets the value, cache and constant attribute of any argument in our set that also appears in the othe...
virtual bool addOwned(RooAbsArg &var, bool silent=false)
Add an argument and transfer the ownership to the collection.
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
std::unique_ptr< RooAbsArg > compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext &ctx) const override
void setNormRange(const char *rangeName)
virtual double getCorrection() const
This function returns the penalty term.
const char * normRange() const
virtual ExtendMode extendMode() const
Returns ability of PDF to provide extended likelihood terms.
Abstract base class for objects that represent a real value and implements functionality common to al...
virtual void fixAddCoefNormalization(const RooArgSet &addNormSet=RooArgSet(), bool force=true)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
static void setEvalErrorLoggingMode(ErrorLoggingMode m)
Set evaluation error logging mode.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooArgSet * selectByAttrib(const char *name, bool value) const
Use RooAbsCollection::selectByAttrib(), but return as RooArgSet.
static std::unique_ptr< RooAbsPdf > create(RooAbsPdf &pdf, RooAbsData const &data, double precision)
Creates a wrapping RooBinSamplingPdf if appropriate.
Object to represent discrete states.
Named container for two doubles, two integers two object points and three string pointers that can be...
Int_t getInt(Int_t idx) const
Configurable parser for RooCmdArg named arguments.
void defineMutex(const char *head, Args_t &&... tail)
Define arguments where any pair is mutually exclusive.
bool process(const RooCmdArg &arg)
Process given RooCmdArg.
bool hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
double getDouble(const char *name, double defaultValue=0.0) const
Return double property registered with name 'name'.
bool defineDouble(const char *name, const char *argName, int doubleNum, double defValue=0.0)
Define double property name 'name' mapped to double in slot 'doubleNum' in RooCmdArg with name argNam...
RooArgSet * getSet(const char *name, RooArgSet *set=nullptr) const
Return RooArgSet property registered with name 'name'.
bool defineSet(const char *name, const char *argName, int setNum, const RooArgSet *set=nullptr)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
bool ok(bool verbose) const
Return true of parsing was successful.
bool defineObject(const char *name, const char *argName, int setNum, const TObject *obj=nullptr, bool isArray=false)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
const char * getString(const char *name, const char *defaultValue="", bool convEmptyToNull=false) const
Return string property registered with name 'name'.
bool defineString(const char *name, const char *argName, int stringNum, const char *defValue="", bool appendMode=false)
Define double property name 'name' mapped to double in slot 'stringNum' in RooCmdArg with name argNam...
bool defineInt(const char *name, const char *argName, int intNum, int defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
void allowUndefined(bool flag=true)
If flag is true the processing of unrecognized RooCmdArgs is not considered an error.
int getInt(const char *name, int defaultValue=0) const
Return integer property registered with name 'name'.
RooLinkedList filterCmdList(RooLinkedList &cmdInList, const char *cmdNameList, bool removeFromInList=true) const
Utility function to filter commands listed in cmdNameList from cmdInList.
TObject * getObject(const char *name, TObject *obj=nullptr) const
Return TObject property registered with name 'name'.
Container class to hold N-dimensional binned data.
Container class to hold unbinned data.
static Value & defaultValue()
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
Wrapper class around ROOT::Math::Minimizer that provides a seamless interface between the minimizer f...
RooFit::OwningPtr< RooFitResult > save(const char *name=nullptr, const char *title=nullptr)
Save and return a RooFitResult snapshot of current minimizer status.
int hesse()
Execute HESSE.
void applyCovarianceMatrix(TMatrixDSym const &V)
Apply results of given external covariance matrix.
Variable that can be changed from the outside.
void setRange(const char *name, double min, double max, bool shared=true)
Set a fit or plotting range.
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
const char * GetName() const override
Returns name of object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
RooCmdArg WeightVar(const char *name="weight", bool reinterpretAsWeight=false)
RooCmdArg Hesse(bool flag=true)
RooCmdArg ModularL(bool flag=false)
RooCmdArg PrintLevel(Int_t code)
RVec< PromoteType< T > > log(const RVec< T > &v)
CoordSystem::Scalar get(DisplacementVector2D< CoordSystem, Tag > const &p)
std::vector< std::string > Split(std::string_view str, std::string_view delims, bool skipEmpty=false)
Splits a string at each character in delims.
double nll(double pdf, double weight, int binnedL, int doBinOffset)
std::unique_ptr< T > compileForNormSet(T const &arg, RooArgSet const &normSet)
OffsetMode
For setting the offset mode with the Offset() command argument to RooAbsPdf::fitTo()
std::unique_ptr< T > cloneTreeWithSameParameters(T const &arg, RooArgSet const *observables=nullptr)
Clone RooAbsArg object and reattach to original parameters.
BinnedLOutput getBinnedL(RooAbsPdf const &pdf)
Config argument to RooMinimizer constructor.