Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooGlobalFunc.cxx
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * @(#)root/roofitcore:$Id$
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16
17// Global helper functions
18
19#include <RooGlobalFunc.h>
20
21#include <RooAbsData.h>
22#include <RooAbsPdf.h>
23#include <RooCategory.h>
24#include <RooDataHist.h>
25#include <RooDataSet.h>
26#include <RooFitResult.h>
27#include <RooFormulaVar.h>
28#include <RooHelpers.h>
29#include <RooMsgService.h>
30#include <RooNumIntConfig.h>
31#include <RooRealConstant.h>
32#include <RooRealVar.h>
33
34#include <TColor.h>
35#include <TH1.h>
36#include <TInterpreter.h>
37
38#include <algorithm>
39
40namespace RooFit {
41
42// anonymous namespace for helper functions for the implementation of the global functions
43namespace {
44
45template <class T>
46RooCmdArg processImportItem(std::string const &key, T *val)
47{
48 return Import(key.c_str(), *val);
49}
50
51template <class T>
52RooCmdArg processLinkItem(std::string const &key, T *val)
53{
54 return Link(key.c_str(), *val);
55}
56
57RooCmdArg processSliceItem(RooCategory *key, std::string const &val)
58{
59 return Slice(*key, val.c_str());
60}
61
62template <class Key_t, class Val_t, class Func_t>
63RooCmdArg processMap(const char *name, Func_t func, std::map<Key_t, Val_t> const &map)
64{
65 RooCmdArg container(name, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
66 for (auto const &item : map) {
67 container.addArg(func(item.first, item.second));
68 }
69 container.setProcessRecArgs(true, false);
70 return container;
71}
72
73template <class Key_t, class Val_t, class Func_t>
74RooCmdArg processFlatMap(const char *name, Func_t func, Detail::FlatMap<Key_t, Val_t> const &map)
75{
76 RooCmdArg container(name, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
77 for (std::size_t i = 0; i < map.keys.size(); ++i) {
78 container.addArg(func(map.keys[i], map.vals[i]));
79 }
80 container.setProcessRecArgs(true, false);
81 return container;
82}
83
84int interpretString(std::string const &s)
85{
86 return gInterpreter->ProcessLine(s.c_str());
87}
88
89Color_t interpretColorString(std::string const &color)
90{
91 using Map = std::unordered_map<std::string, Color_t>;
92 // Color dictionary to define matplotlib conventions
93 static Map colorMap{{"r", kRed}, {"b", kBlue}, {"g", kGreen}, {"y", kYellow},
94 {"w", kWhite}, {"k", kBlack}, {"m", kMagenta}, {"c", kCyan}};
95 auto found = colorMap.find(color);
96 if (found != colorMap.end())
97 return found->second;
98 // Lookup color from static color map otherwise
99 return TColor::GetColorByName(color.c_str());
100}
101
102Style_t interpretLineStyleString(std::string const &style)
103{
104 using Map = std::unordered_map<std::string, Style_t>;
105 // Style dictionary to define matplotlib conventions
106 static Map styleMap{{"-", kSolid}, {"--", kDashed}, {":", kDotted}, {"-.", kDashDotted}};
107 auto found = styleMap.find(style);
108 if (found != styleMap.end())
109 return found->second;
110 // Use interpreter if style was not matched in the style map
111 return gInterpreter->ProcessLine(style.c_str());
112}
113
114} // namespace
115
116namespace Experimental {
117
118RooCmdArg ParallelGradientOptions(bool enable, int orderStrategy, int chainFactor)
119{
120 return RooCmdArg("ParallelGradientOptions", enable, chainFactor, orderStrategy, 0, nullptr, nullptr, nullptr,
121 nullptr);
122}
123RooCmdArg ParallelDescentOptions(bool enable, int splitStrategy, int numSplits)
124{
125 return RooCmdArg("ParallelDescentOptions", enable, numSplits, splitStrategy, 0, nullptr, nullptr, nullptr, nullptr);
126}
127
128} // namespace Experimental
129
130// RooAbsReal::plotOn arguments
131RooCmdArg DrawOption(const char *opt)
132{
133 return RooCmdArg("DrawOption", 0, 0, 0, 0, opt, nullptr, nullptr, nullptr);
134}
135RooCmdArg Slice(const RooArgSet &sliceSet)
136{
137 RooCmdArg out{"SliceVars", 0};
138 out.setSet(0, sliceSet);
139 return out;
140}
141RooCmdArg Slice(RooCategory &cat, const char *label)
142{
143 // We don't support adding multiple slices for a single category by
144 // concatenating labels with a comma. Users were trying to do that, and were
145 // surprised it did not work. So we explicitly check if there is a comma,
146 // and if there is, we will give some helpful advice on how to get to the
147 // desired plot.
148 std::string lbl{label};
149 if (lbl.find(',') != std::string::npos) {
150 std::stringstream errorMsg;
151 errorMsg << "RooFit::Slice(): you tried to pass a comma-separated list of state labels \"" << label
152 << "\" for a given category, but selecting multiple slices like this is not supported!"
153 << " If you want to make a plot of multiple slices, use the ProjWData() command where you pass a "
154 "dataset that includes "
155 "the desired slices. If the slices are a subset of all slices, then you can create such a dataset "
156 "with RooAbsData::reduce(RooFit::Cut(\"cat==cat::label_1 || cat==cat::label_2 || ...\")). You can "
157 "find some examples in the rf501_simultaneouspdf tutorial.";
158 oocoutE(nullptr, InputArguments) << errorMsg.str() << std::endl;
159 throw std::invalid_argument(errorMsg.str().c_str());
160 }
161 return RooCmdArg("SliceCat", 0, 0, 0, 0, label, nullptr, &cat, nullptr);
162}
163RooCmdArg Slice(std::map<RooCategory *, std::string> const &arg)
164{
165 return processMap("SliceCatMany", processSliceItem, arg);
166}
167
169{
170 RooCmdArg out{"Project", 0};
171 out.setSet(0, projSet);
172 return out;
173}
174RooCmdArg ProjWData(const RooArgSet &projSet, const RooAbsData &projData, bool binData)
175{
176 RooCmdArg out{"ProjData", binData, 0, 0, 0, nullptr, nullptr, nullptr, &projData};
177 out.setSet(0, projSet);
178 return out;
179}
180RooCmdArg ProjWData(const RooAbsData &projData, bool binData)
181{
182 return RooCmdArg("ProjData", binData, 0, 0, 0, nullptr, nullptr, nullptr, &projData);
183}
185{
186 return RooCmdArg("Asymmetry", 0, 0, 0, 0, nullptr, nullptr, &cat, nullptr);
187}
189{
190 return RooCmdArg("Precision", 0, 0, prec, 0, nullptr, nullptr, nullptr, nullptr);
191}
193{
194 return RooCmdArg("ShiftToZero", 1);
195}
196RooCmdArg Normalization(double scaleFactor)
197{
198 return RooCmdArg("Normalization", RooAbsReal::Relative, 0, scaleFactor, 0, nullptr, nullptr, nullptr, nullptr);
199}
200RooCmdArg Range(const char *rangeName, bool adjustNorm)
201{
202 return RooCmdArg("RangeWithName", adjustNorm, 0, 0, 0, rangeName, nullptr, nullptr, nullptr);
203}
204RooCmdArg Range(double lo, double hi, bool adjustNorm)
205{
206 return RooCmdArg("Range", adjustNorm, 0, lo, hi, nullptr, nullptr, nullptr, nullptr);
207}
208RooCmdArg NormRange(const char *rangeNameList)
209{
210 return RooCmdArg("NormRange", 0, 0, 0, 0, rangeNameList, nullptr, nullptr, nullptr);
211}
213{
214 return RooCmdArg("VLines", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
215}
217{
218 return RooCmdArg("LineColor", color);
219}
220
221/// The `color` string argument argument will be evaluated with the ROOT
222/// interpreter to get the actual ROOT color enum value, like `ROOT.kRed`.
223/// Here is what you can do with it:
224///
225/// 1. Pass a string with the enum value name instead, e.g.:
226/// ~~~ {.cxx}
227/// pdf.plotOn(frame, LineColor("kRed"))
228/// ~~~
229/// 2. Pass a string with the corresponding single-character color code following the matplotlib convention:
230/// ~~~ {.cxx}
231/// pdf.plotOn(frame, LineColor("r"))
232/// ~~~
233/// 3. Pass a string with the enum value name instead followed by some manipulation of the enum value:
234/// ~~~ {.cxx}
235/// pdf.plotOn(frame, LineColor("kRed+1"))
236/// ~~~
237RooCmdArg LineColor(std::string const &color)
238{
239 return LineColor(interpretColorString(color));
240}
242{
243 return RooCmdArg("LineStyle", style);
244}
245RooCmdArg LineStyle(std::string const &style)
246{
247 return LineStyle(interpretLineStyleString(style));
248}
250{
251 return RooCmdArg("LineWidth", width);
252}
254{
255 return RooCmdArg("FillColor", color);
256}
257RooCmdArg FillColor(std::string const &color)
258{
259 return RooCmdArg("FillColor", interpretColorString(color));
260}
262{
263 return RooCmdArg("FillStyle", style);
264}
265RooCmdArg FillStyle(std::string const &style)
266{
267 return FillStyle(interpretString(style));
268}
269RooCmdArg ProjectionRange(const char *rangeName)
270{
271 return RooCmdArg("ProjectionRange", 0, 0, 0, 0, rangeName, nullptr, nullptr, nullptr);
272}
273RooCmdArg Name(const char *name)
274{
275 return RooCmdArg("Name", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
276}
278{
279 return RooCmdArg("Invisible", inv, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
280}
281RooCmdArg AddTo(const char *name, double wgtSel, double wgtOther)
282{
283 return RooCmdArg("AddTo", 0, 0, wgtSel, wgtOther, name, nullptr, nullptr, nullptr);
284}
286{
287 return RooCmdArg("EvalErrorValue", 1, 0, val, 0, nullptr, nullptr, nullptr, nullptr);
288}
290{
291 return RooCmdArg("MoveToBack", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
292}
293RooCmdArg VisualizeError(const RooFitResult &fitres, double Z, bool EVmethod)
294{
295 return RooCmdArg("VisualizeError", EVmethod, 0, Z, 0, nullptr, nullptr, &fitres, nullptr);
296}
297RooCmdArg VisualizeError(const RooFitResult &fitres, const RooArgSet &param, double Z, bool EVmethod)
298{
299 return RooCmdArg("VisualizeError", EVmethod, 0, Z, 0, nullptr, nullptr, &fitres, nullptr, nullptr, nullptr, &param);
300}
301RooCmdArg VisualizeError(const RooDataSet &paramData, double Z)
302{
303 return RooCmdArg("VisualizeErrorData", 0, 0, Z, 0, nullptr, nullptr, &paramData, nullptr);
304}
306{
307 return RooCmdArg("ShowProgress", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
308}
309
310// RooAbsPdf::plotOn arguments
311RooCmdArg Components(const char *compSpec)
312{
313 return RooCmdArg("SelectCompSpec", 0, 0, 0, 0, compSpec, nullptr, nullptr, nullptr);
314}
315RooCmdArg Normalization(double scaleFactor, Int_t scaleType)
316{
317 return RooCmdArg("Normalization", scaleType, 0, scaleFactor, 0, nullptr, nullptr, nullptr, nullptr);
318}
319
320// RooAbsData::plotOn arguments
321RooCmdArg Cut(const char *cutSpec)
322{
323 return RooCmdArg("CutSpec", 0, 0, 0, 0, cutSpec, nullptr, nullptr, nullptr);
324}
326{
327 return RooCmdArg("CutVar", 0, 0, 0, 0, nullptr, nullptr, &cutVar, nullptr);
328}
330{
331 return RooCmdArg("Binning", 0, 0, 0, 0, nullptr, nullptr, &binning, nullptr);
332}
333RooCmdArg Binning(const char *binningName)
334{
335 return RooCmdArg("BinningName", 0, 0, 0, 0, binningName, nullptr, nullptr, nullptr);
336}
337RooCmdArg Binning(int nBins, double xlo, double xhi)
338{
339 return RooCmdArg("BinningSpec", nBins, 0, xlo, xhi, nullptr, nullptr, nullptr, nullptr);
340}
342{
343 return RooCmdArg("MarkerStyle", style, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
344}
345RooCmdArg MarkerStyle(std::string const &color)
346{
347 return MarkerStyle(interpretString(color));
348}
350{
351 return RooCmdArg("MarkerSize", 0, 0, size, 0, nullptr, nullptr, nullptr, nullptr);
352}
354{
355 return RooCmdArg("MarkerColor", color, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
356}
357RooCmdArg MarkerColor(std::string const &color)
358{
359 return MarkerColor(interpretColorString(color));
360}
361RooCmdArg CutRange(const char *rangeName)
362{
363 return RooCmdArg("CutRange", 0, 0, 0, 0, rangeName, nullptr, nullptr, nullptr);
364}
366{
367 return RooCmdArg("XErrorSize", 0, 0, width, 0, nullptr, nullptr, nullptr, nullptr);
368}
370{
371 return RooCmdArg("RefreshNorm", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
372}
374{
375 return RooCmdArg("Efficiency", 0, 0, 0, 0, nullptr, nullptr, &cat, nullptr);
376}
377RooCmdArg Rescale(double factor)
378{
379 return RooCmdArg("Rescale", 0, 0, factor, 0, nullptr, nullptr, nullptr, nullptr);
380}
381
382// RooDataHist::ctor arguments
383RooCmdArg Weight(double wgt)
384{
385 return RooCmdArg("Weight", 0, 0, wgt, 0, nullptr, nullptr, nullptr, nullptr);
386}
388{
389 return RooCmdArg("IndexCat", 0, 0, 0, 0, nullptr, nullptr, &icat, nullptr);
390}
391RooCmdArg Import(const char *state, TH1 &histo)
392{
393 return RooCmdArg("ImportDataSlice", 0, 0, 0, 0, state, nullptr, &histo, nullptr);
394}
395RooCmdArg Import(const char *state, RooDataHist &dhist)
396{
397 return RooCmdArg("ImportDataSlice", 0, 0, 0, 0, state, nullptr, &dhist, nullptr);
398}
399RooCmdArg Import(TH1 &histo, bool importDensity)
400{
401 return RooCmdArg("ImportHisto", importDensity, 0, 0, 0, nullptr, nullptr, &histo, nullptr);
402}
403
404RooCmdArg Import(const std::map<std::string, RooDataHist *> &arg)
405{
406 return processMap("ImportDataSliceMany", processImportItem<RooDataHist>, arg);
407}
408RooCmdArg Import(const std::map<std::string, TH1 *> &arg)
409{
410 return processMap("ImportDataSliceMany", processImportItem<TH1>, arg);
411}
412
413// RooDataSet::ctor arguments
414RooCmdArg WeightVar(const char *name, bool reinterpretAsWeight)
415{
416 if (name == nullptr)
417 return RooCmdArg::none(); // Passing a nullptr name means no weight variable
418 return RooCmdArg("WeightVarName", reinterpretAsWeight, 0, 0, 0, name, nullptr, nullptr, nullptr);
419}
420RooCmdArg WeightVar(const RooRealVar &arg, bool reinterpretAsWeight)
421{
422 return RooCmdArg("WeightVar", reinterpretAsWeight, 0, 0, 0, nullptr, nullptr, &arg, nullptr);
423}
424RooCmdArg Link(const char *state, RooAbsData &data)
425{
426 return RooCmdArg("LinkDataSlice", 0, 0, 0, 0, state, nullptr, &data, nullptr);
427}
428RooCmdArg Import(const char *state, RooAbsData &data)
429{
430 return RooCmdArg("ImportDataSlice", 0, 0, 0, 0, state, nullptr, &data, nullptr);
431}
433{
434 return RooCmdArg("ImportData", 0, 0, 0, 0, nullptr, nullptr, &data, nullptr);
435}
437{
438 return RooCmdArg("ImportTree", 0, 0, 0, 0, nullptr, nullptr, reinterpret_cast<TObject *>(&tree), nullptr);
439}
440RooCmdArg ImportFromFile(const char *fname, const char *tname)
441{
442 return RooCmdArg("ImportFromFile", 0, 0, 0, 0, fname, tname, nullptr, nullptr);
443}
445{
446 return RooCmdArg("StoreError", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &aset);
447}
449{
450 return RooCmdArg("StoreAsymError", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &aset);
451}
453{
454 return RooCmdArg("OwnLinked", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr);
455}
456
457RooCmdArg Import(const std::map<std::string, RooDataSet *> &arg)
458{
459 return processMap("ImportDataSliceMany", processImportItem<RooDataSet>, arg);
460}
461RooCmdArg Link(const std::map<std::string, RooAbsData *> &arg)
462{
463 return processMap("LinkDataSliceMany", processLinkItem<RooAbsData>, arg);
464}
465
466// RooChi2Var::ctor / RooNLLVar arguments
468{
469 return RooCmdArg("Extended", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
470}
472{
473 return RooCmdArg("DataError", etype);
474}
475RooCmdArg DataError(std::string const &etype)
476{
478}
479RooCmdArg NumCPU(Int_t nCPU, Int_t interleave)
480{
481 return RooCmdArg("NumCPU", nCPU, interleave, 0, 0, nullptr, nullptr, nullptr, nullptr);
482}
484{
485 return RooCmdArg("ModularL", flag, 0, 0, 0, nullptr, nullptr, nullptr);
486}
488{
489 return RooCmdArg("Parallelize", nWorkers, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
490}
492{
493 return RooCmdArg("TimingAnalysis", flag, 0, 0, 0, nullptr, nullptr, nullptr);
494}
495RooCmdArg BatchMode(std::string const &batchMode)
496{
497 oocoutW(nullptr, InputArguments)
498 << "The BatchMode() command argument is deprecated. Please use EvalBackend() instead." << std::endl;
499 std::string lower = batchMode;
500 std::transform(lower.begin(), lower.end(), lower.begin(), [](unsigned char c) { return std::tolower(c); });
501 if (lower == "off") {
502 return EvalBackend::Legacy();
503 } else if (lower == "cpu") {
504 return EvalBackend::Cpu();
505 } else if (lower == "cuda") {
506 return EvalBackend::Cuda();
507 }
508 throw std::runtime_error("Only supported string values for BatchMode() are \"off\", \"cpu\", or \"cuda\".");
509}
510/// Integrate the PDF over bins. Improves accuracy for binned fits. Switch off using `0.` as argument. \see
511/// RooAbsPdf::fitTo().
512RooCmdArg IntegrateBins(double precision)
513{
514 return RooCmdArg("IntegrateBins", 0, 0, precision);
515}
516
517// RooAbsCollection::printLatex arguments
519{
520 return RooCmdArg("Columns", ncol, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
521}
522RooCmdArg OutputFile(const char *fileName)
523{
524 return RooCmdArg("OutputFile", 0, 0, 0, 0, fileName, nullptr, nullptr, nullptr);
525}
527{
528 return RooCmdArg("Sibling", 0, 0, 0, 0, nullptr, nullptr, &sibling, nullptr);
529}
530RooCmdArg Format(const char *what, const RooCmdArg &arg1, const RooCmdArg &arg2, const RooCmdArg &arg3,
531 const RooCmdArg &arg4, const RooCmdArg &arg5, const RooCmdArg &arg6, const RooCmdArg &arg7,
532 const RooCmdArg &arg8)
533{
534 RooCmdArg ret("FormatArgs", 0, 0, 0, 0, what, nullptr, nullptr, nullptr);
535 ret.addArg(arg1);
536 ret.addArg(arg2);
537 ret.addArg(arg3);
538 ret.addArg(arg4);
539 ret.addArg(arg5);
540 ret.addArg(arg6);
541 ret.addArg(arg7);
542 ret.addArg(arg8);
543 ret.setProcessRecArgs(false);
544 return ret;
545}
546
547// RooAbsRealLValue::frame arguments
548RooCmdArg Title(const char *name)
549{
550 return RooCmdArg("Title", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
551}
553{
554 return RooCmdArg("Bins", nbin, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
555}
556RooCmdArg AutoSymRange(const RooAbsData &data, double marginFactor)
557{
558 return RooCmdArg("AutoRange", 1, 0, marginFactor, 0, nullptr, nullptr, &data, nullptr);
559}
560RooCmdArg AutoRange(const RooAbsData &data, double marginFactor)
561{
562 return RooCmdArg("AutoRange", 0, 0, marginFactor, 0, nullptr, nullptr, &data, nullptr);
563}
564
565// RooAbsData::reduce arguments
567{
568 RooCmdArg out{"SelectVars", 0};
569 out.setSet(0, vars);
570 return out;
571}
573{
574 return RooCmdArg("EventRange", nStart, nStop, 0, 0, nullptr, nullptr, nullptr, nullptr);
575}
576
577// RooAbsPdf::fitTo arguments
578
579EvalBackend::EvalBackend(EvalBackend::Value value) : RooCmdArg{"EvalBackend", static_cast<int>(value)} {}
580EvalBackend::EvalBackend(std::string const &name) : EvalBackend{toValue(name)} {}
582{
583 std::string lower = name;
584 std::transform(lower.begin(), lower.end(), lower.begin(), [](unsigned char c) { return std::tolower(c); });
585 if (lower == toName(Value::Legacy))
586 return Value::Legacy;
587 if (lower == toName(Value::Cpu))
588 return Value::Cpu;
589 if (lower == toName(Value::Cuda))
590 return Value::Cuda;
591 if (lower == toName(Value::Codegen))
592 return Value::Codegen;
593 if (lower == toName(Value::CodegenNoGrad))
595 throw std::runtime_error("Only supported string values for EvalBackend() are \"legacy\", \"cpu\", \"cuda\", "
596 "\"codegen\", or \"codegen_no_grad\".");
597}
599{
601}
603{
604 return EvalBackend(Value::Cpu);
605}
607{
608 return EvalBackend(Value::Cuda);
609}
611{
613}
615{
617}
618std::string EvalBackend::name() const
619{
620 return toName(value());
621}
623{
624 if (value == Value::Legacy)
625 return "legacy";
626 if (value == Value::Cpu)
627 return "cpu";
628 if (value == Value::Cuda)
629 return "cuda";
630 if (value == Value::Codegen)
631 return "codegen";
633 return "codegen_no_grad";
634 return "";
635}
637{
638 static Value value = Value::Cpu;
639 return value;
640}
641
643{
644 return RooCmdArg("Prefit", 0, 0, data_ratio, 0, nullptr, nullptr, nullptr, nullptr);
645}
647{
648 return RooCmdArg("Optimize", flag);
649}
651{
652 return RooCmdArg("Verbose", flag);
653}
654RooCmdArg Save(bool flag)
655{
656 return RooCmdArg("Save", flag);
657}
658RooCmdArg Timer(bool flag)
659{
660 return RooCmdArg("Timer", flag);
661}
663{
664 return RooCmdArg("PrintLevel", level);
665}
667{
668 return RooCmdArg("MaxCalls", n);
669}
671{
672 return RooCmdArg("Warnings", flag);
673}
675{
676 return RooCmdArg("Strategy", code);
677}
679{
680 return RooCmdArg("InitialHesse", flag);
681}
682RooCmdArg Hesse(bool flag)
683{
684 return RooCmdArg("Hesse", flag);
685}
686RooCmdArg Minos(bool flag)
687{
688 return RooCmdArg("Minos", flag);
689}
690RooCmdArg Minos(const RooArgSet &minosArgs)
691{
692 RooCmdArg out{"Minos", 1};
693 out.setSet(0, minosArgs);
694 return out;
695}
697{
698 return RooCmdArg("SplitRange", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
699}
700RooCmdArg SumCoefRange(const char *rangeName)
701{
702 return RooCmdArg("SumCoefRange", 0, 0, 0, 0, rangeName, nullptr, nullptr, nullptr);
703}
705{
706 for (RooAbsArg *param : params) {
707 if (!dynamic_cast<RooRealVar *>(param)) {
708 std::stringstream errorMsg;
709 errorMsg << "RooFit::Constrain(): you passed the argument \"" << param->GetName()
710 << "\", but it's not a RooRealVar!"
711 << " You can only constrain parameters, which must be RooRealVars.";
712 oocoutE(nullptr, InputArguments) << errorMsg.str() << std::endl;
713 throw std::invalid_argument(errorMsg.str().c_str());
714 }
715 }
716 return RooCmdArg("Constrain", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &params);
717}
718RooCmdArg GlobalObservablesSource(const char *sourceName)
719{
720 return {"GlobalObservablesSource", 0, 0, 0, 0, sourceName, nullptr, nullptr, nullptr};
721}
722RooCmdArg GlobalObservablesTag(const char *tagName)
723{
724 return RooCmdArg("GlobalObservablesTag", 0, 0, 0, 0, tagName, nullptr, nullptr, nullptr);
725}
727{
728 return RooCmdArg("ExternalConstraints", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &cpdfs);
729}
731{
732 return RooCmdArg("PrintEvalErrors", numErrors, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
733}
735{
736 return RooCmdArg("EvalErrorWall", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
737}
739{
740 return RooCmdArg("SumW2Error", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
741}
743{
744 return RooCmdArg("AsymptoticError", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
745}
747{
748 oocoutI(nullptr, InputArguments) << "The deprecated RooFit::CloneData(" << flag
749 << ") option passed to createNLL() is ignored." << std::endl;
750 return RooCmdArg("CloneData", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
751}
753{
754 return RooCmdArg("Integrate", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
755}
756RooCmdArg Minimizer(const char *type, const char *alg)
757{
758 return RooCmdArg("Minimizer", 0, 0, 0, 0, type, alg, nullptr, nullptr);
759}
760
761RooCmdArg Offset(std::string const &mode)
762{
763 std::string lower = mode;
764 std::transform(lower.begin(), lower.end(), lower.begin(), [](unsigned char c) { return std::tolower(c); });
766 if (lower == "none") {
767 modeVal = OffsetMode::None;
768 } else if (lower == "initial") {
769 modeVal = OffsetMode::Initial;
770 } else if (lower == "bin") {
771 modeVal = OffsetMode::Bin;
772 }
773 return RooCmdArg("OffsetLikelihood", static_cast<int>(modeVal));
774}
775
776/// When parameters are chosen such that a PDF is undefined, try to indicate to the minimiser how to leave this region.
777/// \param strength Strength of hints for minimiser. Set to zero to switch off.
779{
780 return RooCmdArg("RecoverFromUndefinedRegions", 0, 0, strength, 0, nullptr, nullptr, nullptr, nullptr);
781}
782
783// RooAbsPdf::paramOn arguments
784RooCmdArg Label(const char *str)
785{
786 return RooCmdArg("Label", 0, 0, 0, 0, str, nullptr, nullptr, nullptr);
787}
788RooCmdArg Layout(double xmin, double xmax, double ymin)
789{
790 return RooCmdArg("Layout", Int_t(ymin * 10000), 0, xmin, xmax, nullptr, nullptr, nullptr, nullptr);
791}
793{
794 RooCmdArg out{"Parameters", 0};
795 out.setSet(0, params);
796 return out;
797}
799{
800 return RooCmdArg("ShowConstants", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
801}
802
803// RooTreeData::statOn arguments
804RooCmdArg What(const char *str)
805{
806 return RooCmdArg("What", 0, 0, 0, 0, str, nullptr, nullptr, nullptr);
807}
808
809// RooProdPdf::ctor arguments
810RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, bool depsAreCond)
811{
812 return RooCmdArg("Conditional", depsAreCond, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &pdfSet,
813 &depSet);
814};
815
816// RooAbsPdf::generate arguments
817RooCmdArg ProtoData(const RooDataSet &protoData, bool randomizeOrder, bool resample)
818{
819 return RooCmdArg("PrototypeData", randomizeOrder, resample, 0, 0, nullptr, nullptr, &protoData, nullptr);
820}
822{
823 return RooCmdArg("NumEvents", numEvents, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
824}
825RooCmdArg NumEvents(double numEvents)
826{
827 return RooCmdArg("NumEventsD", 0, 0, numEvents, 0, nullptr, nullptr, nullptr, nullptr);
828}
830{
831 return RooCmdArg("ExpectedData", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
832}
834{
835 return ExpectedData(flag);
836}
838{
839 return RooCmdArg("AutoBinned", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
840}
841RooCmdArg GenBinned(const char *tag)
842{
843 return RooCmdArg("GenBinned", 0, 0, 0, 0, tag, nullptr, nullptr, nullptr);
844}
846{
847 return RooCmdArg("GenBinned", 0, 0, 0, 0, "*", nullptr, nullptr, nullptr);
848}
849
850// RooAbsRealLValue::createHistogram arguments
852{
853 return RooCmdArg("YVar", 0, 0, 0, 0, nullptr, nullptr, &var, nullptr, &arg);
854}
856{
857 return RooCmdArg("ZVar", 0, 0, 0, 0, nullptr, nullptr, &var, nullptr, &arg);
858}
860{
861 return RooCmdArg("AxisLabel", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
862}
864{
865 return RooCmdArg("Scaling", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
866}
867
868// RooAbsReal::createHistogram arguments
870{
871 return RooCmdArg("IntrinsicBinning", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
872}
873
874// RooAbsData::createHistogram arguments
875RooCmdArg AutoSymBinning(Int_t nbins, double marginFactor)
876{
877 return RooCmdArg("AutoRangeData", 1, nbins, marginFactor, 0, nullptr, nullptr, nullptr, nullptr);
878}
879RooCmdArg AutoBinning(Int_t nbins, double marginFactor)
880{
881 return RooCmdArg("AutoRangeData", 0, nbins, marginFactor, 0, nullptr, nullptr, nullptr, nullptr);
882}
883
884// RooAbsReal::fillHistogram arguments
886{
887 return RooCmdArg("IntObs", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &intObs, nullptr);
888};
889
890// RooAbsReal::createIntegral arguments
892{
893 return RooCmdArg("NumIntConfig", 0, 0, 0, 0, nullptr, nullptr, &cfg, nullptr);
894}
895
896// RooMCStudy::ctor arguments
898{
899 return RooCmdArg("Silence", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
900}
902{
903 return RooCmdArg("FitModel", 0, 0, 0, 0, nullptr, nullptr, &pdf, nullptr);
904}
905RooCmdArg FitOptions(const RooCmdArg &arg1, const RooCmdArg &arg2, const RooCmdArg &arg3, const RooCmdArg &arg4,
906 const RooCmdArg &arg5, const RooCmdArg &arg6)
907{
908 RooCmdArg ret("FitOptArgs", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
909 ret.addArg(arg1);
910 ret.addArg(arg2);
911 ret.addArg(arg3);
912 ret.addArg(arg4);
913 ret.addArg(arg5);
914 ret.addArg(arg6);
915 ret.setProcessRecArgs(false);
916 return ret;
917}
919{
920 return RooCmdArg("Binned", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
921}
923{
924 return RooCmdArg("BootStrapData", 0, 0, 0, 0, nullptr, nullptr, &dset, nullptr);
925}
926
927// RooMCStudy::plot* arguments
928RooCmdArg Frame(const RooCmdArg &arg1, const RooCmdArg &arg2, const RooCmdArg &arg3, const RooCmdArg &arg4,
929 const RooCmdArg &arg5, const RooCmdArg &arg6)
930{
931 RooCmdArg ret("FrameArgs", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
932 ret.addArg(arg1);
933 ret.addArg(arg2);
934 ret.addArg(arg3);
935 ret.addArg(arg4);
936 ret.addArg(arg5);
937 ret.addArg(arg6);
938 ret.setProcessRecArgs(false);
939 return ret;
940}
942{
943 return RooCmdArg("Bins", nbins, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
944}
945RooCmdArg FrameRange(double xlo, double xhi)
946{
947 return RooCmdArg("Range", 0, 0, xlo, xhi, nullptr, nullptr, nullptr, nullptr);
948}
950{
951 return RooCmdArg("FitGauss", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
952}
953
954// RooRealVar::format arguments
956{
957 return RooCmdArg("ShowName", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
958}
960{
961 return RooCmdArg("ShowValue", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
962}
964{
965 return RooCmdArg("ShowError", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
966}
968{
969 return RooCmdArg("ShowAsymError", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
970}
972{
973 return RooCmdArg("ShowUnit", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
974}
976{
977 return RooCmdArg("AutoPrecision", ndigit, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
978}
980{
981 return RooCmdArg("FixedPrecision", ndigit, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
982}
984{
985 return RooCmdArg("TLatexStyle", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
986}
988{
989 return RooCmdArg("LatexStyle", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
990}
992{
993 return RooCmdArg("LatexTableStyle", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
994}
996{
997 return RooCmdArg("VerbatimName", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
998}
999
1000// RooMsgService::addReportingStream arguments
1002{
1003 return RooCmdArg("Topic", topic, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1004}
1006{
1007 return RooCmdArg("ObjectName", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
1008}
1010{
1011 return RooCmdArg("ClassName", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
1012}
1014{
1015 return RooCmdArg("BaseClassName", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
1016}
1018{
1019 return RooCmdArg("LabelName", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
1020}
1021RooCmdArg OutputStream(std::ostream &os)
1022{
1023 return RooCmdArg("OutputStream", 0, 0, 0, 0, nullptr, nullptr, new RooHelpers::WrapIntoTObject<std::ostream>(os),
1024 nullptr);
1025}
1027{
1028 return RooCmdArg("Prefix", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1029}
1031{
1032 return RooCmdArg("Color", color, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1033}
1034
1035// RooWorkspace::import() arguments
1036RooCmdArg RenameConflictNodes(const char *suffix, bool ro)
1037{
1038 return RooCmdArg("RenameConflictNodes", ro, 0, 0, 0, suffix, nullptr, nullptr, nullptr);
1039}
1041{
1042 return RooCmdArg("RecycleConflictNodes", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1043}
1044RooCmdArg RenameAllNodes(const char *suffix)
1045{
1046 return RooCmdArg("RenameAllNodes", 0, 0, 0, 0, suffix, nullptr, nullptr, nullptr);
1047}
1049{
1050 return RooCmdArg("RenameAllVariables", 0, 0, 0, 0, suffix, nullptr, nullptr, nullptr);
1051}
1052RooCmdArg RenameAllVariablesExcept(const char *suffix, const char *except)
1053{
1054 return RooCmdArg("RenameAllVariables", 0, 0, 0, 0, suffix, except, nullptr, nullptr);
1055}
1056RooCmdArg RenameVariable(const char *in, const char *out)
1057{
1058 return RooCmdArg("RenameVar", 0, 0, 0, 0, in, out, nullptr, nullptr);
1059}
1060RooCmdArg Rename(const char *suffix)
1061{
1062 return RooCmdArg("Rename", 0, 0, 0, 0, suffix, nullptr, nullptr, nullptr);
1063}
1065{
1066 return RooCmdArg("Embedded", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1067}
1069{
1070 return RooCmdArg("NoRecursion", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1071}
1072
1073// RooSimCloneTool::build() arguments
1074RooCmdArg SplitParam(const char *varname, const char *catname)
1075{
1076 return RooCmdArg("SplitParam", 0, 0, 0, 0, varname, catname, nullptr, nullptr);
1077}
1079{
1080 return RooCmdArg("SplitParam", 0, 0, 0, 0, var.GetName(), cat.GetName(), nullptr, nullptr);
1081}
1082RooCmdArg SplitParamConstrained(const char *varname, const char *catname, const char *rsname)
1083{
1084 return RooCmdArg("SplitParamConstrained", 0, 0, 0, 0, varname, catname, nullptr, nullptr, nullptr, rsname);
1085}
1086RooCmdArg SplitParamConstrained(const RooRealVar &var, const RooAbsCategory &cat, const char *rsname)
1087{
1088 return RooCmdArg("SplitParamConstrained", 0, 0, 0, 0, var.GetName(), cat.GetName(), nullptr, nullptr, nullptr,
1089 rsname);
1090}
1091RooCmdArg Restrict(const char *catName, const char *stateNameList)
1092{
1093 return RooCmdArg("Restrict", 0, 0, 0, 0, catName, stateNameList, nullptr, nullptr);
1094}
1095
1096// RooAbsPdf::createCdf() arguments
1098{
1099 RooCmdArg out{"SupNormSet", 0};
1100 out.setSet(0, nset);
1101 return out;
1102}
1104{
1105 return RooCmdArg("ScanParameters", nbins, intOrder, 0, 0, nullptr, nullptr, nullptr, nullptr);
1106}
1108{
1109 return RooCmdArg("ScanNumCdf", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1110}
1112{
1113 return RooCmdArg("ScanAllCdf", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1114}
1116{
1117 return RooCmdArg("ScanNoCdf", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1118}
1119
1120RooCmdArg MultiArg(const RooCmdArg &arg1, const RooCmdArg &arg2, const RooCmdArg &arg3, const RooCmdArg &arg4,
1121 const RooCmdArg &arg5, const RooCmdArg &arg6, const RooCmdArg &arg7, const RooCmdArg &arg8)
1122{
1123 RooCmdArg ret("MultiArg", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1124 ret.addArg(arg1);
1125 ret.addArg(arg2);
1126 ret.addArg(arg3);
1127 ret.addArg(arg4);
1128 ret.addArg(arg5);
1129 ret.addArg(arg6);
1130 ret.addArg(arg7);
1131 ret.addArg(arg8);
1132 ret.setProcessRecArgs(true, false);
1133 return ret;
1134}
1135
1137{
1138 return RooRealConstant::value(val);
1139}
1140
1141namespace Detail {
1142
1144{
1145 return processFlatMap("SliceCatMany", processSliceItem, args);
1146}
1148{
1149 return processFlatMap("ImportDataSliceMany", processImportItem<RooDataHist>, args);
1150}
1152{
1153 return processFlatMap("ImportDataSliceMany", processImportItem<TH1>, args);
1154}
1156{
1157 return processFlatMap("ImportDataSliceMany", processImportItem<RooDataSet>, args);
1158}
1160{
1161 return processFlatMap("LinkDataSliceMany", processLinkItem<RooAbsData>, args);
1162}
1163
1164} // namespace Detail
1165
1166} // namespace RooFit
1167
1168namespace RooFitShortHand {
1169
1171{
1172 return RooFit::RooConst(value);
1173}
1174
1175} // namespace RooFitShortHand
#define c(i)
Definition RSha256.hxx:101
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define oocoutW(o, a)
#define oocoutE(o, a)
#define oocoutI(o, a)
short Style_t
Definition RtypesCore.h:82
int Int_t
Definition RtypesCore.h:45
short Color_t
Definition RtypesCore.h:85
float Size_t
Definition RtypesCore.h:89
short Width_t
Definition RtypesCore.h:84
@ kRed
Definition Rtypes.h:66
@ kBlack
Definition Rtypes.h:65
@ kGreen
Definition Rtypes.h:66
@ kMagenta
Definition Rtypes.h:66
@ kWhite
Definition Rtypes.h:65
@ kCyan
Definition Rtypes.h:66
@ kBlue
Definition Rtypes.h:66
@ kYellow
Definition Rtypes.h:66
@ kDashed
Definition TAttLine.h:48
@ kSolid
Definition TAttLine.h:48
@ kDashDotted
Definition TAttLine.h:48
@ kDotted
Definition TAttLine.h:48
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 value
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t width
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 Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t style
char name[80]
Definition TGX11.cxx:110
float xmin
#define hi
float ymin
float xmax
#define gInterpreter
void(* Func_t)()
Definition TSystem.h:239
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Definition RooAbsArg.h:77
Abstract base class for RooRealVar binning definitions.
A space to attach TBranches.
Abstract container object that can hold multiple RooAbsArg objects.
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:57
static ErrorType errorTypeFromString(std::string const &name)
Convert a string to the value of the RooAbsData::ErrorType enum with the same name.
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:40
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
Object to represent discrete states.
Definition RooCategory.h:28
Named container for two doubles, two integers two object points and three string pointers that can be...
Definition RooCmdArg.h:26
void addArg(const RooCmdArg &arg)
Utility function to add nested RooCmdArg to payload of this RooCmdArg.
static const RooCmdArg & none()
Return reference to null argument.
Definition RooCmdArg.cxx:52
void setProcessRecArgs(bool flag, bool prefix=true)
Definition RooCmdArg.h:46
Represents a constant real-valued object.
Definition RooConstVar.h:23
Container class to hold N-dimensional binned data.
Definition RooDataHist.h:40
Container class to hold unbinned data.
Definition RooDataSet.h:34
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
static Value & defaultValue()
static EvalBackend Cuda()
static EvalBackend Codegen()
static EvalBackend CodegenNoGrad()
EvalBackend(Value value)
static EvalBackend Legacy()
std::string name() const
Value value() const
static EvalBackend Cpu()
static Value toValue(std::string const &name)
static std::string toName(Value value)
A RooFormulaVar is a generic implementation of a real-valued object, which takes a RooArgList of serv...
Holds the configuration parameters of the various numeric integrators used by RooRealIntegral.
static RooConstVar & value(double value)
Return a constant value object with given value.
Variable that can be changed from the outside.
Definition RooRealVar.h:37
static Int_t GetColorByName(const char *colorname)
Static method returning color index for a color specified by name.
Definition TColor.cxx:2074
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:59
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
Mother of all ROOT objects.
Definition TObject.h:41
A TTree represents a columnar dataset.
Definition TTree.h:79
RooCmdArg RecycleConflictNodes(bool flag=true)
RooCmdArg ScanNoCdf()
RooCmdArg AutoRange(const RooAbsData &data, double marginFactor=0.1)
RooCmdArg FitGauss(bool flag=true)
RooCmdArg FrameBins(Int_t nbins)
RooCmdArg ClassName(const char *name)
RooCmdArg FitModel(RooAbsPdf &pdf)
RooCmdArg LatexStyle(bool flag=true)
RooCmdArg VerbatimName(bool flag=true)
RooCmdArg IntegratedObservables(const RooArgSet &intObs)
RooCmdArg OutputStream(std::ostream &os)
RooCmdArg Topic(Int_t topic)
RooCmdArg Parameters(const RooArgSet &params)
RooCmdArg NumIntConfig(const RooNumIntConfig &cfg)
RooCmdArg ScanParameters(Int_t nbins, Int_t intOrder)
RooCmdArg Label(const char *str)
RooCmdArg TagName(const char *name)
RooCmdArg MultiArg(const RooCmdArg &arg1, const RooCmdArg &arg2, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
RooCmdArg BaseClassName(const char *name)
RooCmdArg FitOptions(const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={})
RooCmdArg IntrinsicBinning(bool flag=true)
RooCmdArg Restrict(const char *catName, const char *stateNameList)
RooCmdArg TLatexStyle(bool flag=true)
RooCmdArg RenameAllVariables(const char *suffix)
RooCmdArg ShowConstants(bool flag=true)
RooCmdArg RenameVariable(const char *inputName, const char *outputName)
RooCmdArg Color(Color_t color)
RooCmdArg FixedPrecision(Int_t ndigit=2)
RooCmdArg AutoPrecision(Int_t ndigit=2)
RooCmdArg Title(const char *name)
RooCmdArg RenameAllNodes(const char *suffix)
RooCmdArg ZVar(const RooAbsRealLValue &var, const RooCmdArg &arg={})
RooCmdArg SplitParam(const char *varname, const char *catname)
RooCmdArg Rename(const char *suffix)
RooCmdArg SupNormSet(const RooArgSet &nset)
RooCmdArg SelectVars(const RooArgSet &vars)
RooCmdArg AutoBinning(Int_t nbins=100, double marginFactor=0.1)
RooCmdArg Frame(const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={})
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg={})
RooCmdArg FrameRange(double xlo, double xhi)
RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, bool depsAreCond=false)
RooCmdArg LatexTableStyle(bool flag=true)
RooCmdArg RenameAllVariablesExcept(const char *suffix, const char *exceptionList)
RooCmdArg Scaling(bool flag)
RooConstVar & RooConst(double val)
RooCmdArg Columns(Int_t ncol)
RooCmdArg EventRange(Int_t nStart, Int_t nStop)
RooCmdArg ScanAllCdf()
RooCmdArg ObjectName(const char *name)
RooCmdArg Format(const char *what, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
RooCmdArg Silence(bool flag=true)
RooCmdArg NoRecursion(bool flag=true)
RooCmdArg AxisLabel(const char *name)
RooCmdArg Sibling(const RooAbsCollection &sibling)
RooCmdArg Binned(bool flag=true)
RooCmdArg SplitParamConstrained(const char *varname, const char *catname, const char *rsname)
RooCmdArg What(const char *str)
RooCmdArg RenameConflictNodes(const char *suffix, bool renameOrigNodes=false)
RooCmdArg AutoSymRange(const RooAbsData &data, double marginFactor=0.1)
RooCmdArg ScanNumCdf()
RooCmdArg Bins(Int_t nbin)
RooCmdArg Embedded(bool flag=true)
RooCmdArg OutputFile(const char *fileName)
RooCmdArg AutoSymBinning(Int_t nbins=100, double marginFactor=0.1)
RooCmdArg Layout(double xmin, double xmax=0.99, double ymin=0.95)
RooCmdArg OwnLinked()
RooCmdArg ImportFromFile(const char *fname, const char *tname)
RooCmdArg StoreAsymError(const RooArgSet &aset)
RooCmdArg Weight(double wgt)
RooCmdArg Index(RooCategory &icat)
RooCmdArg StoreError(const RooArgSet &aset)
RooCmdArg Link(const char *state, RooAbsData &data)
RooCmdArg WeightVar(const char *name="weight", bool reinterpretAsWeight=false)
RooCmdArg Import(const char *state, TH1 &histo)
RooCmdArg InitialHesse(bool flag=true)
RooCmdArg IntegrateBins(double precision)
Integrate the PDF over bins.
RooCmdArg MaxCalls(int n)
RooCmdArg SplitRange(bool flag=true)
RooCmdArg AsymptoticError(bool flag)
RooCmdArg PrefitDataFraction(double data_ratio=0.0)
RooCmdArg Offset(std::string const &mode)
RooCmdArg Constrain(const RooArgSet &params)
RooCmdArg GlobalObservablesTag(const char *tagName)
RooCmdArg Minimizer(const char *type, const char *alg=nullptr)
RooCmdArg Hesse(bool flag=true)
RooCmdArg Strategy(Int_t code)
RooCmdArg Save(bool flag=true)
RooCmdArg Integrate(bool flag)
RooCmdArg SumW2Error(bool flag)
RooCmdArg GlobalObservablesSource(const char *sourceName)
RooCmdArg SumCoefRange(const char *rangeName)
RooCmdArg PrintEvalErrors(Int_t numErrors)
RooCmdArg Optimize(Int_t flag=2)
RooCmdArg Parallelize(int nWorkers)
RooCmdArg EvalErrorWall(bool flag)
RooCmdArg Warnings(bool flag=true)
RooCmdArg ExternalConstraints(const RooArgSet &constraintPdfs)
RooCmdArg Minos(bool flag=true)
RooCmdArg ModularL(bool flag=false)
RooCmdArg TimingAnalysis(bool timingAnalysis)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg NumCPU(Int_t nCPU, Int_t interleave=0)
RooCmdArg DataError(Int_t)
RooCmdArg CloneData(bool flag)
RooCmdArg RecoverFromUndefinedRegions(double strength)
When parameters are chosen such that a PDF is undefined, try to indicate to the minimiser how to leav...
RooCmdArg Verbose(bool flag=true)
RooCmdArg Extended(bool flag=true)
RooCmdArg ProtoData(const RooDataSet &protoData, bool randomizeOrder=false, bool resample=false)
RooCmdArg AllBinned()
RooCmdArg AutoBinned(bool flag=true)
RooCmdArg Asimov(bool flag=true)
RooCmdArg NumEvents(Int_t numEvents)
RooCmdArg GenBinned(const char *tag)
RooCmdArg ExpectedData(bool flag=true)
RooCmdArg RefreshNorm()
RooCmdArg Components(Args_t &&... argsOrArgSet)
RooCmdArg ProjectionRange(const char *rangeName)
RooCmdArg MarkerColor(Color_t color)
RooCmdArg Binning(const RooAbsBinning &binning)
RooCmdArg ProjWData(const RooAbsData &projData, bool binData=false)
RooCmdArg Precision(double prec)
RooCmdArg EvalErrorValue(double value)
RooCmdArg NormRange(const char *rangeNameList)
RooCmdArg ShowProgress()
RooCmdArg DrawOption(const char *opt)
RooCmdArg Project(const RooArgSet &projSet)
RooCmdArg FillStyle(Style_t style)
RooCmdArg Range(const char *rangeName, bool adjustNorm=true)
RooCmdArg FillColor(Color_t color)
RooCmdArg Invisible(bool inv=true)
RooCmdArg MarkerStyle(Style_t style)
RooCmdArg LineWidth(Width_t width)
RooCmdArg Normalization(double scaleFactor)
RooCmdArg VisualizeError(const RooDataSet &paramData, double Z=1)
RooCmdArg ShiftToZero()
RooCmdArg Slice(const RooArgSet &sliceSet)
RooCmdArg AddTo(const char *name, double wgtSel=1.0, double wgtOther=1.0)
RooCmdArg CutRange(const char *rangeName)
RooCmdArg XErrorSize(double width)
RooCmdArg MoveToBack()
RooCmdArg MarkerSize(Size_t size)
RooCmdArg Rescale(double factor)
RooCmdArg Cut(const char *cutSpec)
RooCmdArg LineColor(Color_t color)
RooCmdArg Efficiency(const RooCategory &cat)
RooCmdArg Name(const char *name)
RooCmdArg LineStyle(Style_t style)
RooCmdArg VLines()
RooCmdArg Asymmetry(const RooCategory &cat)
auto Map(Args &&... args)
Create new collection applying a callable to the elements of the input collection.
Definition RVec.hxx:2150
const Int_t n
Definition legend1.C:16
RooConstVar & C(double value)
RooCmdArg LinkFlatMap(FlatMap< std::string, RooAbsData * > const &args)
RooCmdArg ImportFlatMap(FlatMap< std::string, RooDataHist * > const &args)
RooCmdArg SliceFlatMap(FlatMap< RooCategory *, std::string > const &args)
RooCmdArg ParallelGradientOptions(bool enable=true, int orderStrategy=0, int chainFactor=1)
Configuration options for parallel minimization with multiprocessing library.
RooCmdArg ParallelDescentOptions(bool enable=false, int splitStrategy=0, int numSplits=4)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Definition CodegenImpl.h:64
RooCmdArg BootStrapData(const RooDataSet &dset)
RooCmdArg ShowName(bool flag)
RooCmdArg ShowError(bool flag)
RooCmdArg BatchMode(std::string const &batchMode)
OffsetMode
For setting the offset mode with the Offset() command argument to RooAbsPdf::fitTo()
@ InputArguments
RooCmdArg ShowValue(bool flag)
RooCmdArg ShowAsymError(bool flag)
RooCmdArg ShowUnit(bool flag)
void inv(rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition rsaaux.cxx:949
static const char * what
Definition stlLoader.cc:5
Wrap an object into a TObject. Sometimes needed to avoid reinterpret_cast or enable RTTI.
Definition RooHelpers.h:57
static int Prefix[4096]
Definition gifdecode.c:12