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 "RooCategory.h"
22#include "RooRealConstant.h"
23#include "RooDataSet.h"
24#include "RooDataHist.h"
25#include "RooNumIntConfig.h"
26#include "RooRealVar.h"
27#include "RooFitResult.h"
28#include "RooAbsPdf.h"
29#include "RooFormulaVar.h"
30#include "RooHelpers.h"
31#include "RooMsgService.h"
32#include "TH1.h"
33
34#include <algorithm>
35
36using namespace std;
37
38namespace RooFit {
39
40// anonymous namespace for helper functions for the implementation of the global functions
41namespace {
42
43template <class T>
44RooCmdArg processImportItem(std::pair<std::string const, T *> const &item)
45{
46 return Import(item.first.c_str(), *item.second);
47}
48
49template <class T>
50RooCmdArg processLinkItem(std::pair<std::string const, T *> const &item)
51{
52 return Link(item.first.c_str(), *item.second);
53}
54
55RooCmdArg processSliceItem(std::pair<RooCategory *const, std::string> const &item)
56{
57 return Slice(*item.first, item.second.c_str());
58}
59
60template <class Map_t, class Func_t>
61RooCmdArg processMap(const char *name, Func_t func, Map_t const &map)
62{
63 RooCmdArg container(name, 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
64 for (auto const &item : map) {
65 container.addArg(func(item));
66 }
67 container.setProcessRecArgs(true, false);
68 return container;
69}
70
71} // namespace
72
73namespace Experimental {
74
75RooCmdArg ParallelGradientOptions(bool enable, int orderStrategy, int chainFactor)
76{
77 return RooCmdArg("ParallelGradientOptions", enable, chainFactor, orderStrategy, 0, nullptr, nullptr, nullptr,
78 nullptr);
79}
80RooCmdArg ParallelDescentOptions(bool enable, int splitStrategy, int numSplits)
81{
82 return RooCmdArg("ParallelDescentOptions", enable, numSplits, splitStrategy, 0, nullptr, nullptr, nullptr, nullptr);
83}
84
85} // namespace Experimental
86
87// RooAbsReal::plotOn arguments
88RooCmdArg DrawOption(const char *opt)
89{
90 return RooCmdArg("DrawOption", 0, 0, 0, 0, opt, nullptr, nullptr, nullptr);
91}
92RooCmdArg Slice(const RooArgSet &sliceSet)
93{
94 RooCmdArg out{"SliceVars", 0};
95 out.setSet(0, sliceSet);
96 return out;
97}
98RooCmdArg Slice(RooCategory &cat, const char *label)
99{
100 // We don't support adding multiple slices for a single category by
101 // concatenating labels with a comma. Users were trying to do that, and were
102 // surprised it did not work. So we explicitly check if there is a comma,
103 // and if there is, we will give some helpful advice on how to get to the
104 // desired plot.
105 std::string lbl{label};
106 if (lbl.find(',') != std::string::npos) {
107 std::stringstream errorMsg;
108 errorMsg << "RooFit::Slice(): you tried to pass a comma-separated list of state labels \"" << label
109 << "\" for a given category, but selecting multiple slices like this is not supported!"
110 << " If you want to make a plot of multiple slices, use the ProjWData() command where you pass a "
111 "dataset that includes "
112 "the desired slices. If the slices are a subset of all slices, then you can create such a dataset "
113 "with RooAbsData::reduce(RooFit::Cut(\"cat==cat::label_1 || cat==cat::label_2 || ...\")). You can "
114 "find some examples in the rf501_simultaneouspdf tutorial.";
115 oocoutE(nullptr, InputArguments) << errorMsg.str() << std::endl;
116 throw std::invalid_argument(errorMsg.str().c_str());
117 }
118 return RooCmdArg("SliceCat", 0, 0, 0, 0, label, nullptr, &cat, nullptr);
119}
120RooCmdArg Slice(std::map<RooCategory *, std::string> const &arg)
121{
122 return processMap("SliceCatMany", processSliceItem, arg);
123}
124
126{
127 RooCmdArg out{"Project", 0};
128 out.setSet(0, projSet);
129 return out;
130}
131RooCmdArg ProjWData(const RooArgSet &projSet, const RooAbsData &projData, bool binData)
132{
133 RooCmdArg out{"ProjData", binData, 0, 0, 0, nullptr, nullptr, nullptr, &projData};
134 out.setSet(0, projSet);
135 return out;
136}
137RooCmdArg ProjWData(const RooAbsData &projData, bool binData)
138{
139 return RooCmdArg("ProjData", binData, 0, 0, 0, nullptr, nullptr, nullptr, &projData);
140}
142{
143 return RooCmdArg("Asymmetry", 0, 0, 0, 0, nullptr, nullptr, &cat, nullptr);
144}
146{
147 return RooCmdArg("Precision", 0, 0, prec, 0, nullptr, nullptr, nullptr, nullptr);
148}
150{
151 return RooCmdArg("ShiftToZero", 1);
152}
153RooCmdArg Normalization(double scaleFactor)
154{
155 return RooCmdArg("Normalization", RooAbsReal::Relative, 0, scaleFactor, 0, nullptr, nullptr, nullptr, nullptr);
156}
157RooCmdArg Range(const char *rangeName, bool adjustNorm)
158{
159 return RooCmdArg("RangeWithName", adjustNorm, 0, 0, 0, rangeName, nullptr, nullptr, nullptr);
160}
161RooCmdArg Range(double lo, double hi, bool adjustNorm)
162{
163 return RooCmdArg("Range", adjustNorm, 0, lo, hi, nullptr, nullptr, nullptr, nullptr);
164}
165RooCmdArg NormRange(const char *rangeNameList)
166{
167 return RooCmdArg("NormRange", 0, 0, 0, 0, rangeNameList, nullptr, nullptr, nullptr);
168}
170{
171 return RooCmdArg("VLines", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
172}
174{
175 return RooCmdArg("LineColor", color);
176}
178{
179 return RooCmdArg("LineStyle", style);
180}
182{
183 return RooCmdArg("LineWidth", width);
184}
186{
187 return RooCmdArg("FillColor", color);
188}
190{
191 return RooCmdArg("FillStyle", style);
192}
193RooCmdArg ProjectionRange(const char *rangeName)
194{
195 return RooCmdArg("ProjectionRange", 0, 0, 0, 0, rangeName, nullptr, nullptr, nullptr);
196}
197RooCmdArg Name(const char *name)
198{
199 return RooCmdArg("Name", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
200}
202{
203 return RooCmdArg("Invisible", inv, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
204}
205RooCmdArg AddTo(const char *name, double wgtSel, double wgtOther)
206{
207 return RooCmdArg("AddTo", 0, 0, wgtSel, wgtOther, name, nullptr, nullptr, nullptr);
208}
210{
211 return RooCmdArg("EvalErrorValue", 1, 0, val, 0, nullptr, nullptr, nullptr, nullptr);
212}
214{
215 return RooCmdArg("MoveToBack", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
216}
217RooCmdArg VisualizeError(const RooFitResult &fitres, double Z, bool EVmethod)
218{
219 return RooCmdArg("VisualizeError", EVmethod, 0, Z, 0, nullptr, nullptr, &fitres, nullptr);
220}
221RooCmdArg VisualizeError(const RooFitResult &fitres, const RooArgSet &param, double Z, bool EVmethod)
222{
223 return RooCmdArg("VisualizeError", EVmethod, 0, Z, 0, nullptr, nullptr, &fitres, nullptr, nullptr, nullptr, &param);
224}
225RooCmdArg VisualizeError(const RooDataSet &paramData, double Z)
226{
227 return RooCmdArg("VisualizeErrorData", 0, 0, Z, 0, nullptr, nullptr, &paramData, nullptr);
228}
230{
231 return RooCmdArg("ShowProgress", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
232}
233
234// RooAbsPdf::plotOn arguments
235RooCmdArg Components(const char *compSpec)
236{
237 return RooCmdArg("SelectCompSpec", 0, 0, 0, 0, compSpec, nullptr, nullptr, nullptr);
238}
239RooCmdArg Normalization(double scaleFactor, Int_t scaleType)
240{
241 return RooCmdArg("Normalization", scaleType, 0, scaleFactor, 0, nullptr, nullptr, nullptr, nullptr);
242}
243
244// RooAbsData::plotOn arguments
245RooCmdArg Cut(const char *cutSpec)
246{
247 return RooCmdArg("CutSpec", 0, 0, 0, 0, cutSpec, nullptr, nullptr, nullptr);
248}
250{
251 return RooCmdArg("CutVar", 0, 0, 0, 0, nullptr, nullptr, &cutVar, nullptr);
252}
254{
255 return RooCmdArg("Binning", 0, 0, 0, 0, nullptr, nullptr, &binning, nullptr);
256}
257RooCmdArg Binning(const char *binningName)
258{
259 return RooCmdArg("BinningName", 0, 0, 0, 0, binningName, nullptr, nullptr, nullptr);
260}
261RooCmdArg Binning(int nBins, double xlo, double xhi)
262{
263 return RooCmdArg("BinningSpec", nBins, 0, xlo, xhi, nullptr, nullptr, nullptr, nullptr);
264}
266{
267 return RooCmdArg("MarkerStyle", style, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
268}
270{
271 return RooCmdArg("MarkerSize", 0, 0, size, 0, nullptr, nullptr, nullptr, nullptr);
272}
274{
275 return RooCmdArg("MarkerColor", color, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
276}
277RooCmdArg CutRange(const char *rangeName)
278{
279 return RooCmdArg("CutRange", 0, 0, 0, 0, rangeName, nullptr, nullptr, nullptr);
280}
282{
283 return RooCmdArg("XErrorSize", 0, 0, width, 0, nullptr, nullptr, nullptr, nullptr);
284}
286{
287 return RooCmdArg("RefreshNorm", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
288}
290{
291 return RooCmdArg("Efficiency", 0, 0, 0, 0, nullptr, nullptr, &cat, nullptr);
292}
293RooCmdArg Rescale(double factor)
294{
295 return RooCmdArg("Rescale", 0, 0, factor, 0, nullptr, nullptr, nullptr, nullptr);
296}
297
298// RooDataHist::ctor arguments
299RooCmdArg Weight(double wgt)
300{
301 return RooCmdArg("Weight", 0, 0, wgt, 0, nullptr, nullptr, nullptr, nullptr);
302}
304{
305 return RooCmdArg("IndexCat", 0, 0, 0, 0, nullptr, nullptr, &icat, nullptr);
306}
307RooCmdArg Import(const char *state, TH1 &histo)
308{
309 return RooCmdArg("ImportDataSlice", 0, 0, 0, 0, state, nullptr, &histo, nullptr);
310}
311RooCmdArg Import(const char *state, RooDataHist &dhist)
312{
313 return RooCmdArg("ImportDataSlice", 0, 0, 0, 0, state, nullptr, &dhist, nullptr);
314}
315RooCmdArg Import(TH1 &histo, bool importDensity)
316{
317 return RooCmdArg("ImportHisto", importDensity, 0, 0, 0, nullptr, nullptr, &histo, nullptr);
318}
319
320RooCmdArg Import(const std::map<std::string, RooDataHist *> &arg)
321{
322 return processMap("ImportDataSliceMany", processImportItem<RooDataHist>, arg);
323}
324RooCmdArg Import(const std::map<std::string, TH1 *> &arg)
325{
326 return processMap("ImportDataSliceMany", processImportItem<TH1>, arg);
327}
328
329// RooDataSet::ctor arguments
330RooCmdArg WeightVar(const char *name, bool reinterpretAsWeight)
331{
332 if (name == nullptr)
333 return RooCmdArg::none(); // Passing a nullptr name means no weight variable
334 return RooCmdArg("WeightVarName", reinterpretAsWeight, 0, 0, 0, name, nullptr, nullptr, nullptr);
335}
336RooCmdArg WeightVar(const RooRealVar &arg, bool reinterpretAsWeight)
337{
338 return RooCmdArg("WeightVar", reinterpretAsWeight, 0, 0, 0, nullptr, nullptr, &arg, nullptr);
339}
340RooCmdArg Link(const char *state, RooAbsData &data)
341{
342 return RooCmdArg("LinkDataSlice", 0, 0, 0, 0, state, nullptr, &data, nullptr);
343}
344RooCmdArg Import(const char *state, RooAbsData &data)
345{
346 return RooCmdArg("ImportDataSlice", 0, 0, 0, 0, state, nullptr, &data, nullptr);
347}
349{
350 return RooCmdArg("ImportData", 0, 0, 0, 0, nullptr, nullptr, &data, nullptr);
351}
353{
354 return RooCmdArg("ImportTree", 0, 0, 0, 0, nullptr, nullptr, reinterpret_cast<TObject *>(&tree), nullptr);
355}
356RooCmdArg ImportFromFile(const char *fname, const char *tname)
357{
358 return RooCmdArg("ImportFromFile", 0, 0, 0, 0, fname, tname, nullptr, nullptr);
359}
361{
362 return RooCmdArg("StoreError", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &aset);
363}
365{
366 return RooCmdArg("StoreAsymError", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &aset);
367}
369{
370 return RooCmdArg("OwnLinked", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr);
371}
372
373RooCmdArg Import(const std::map<std::string, RooDataSet *> &arg)
374{
375 return processMap("ImportDataSliceMany", processImportItem<RooDataSet>, arg);
376}
377RooCmdArg Link(const std::map<std::string, RooAbsData *> &arg)
378{
379 return processMap("LinkDataSliceMany", processLinkItem<RooAbsData>, arg);
380}
381
382// RooChi2Var::ctor / RooNLLVar arguments
384{
385 return RooCmdArg("Extended", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
386}
388{
389 return RooCmdArg("DataError", (Int_t)etype, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
390}
391RooCmdArg NumCPU(Int_t nCPU, Int_t interleave)
392{
393 return RooCmdArg("NumCPU", nCPU, interleave, 0, 0, nullptr, nullptr, nullptr, nullptr);
394}
396{
397 return RooCmdArg("ModularL", flag, 0, 0, 0, nullptr, nullptr, nullptr);
398}
400{
401 return RooCmdArg("Parallelize", nWorkers, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
402}
404{
405 return RooCmdArg("TimingAnalysis", flag, 0, 0, 0, nullptr, nullptr, nullptr);
406}
407RooCmdArg BatchMode(std::string const &batchMode)
408{
409 oocoutW(nullptr, InputArguments)
410 << "The BatchMode() command argument is deprecated. Please use EvalBackend() instead." << std::endl;
411 std::string lower = batchMode;
412 std::transform(lower.begin(), lower.end(), lower.begin(), [](unsigned char c) { return std::tolower(c); });
413 if (lower == "off") {
414 return EvalBackend::Legacy();
415 } else if (lower == "cpu") {
416 return EvalBackend::Cpu();
417 } else if (lower == "cuda") {
418 return EvalBackend::Cuda();
419 }
420 throw std::runtime_error("Only supported string values for BatchMode() are \"off\", \"cpu\", or \"cuda\".");
421}
422/// Integrate the PDF over bins. Improves accuracy for binned fits. Switch off using `0.` as argument. \see
423/// RooAbsPdf::fitTo().
424RooCmdArg IntegrateBins(double precision)
425{
426 return RooCmdArg("IntegrateBins", 0, 0, precision);
427}
428
429// RooAbsCollection::printLatex arguments
431{
432 return RooCmdArg("Columns", ncol, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
433}
434RooCmdArg OutputFile(const char *fileName)
435{
436 return RooCmdArg("OutputFile", 0, 0, 0, 0, fileName, nullptr, nullptr, nullptr);
437}
439{
440 return RooCmdArg("Sibling", 0, 0, 0, 0, nullptr, nullptr, &sibling, nullptr);
441}
442RooCmdArg Format(const char *what, const RooCmdArg &arg1, const RooCmdArg &arg2, const RooCmdArg &arg3,
443 const RooCmdArg &arg4, const RooCmdArg &arg5, const RooCmdArg &arg6, const RooCmdArg &arg7,
444 const RooCmdArg &arg8)
445{
446 RooCmdArg ret("FormatArgs", 0, 0, 0, 0, what, nullptr, nullptr, nullptr);
447 ret.addArg(arg1);
448 ret.addArg(arg2);
449 ret.addArg(arg3);
450 ret.addArg(arg4);
451 ret.addArg(arg5);
452 ret.addArg(arg6);
453 ret.addArg(arg7);
454 ret.addArg(arg8);
455 ret.setProcessRecArgs(false);
456 return ret;
457}
458
459// RooAbsRealLValue::frame arguments
460RooCmdArg Title(const char *name)
461{
462 return RooCmdArg("Title", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
463}
465{
466 return RooCmdArg("Bins", nbin, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
467}
468RooCmdArg AutoSymRange(const RooAbsData &data, double marginFactor)
469{
470 return RooCmdArg("AutoRange", 1, 0, marginFactor, 0, nullptr, nullptr, &data, nullptr);
471}
472RooCmdArg AutoRange(const RooAbsData &data, double marginFactor)
473{
474 return RooCmdArg("AutoRange", 0, 0, marginFactor, 0, nullptr, nullptr, &data, nullptr);
475}
476
477// RooAbsData::reduce arguments
479{
480 RooCmdArg out{"SelectVars", 0};
481 out.setSet(0, vars);
482 return out;
483}
485{
486 return RooCmdArg("EventRange", nStart, nStop, 0, 0, nullptr, nullptr, nullptr, nullptr);
487}
488
489// RooAbsPdf::fitTo arguments
490
491EvalBackend::EvalBackend(EvalBackend::Value value) : RooCmdArg{"EvalBackend", static_cast<int>(value)} {}
492EvalBackend::EvalBackend(std::string const &name) : EvalBackend{toValue(name)} {}
494{
495 std::string lower = name;
496 std::transform(lower.begin(), lower.end(), lower.begin(), [](unsigned char c) { return std::tolower(c); });
497 if (lower == toName(Value::Legacy))
498 return Value::Legacy;
499 if (lower == toName(Value::Cpu))
500 return Value::Cpu;
501 if (lower == toName(Value::Cuda))
502 return Value::Cuda;
503 if (lower == toName(Value::Codegen))
504 return Value::Codegen;
505 if (lower == toName(Value::CodegenNoGrad))
507 throw std::runtime_error("Only supported string values for EvalBackend() are \"legacy\", \"cpu\", \"cuda\", "
508 "\"codegen\", or \"codegen_no_grad\".");
509}
511{
513}
515{
516 return EvalBackend(Value::Cpu);
517}
519{
520 return EvalBackend(Value::Cuda);
521}
523{
525}
527{
529}
530std::string EvalBackend::name() const
531{
532 return toName(value());
533}
535{
536 if (value == Value::Legacy)
537 return "legacy";
538 if (value == Value::Cpu)
539 return "cpu";
540 if (value == Value::Cuda)
541 return "cuda";
542 if (value == Value::Codegen)
543 return "codegen";
545 return "codegen_no_grad";
546 return "";
547}
549{
550 static Value value = Value::Cpu;
551 return value;
552}
553
555{
556 return RooCmdArg("Prefit", 0, 0, data_ratio, 0, nullptr, nullptr, nullptr, nullptr);
557}
559{
560 return RooCmdArg("Optimize", flag);
561}
563{
564 return RooCmdArg("Verbose", flag);
565}
566RooCmdArg Save(bool flag)
567{
568 return RooCmdArg("Save", flag);
569}
570RooCmdArg Timer(bool flag)
571{
572 return RooCmdArg("Timer", flag);
573}
575{
576 return RooCmdArg("PrintLevel", level);
577}
579{
580 return RooCmdArg("MaxCalls", n);
581}
583{
584 return RooCmdArg("Warnings", flag);
585}
587{
588 return RooCmdArg("Strategy", code);
589}
591{
592 return RooCmdArg("InitialHesse", flag);
593}
594RooCmdArg Hesse(bool flag)
595{
596 return RooCmdArg("Hesse", flag);
597}
598RooCmdArg Minos(bool flag)
599{
600 return RooCmdArg("Minos", flag);
601}
602RooCmdArg Minos(const RooArgSet &minosArgs)
603{
604 RooCmdArg out{"Minos", 1};
605 out.setSet(0, minosArgs);
606 return out;
607}
609{
610 return RooCmdArg("SplitRange", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
611}
612RooCmdArg SumCoefRange(const char *rangeName)
613{
614 return RooCmdArg("SumCoefRange", 0, 0, 0, 0, rangeName, nullptr, nullptr, nullptr);
615}
617{
618 for (RooAbsArg *param : params) {
619 if (!dynamic_cast<RooRealVar *>(param)) {
620 std::stringstream errorMsg;
621 errorMsg << "RooFit::Constrain(): you passed the argument \"" << param->GetName()
622 << "\", but it's not a RooRealVar!"
623 << " You can only constrain parameters, which must be RooRealVars.";
624 oocoutE(nullptr, InputArguments) << errorMsg.str() << std::endl;
625 throw std::invalid_argument(errorMsg.str().c_str());
626 }
627 }
628 return RooCmdArg("Constrain", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &params);
629}
630RooCmdArg GlobalObservablesSource(const char *sourceName)
631{
632 return {"GlobalObservablesSource", 0, 0, 0, 0, sourceName, nullptr, nullptr, nullptr};
633}
634RooCmdArg GlobalObservablesTag(const char *tagName)
635{
636 return RooCmdArg("GlobalObservablesTag", 0, 0, 0, 0, tagName, nullptr, nullptr, nullptr);
637}
639{
640 return RooCmdArg("ExternalConstraints", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &cpdfs);
641}
643{
644 return RooCmdArg("PrintEvalErrors", numErrors, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
645}
647{
648 return RooCmdArg("EvalErrorWall", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
649}
651{
652 return RooCmdArg("SumW2Error", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
653}
655{
656 return RooCmdArg("AsymptoticError", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
657}
659{
660 oocoutI(nullptr, InputArguments) << "The deprecated RooFit::CloneData(" << flag
661 << ") option passed to createNLL() is ignored." << std::endl;
662 return RooCmdArg("CloneData", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
663}
665{
666 return RooCmdArg("Integrate", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
667}
668RooCmdArg Minimizer(const char *type, const char *alg)
669{
670 return RooCmdArg("Minimizer", 0, 0, 0, 0, type, alg, nullptr, nullptr);
671}
672
673RooCmdArg Offset(std::string const &mode)
674{
675 std::string lower = mode;
676 std::transform(lower.begin(), lower.end(), lower.begin(), [](unsigned char c) { return std::tolower(c); });
678 if (lower == "none") {
679 modeVal = OffsetMode::None;
680 } else if (lower == "initial") {
681 modeVal = OffsetMode::Initial;
682 } else if (lower == "bin") {
683 modeVal = OffsetMode::Bin;
684 }
685 return RooCmdArg("OffsetLikelihood", static_cast<int>(modeVal));
686}
687
688/// When parameters are chosen such that a PDF is undefined, try to indicate to the minimiser how to leave this region.
689/// \param strength Strength of hints for minimiser. Set to zero to switch off.
691{
692 return RooCmdArg("RecoverFromUndefinedRegions", 0, 0, strength, 0, nullptr, nullptr, nullptr, nullptr);
693}
694
695// RooAbsPdf::paramOn arguments
696RooCmdArg Label(const char *str)
697{
698 return RooCmdArg("Label", 0, 0, 0, 0, str, nullptr, nullptr, nullptr);
699}
700RooCmdArg Layout(double xmin, double xmax, double ymin)
701{
702 return RooCmdArg("Layout", Int_t(ymin * 10000), 0, xmin, xmax, nullptr, nullptr, nullptr, nullptr);
703}
705{
706 RooCmdArg out{"Parameters", 0};
707 out.setSet(0, params);
708 return out;
709}
711{
712 return RooCmdArg("ShowConstants", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
713}
714
715// RooTreeData::statOn arguments
716RooCmdArg What(const char *str)
717{
718 return RooCmdArg("What", 0, 0, 0, 0, str, nullptr, nullptr, nullptr);
719}
720
721// RooProdPdf::ctor arguments
722RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, bool depsAreCond)
723{
724 return RooCmdArg("Conditional", depsAreCond, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &pdfSet,
725 &depSet);
726};
727
728// RooAbsPdf::generate arguments
729RooCmdArg ProtoData(const RooDataSet &protoData, bool randomizeOrder, bool resample)
730{
731 return RooCmdArg("PrototypeData", randomizeOrder, resample, 0, 0, nullptr, nullptr, &protoData, nullptr);
732}
734{
735 return RooCmdArg("NumEvents", numEvents, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
736}
737RooCmdArg NumEvents(double numEvents)
738{
739 return RooCmdArg("NumEventsD", 0, 0, numEvents, 0, nullptr, nullptr, nullptr, nullptr);
740}
742{
743 return RooCmdArg("ExpectedData", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
744}
746{
747 return ExpectedData(flag);
748}
750{
751 return RooCmdArg("AutoBinned", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
752}
753RooCmdArg GenBinned(const char *tag)
754{
755 return RooCmdArg("GenBinned", 0, 0, 0, 0, tag, nullptr, nullptr, nullptr);
756}
758{
759 return RooCmdArg("GenBinned", 0, 0, 0, 0, "*", nullptr, nullptr, nullptr);
760}
761
762// RooAbsRealLValue::createHistogram arguments
764{
765 return RooCmdArg("YVar", 0, 0, 0, 0, nullptr, nullptr, &var, nullptr, &arg);
766}
768{
769 return RooCmdArg("ZVar", 0, 0, 0, 0, nullptr, nullptr, &var, nullptr, &arg);
770}
772{
773 return RooCmdArg("AxisLabel", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
774}
776{
777 return RooCmdArg("Scaling", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
778}
779
780// RooAbsReal::createHistogram arguments
782{
783 return RooCmdArg("IntrinsicBinning", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
784}
785
786// RooAbsData::createHistogram arguments
787RooCmdArg AutoSymBinning(Int_t nbins, double marginFactor)
788{
789 return RooCmdArg("AutoRangeData", 1, nbins, marginFactor, 0, nullptr, nullptr, nullptr, nullptr);
790}
791RooCmdArg AutoBinning(Int_t nbins, double marginFactor)
792{
793 return RooCmdArg("AutoRangeData", 0, nbins, marginFactor, 0, nullptr, nullptr, nullptr, nullptr);
794}
795
796// RooAbsReal::fillHistogram arguments
798{
799 return RooCmdArg("IntObs", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, &intObs, nullptr);
800};
801
802// RooAbsReal::createIntegral arguments
804{
805 return RooCmdArg("NumIntConfig", 0, 0, 0, 0, nullptr, nullptr, &cfg, nullptr);
806}
807
808// RooMCStudy::ctor arguments
810{
811 return RooCmdArg("Silence", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
812}
814{
815 return RooCmdArg("FitModel", 0, 0, 0, 0, nullptr, nullptr, &pdf, nullptr);
816}
817RooCmdArg FitOptions(const RooCmdArg &arg1, const RooCmdArg &arg2, const RooCmdArg &arg3, const RooCmdArg &arg4,
818 const RooCmdArg &arg5, const RooCmdArg &arg6)
819{
820 RooCmdArg ret("FitOptArgs", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
821 ret.addArg(arg1);
822 ret.addArg(arg2);
823 ret.addArg(arg3);
824 ret.addArg(arg4);
825 ret.addArg(arg5);
826 ret.addArg(arg6);
827 ret.setProcessRecArgs(false);
828 return ret;
829}
831{
832 return RooCmdArg("Binned", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
833}
835{
836 return RooCmdArg("BootStrapData", 0, 0, 0, 0, nullptr, nullptr, &dset, nullptr);
837}
838
839// RooMCStudy::plot* arguments
840RooCmdArg Frame(const RooCmdArg &arg1, const RooCmdArg &arg2, const RooCmdArg &arg3, const RooCmdArg &arg4,
841 const RooCmdArg &arg5, const RooCmdArg &arg6)
842{
843 RooCmdArg ret("FrameArgs", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
844 ret.addArg(arg1);
845 ret.addArg(arg2);
846 ret.addArg(arg3);
847 ret.addArg(arg4);
848 ret.addArg(arg5);
849 ret.addArg(arg6);
850 ret.setProcessRecArgs(false);
851 return ret;
852}
854{
855 return RooCmdArg("Bins", nbins, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
856}
857RooCmdArg FrameRange(double xlo, double xhi)
858{
859 return RooCmdArg("Range", 0, 0, xlo, xhi, nullptr, nullptr, nullptr, nullptr);
860}
862{
863 return RooCmdArg("FitGauss", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
864}
865
866// RooRealVar::format arguments
868{
869 return RooCmdArg("ShowName", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
870}
872{
873 return RooCmdArg("ShowValue", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
874}
876{
877 return RooCmdArg("ShowError", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
878}
880{
881 return RooCmdArg("ShowAsymError", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
882}
884{
885 return RooCmdArg("ShowUnit", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
886}
888{
889 return RooCmdArg("AutoPrecision", ndigit, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
890}
892{
893 return RooCmdArg("FixedPrecision", ndigit, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
894}
896{
897 return RooCmdArg("TLatexStyle", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
898}
900{
901 return RooCmdArg("LatexStyle", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
902}
904{
905 return RooCmdArg("LatexTableStyle", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
906}
908{
909 return RooCmdArg("VerbatimName", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
910}
911
912// RooMsgService::addReportingStream arguments
914{
915 return RooCmdArg("Topic", topic, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
916}
918{
919 return RooCmdArg("ObjectName", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
920}
922{
923 return RooCmdArg("ClassName", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
924}
926{
927 return RooCmdArg("BaseClassName", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
928}
930{
931 return RooCmdArg("LabelName", 0, 0, 0, 0, name, nullptr, nullptr, nullptr);
932}
934{
935 return RooCmdArg("OutputStream", 0, 0, 0, 0, nullptr, nullptr, new RooHelpers::WrapIntoTObject<ostream>(os),
936 nullptr);
937}
939{
940 return RooCmdArg("Prefix", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
941}
943{
944 return RooCmdArg("Color", color, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
945}
946
947// RooWorkspace::import() arguments
948RooCmdArg RenameConflictNodes(const char *suffix, bool ro)
949{
950 return RooCmdArg("RenameConflictNodes", ro, 0, 0, 0, suffix, nullptr, nullptr, nullptr);
951}
953{
954 return RooCmdArg("RecycleConflictNodes", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
955}
956RooCmdArg RenameAllNodes(const char *suffix)
957{
958 return RooCmdArg("RenameAllNodes", 0, 0, 0, 0, suffix, nullptr, nullptr, nullptr);
959}
960RooCmdArg RenameAllVariables(const char *suffix)
961{
962 return RooCmdArg("RenameAllVariables", 0, 0, 0, 0, suffix, nullptr, nullptr, nullptr);
963}
964RooCmdArg RenameAllVariablesExcept(const char *suffix, const char *except)
965{
966 return RooCmdArg("RenameAllVariables", 0, 0, 0, 0, suffix, except, nullptr, nullptr);
967}
968RooCmdArg RenameVariable(const char *in, const char *out)
969{
970 return RooCmdArg("RenameVar", 0, 0, 0, 0, in, out, nullptr, nullptr);
971}
972RooCmdArg Rename(const char *suffix)
973{
974 return RooCmdArg("Rename", 0, 0, 0, 0, suffix, nullptr, nullptr, nullptr);
975}
977{
978 return RooCmdArg("Embedded", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
979}
981{
982 return RooCmdArg("NoRecursion", flag, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
983}
984
985// RooSimCloneTool::build() arguments
986RooCmdArg SplitParam(const char *varname, const char *catname)
987{
988 return RooCmdArg("SplitParam", 0, 0, 0, 0, varname, catname, nullptr, nullptr);
989}
991{
992 return RooCmdArg("SplitParam", 0, 0, 0, 0, var.GetName(), cat.GetName(), nullptr, nullptr);
993}
994RooCmdArg SplitParamConstrained(const char *varname, const char *catname, const char *rsname)
995{
996 return RooCmdArg("SplitParamConstrained", 0, 0, 0, 0, varname, catname, nullptr, nullptr, nullptr, rsname);
997}
998RooCmdArg SplitParamConstrained(const RooRealVar &var, const RooAbsCategory &cat, const char *rsname)
999{
1000 return RooCmdArg("SplitParamConstrained", 0, 0, 0, 0, var.GetName(), cat.GetName(), nullptr, nullptr, nullptr,
1001 rsname);
1002}
1003RooCmdArg Restrict(const char *catName, const char *stateNameList)
1004{
1005 return RooCmdArg("Restrict", 0, 0, 0, 0, catName, stateNameList, nullptr, nullptr);
1006}
1007
1008// RooAbsPdf::createCdf() arguments
1010{
1011 RooCmdArg out{"SupNormSet", 0};
1012 out.setSet(0, nset);
1013 return out;
1014}
1016{
1017 return RooCmdArg("ScanParameters", nbins, intOrder, 0, 0, nullptr, nullptr, nullptr, nullptr);
1018}
1020{
1021 return RooCmdArg("ScanNumCdf", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1022}
1024{
1025 return RooCmdArg("ScanAllCdf", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1026}
1028{
1029 return RooCmdArg("ScanNoCdf", 1, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1030}
1031
1032RooCmdArg MultiArg(const RooCmdArg &arg1, const RooCmdArg &arg2, const RooCmdArg &arg3, const RooCmdArg &arg4,
1033 const RooCmdArg &arg5, const RooCmdArg &arg6, const RooCmdArg &arg7, const RooCmdArg &arg8)
1034{
1035 RooCmdArg ret("MultiArg", 0, 0, 0, 0, nullptr, nullptr, nullptr, nullptr);
1036 ret.addArg(arg1);
1037 ret.addArg(arg2);
1038 ret.addArg(arg3);
1039 ret.addArg(arg4);
1040 ret.addArg(arg5);
1041 ret.addArg(arg6);
1042 ret.addArg(arg7);
1043 ret.addArg(arg8);
1044 ret.setProcessRecArgs(true, false);
1045 return ret;
1046}
1047
1049{
1050 return RooRealConstant::value(val);
1051}
1052
1053} // End namespace RooFit
1054
1055namespace RooFitShortHand {
1056
1058{
1059 return RooFit::RooConst(value);
1060}
1061
1062} // 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:89
int Int_t
Definition RtypesCore.h:45
short Color_t
Definition RtypesCore.h:92
float Size_t
Definition RtypesCore.h:96
short Width_t
Definition RtypesCore.h:91
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
void(* Func_t)()
Definition TSystem.h:238
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
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:55
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:51
void setProcessRecArgs(bool flag, bool prefix=true)
Definition RooCmdArg.h:45
Represents a constant real-valued object.
Definition RooConstVar.h:23
Container class to hold N-dimensional binned data.
Definition RooDataHist.h:39
Container class to hold unbinned data.
Definition RooDataSet.h:57
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
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 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 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 BaseClassName(const char *name)
RooCmdArg IntrinsicBinning(bool flag=true)
RooCmdArg Restrict(const char *catName, const char *stateNameList)
RooCmdArg TLatexStyle(bool flag=true)
RooCmdArg RenameAllVariables(const char *suffix)
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg={})
RooCmdArg ShowConstants(bool flag=true)
RooCmdArg Frame(const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={})
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 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 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 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 Silence(bool flag=true)
RooCmdArg FitOptions(const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={})
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 DataError(Int_t)
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 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 MarkerColor(Color_t color)
RooCmdArg RefreshNorm()
RooCmdArg Components(Args_t &&... argsOrArgSet)
RooCmdArg ProjectionRange(const char *rangeName)
RooCmdArg FillColor(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 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 Efficiency(const RooCategory &cat)
RooCmdArg LineColor(Color_t color)
RooCmdArg Name(const char *name)
RooCmdArg LineStyle(Style_t style)
RooCmdArg VLines()
RooCmdArg Asymmetry(const RooCategory &cat)
const Int_t n
Definition legend1.C:16
RooConstVar & C(double value)
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 JSONIO.h:26
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:6
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