Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
JSONFactories_RooFitCore.cxx
Go to the documentation of this file.
1/*
2 * Project: RooFit
3 * Authors:
4 * Carsten D. Burgard, DESY/ATLAS, Dec 2021
5 *
6 * Copyright (c) 2022, CERN
7 *
8 * Redistribution and use in source and binary forms,
9 * with or without modification, are permitted according to the terms
10 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)
11 */
12
15
16#include <RooDataHist.h>
17#include <RooWorkspace.h>
18
19#include "static_execute.h"
20
22
23///////////////////////////////////////////////////////////////////////////////////////////////////////
24// individually implemented importers
25///////////////////////////////////////////////////////////////////////////////////////////////////////
26
27#include <RooGenericPdf.h>
28
29namespace {
30class RooGenericPdfFactory : public RooJSONFactoryWSTool::Importer {
31public:
32 bool importPdf(RooJSONFactoryWSTool *tool, const JSONNode &p) const override
33 {
34 std::string name(RooJSONFactoryWSTool::name(p));
35 if (!p.has_child("dependents")) {
36 RooJSONFactoryWSTool::error("no dependents of '" + name + "'");
37 }
38 if (!p.has_child("formula")) {
39 RooJSONFactoryWSTool::error("no formula given for '" + name + "'");
40 }
41 RooArgList dependents;
42 for (const auto &d : p["dependents"].children()) {
43 std::string objname(RooJSONFactoryWSTool::name(d));
44 TObject *obj = tool->workspace()->obj(objname.c_str());
45 if (obj->InheritsFrom(RooAbsArg::Class())) {
46 dependents.add(*static_cast<RooAbsArg *>(obj));
47 }
48 }
49 TString formula(p["formula"].val());
50 RooGenericPdf thepdf(name.c_str(), formula.Data(), dependents);
51 tool->workspace()->import(thepdf, RooFit::RecycleConflictNodes(true), RooFit::Silence(true));
52 return true;
53 }
54};
55} // namespace
56
57#include <RooFormulaVar.h>
58
59namespace {
60class RooFormulaVarFactory : public RooJSONFactoryWSTool::Importer {
61public:
62 bool importFunction(RooJSONFactoryWSTool *tool, const JSONNode &p) const override
63 {
64 std::string name(RooJSONFactoryWSTool::name(p));
65 if (!p.has_child("dependents")) {
66 RooJSONFactoryWSTool::error("no dependents of '" + name + "'");
67 }
68 if (!p.has_child("formula")) {
69 RooJSONFactoryWSTool::error("no formula given for '" + name + "'");
70 }
71 RooArgList dependents;
72 for (const auto &d : p["dependents"].children()) {
73 std::string objname(RooJSONFactoryWSTool::name(d));
74 TObject *obj = tool->workspace()->obj(objname.c_str());
75 if (obj->InheritsFrom(RooAbsArg::Class())) {
76 dependents.add(*static_cast<RooAbsArg *>(obj));
77 }
78 }
79 TString formula(p["formula"].val());
80 RooFormulaVar thevar(name.c_str(), formula.Data(), dependents);
81 tool->workspace()->import(thevar, RooFit::RecycleConflictNodes(true), RooFit::Silence(true));
82 return true;
83 }
84};
85} // namespace
86
87#include <RooProdPdf.h>
88
89namespace {
90class RooProdPdfFactory : public RooJSONFactoryWSTool::Importer {
91public:
92 bool importPdf(RooJSONFactoryWSTool *tool, const JSONNode &p) const override
93 {
94 std::string name(RooJSONFactoryWSTool::name(p));
95 RooArgSet factors;
96 if (!p.has_child("pdfs")) {
97 RooJSONFactoryWSTool::error("no pdfs of '" + name + "'");
98 }
99 if (!p["pdfs"].is_seq()) {
100 RooJSONFactoryWSTool::error("pdfs '" + name + "' are not a list.");
101 }
102 for (const auto &comp : p["pdfs"].children()) {
103 std::string pdfname(comp.val());
104 RooAbsPdf *pdf = tool->request<RooAbsPdf>(pdfname, name);
105 factors.add(*pdf);
106 }
107 RooProdPdf prod(name.c_str(), name.c_str(), factors);
109 return true;
110 }
111};
112} // namespace
113
114#include <RooAddPdf.h>
115
116namespace {
117class RooAddPdfFactory : public RooJSONFactoryWSTool::Importer {
118public:
119 bool importPdf(RooJSONFactoryWSTool *tool, const JSONNode &p) const override
120 {
121 std::string name(RooJSONFactoryWSTool::name(p));
122 RooArgList pdfs;
123 RooArgList coefs;
124 if (!p.has_child("summands")) {
125 RooJSONFactoryWSTool::error("no summands of '" + name + "'");
126 }
127 if (!p["summands"].is_seq()) {
128 RooJSONFactoryWSTool::error("summands '" + name + "' are not a list.");
129 }
130 if (!p.has_child("coefficients")) {
131 RooJSONFactoryWSTool::error("no coefficients of '" + name + "'");
132 }
133 if (!p["coefficients"].is_seq()) {
134 RooJSONFactoryWSTool::error("coefficients '" + name + "' are not a list.");
135 }
136 for (const auto &comp : p["summands"].children()) {
137 std::string pdfname(comp.val());
138 RooAbsPdf *pdf = tool->request<RooAbsPdf>(pdfname, name);
139 pdfs.add(*pdf);
140 }
141 for (const auto &comp : p["coefficients"].children()) {
142 std::string coefname(comp.val());
143 RooAbsReal *coef = tool->request<RooAbsReal>(coefname, name);
144 coefs.add(*coef);
145 }
146 RooAddPdf add(name.c_str(), name.c_str(), pdfs, coefs);
148 return true;
149 }
150};
151} // namespace
152
153#include <RooBinWidthFunction.h>
154
155namespace {
156class RooBinWidthFunctionFactory : public RooJSONFactoryWSTool::Importer {
157public:
158 bool importFunction(RooJSONFactoryWSTool *tool, const JSONNode &p) const override
159 {
160 std::string name(RooJSONFactoryWSTool::name(p));
161 bool divideByBinWidth = p["divideByBinWidth"].val_bool();
162 RooHistFunc *hf = dynamic_cast<RooHistFunc *>(tool->request<RooAbsReal>(p["histogram"].val(), name));
163 RooBinWidthFunction func(name.c_str(), name.c_str(), *hf, divideByBinWidth);
165 return true;
166 }
167};
168} // namespace
169
170#include <RooSimultaneous.h>
171#include <RooCategory.h>
172
173namespace {
174class RooSimultaneousFactory : public RooJSONFactoryWSTool::Importer {
175public:
176 bool importPdf(RooJSONFactoryWSTool *tool, const JSONNode &p) const override
177 {
178 std::string name(RooJSONFactoryWSTool::name(p));
179 if (!p.has_child("channels")) {
180 RooJSONFactoryWSTool::error("no channel components of '" + name + "'");
181 }
182 std::map<std::string, RooAbsPdf *> components;
183 std::string indexname(p["index"].val());
184 RooCategory cat(indexname.c_str(), indexname.c_str());
185 for (const auto &comp : p["channels"].children()) {
186 std::string catname(RooJSONFactoryWSTool::name(comp));
187 tool->log(RooFit::INFO) << "importing category " << catname << std::endl;
188 tool->importFunction(comp, true);
189 std::string pdfname(comp.has_val() ? comp.val() : RooJSONFactoryWSTool::name(comp));
190 RooAbsPdf *pdf = tool->request<RooAbsPdf>(pdfname, name);
191 components[catname] = pdf;
192 cat.defineType(catname.c_str());
193 }
194 RooSimultaneous simpdf(name.c_str(), name.c_str(), components, cat);
195 tool->workspace()->import(simpdf, RooFit::RecycleConflictNodes(true), RooFit::Silence(true));
196 return true;
197 }
198};
199} // namespace
200
201#include <RooBinSamplingPdf.h>
202#include <RooRealVar.h>
203
204namespace {
205class RooBinSamplingPdfFactory : public RooJSONFactoryWSTool::Importer {
206public:
207 bool importPdf(RooJSONFactoryWSTool *tool, const JSONNode &p) const override
208 {
209 std::string name(RooJSONFactoryWSTool::name(p));
210
211 if (!p.has_child("pdf")) {
212 RooJSONFactoryWSTool::error("no pdf given in '" + name + "'");
213 }
214 std::string pdfname(p["pdf"].val());
215 RooAbsPdf *pdf = tool->request<RooAbsPdf>(pdfname, name);
216
217 if (!p.has_child("observable")) {
218 RooJSONFactoryWSTool::error("no observable given in '" + name + "'");
219 }
220 std::string obsname(p["observable"].val());
221 RooRealVar *obs = tool->request<RooRealVar>(obsname, name);
222
223 if (!pdf->dependsOn(*obs)) {
224 pdf->Print("t");
225 RooJSONFactoryWSTool::error("pdf '" + pdfname + "' does not depend on observable '" + obsname +
226 "' as indicated by parent RooBinSamplingPdf '" + name + "', please check!");
227 }
228
229 if (!p.has_child("epsilon")) {
230 RooJSONFactoryWSTool::error("no epsilon given in '" + name + "'");
231 }
232 double epsilon(p["epsilon"].val_float());
233
234 RooBinSamplingPdf thepdf(name.c_str(), name.c_str(), *obs, *pdf, epsilon);
235 tool->workspace()->import(thepdf, RooFit::RecycleConflictNodes(true), RooFit::Silence(true));
236
237 return true;
238 }
239};
240} // namespace
241
242#include <RooRealSumPdf.h>
243
244namespace {
245class RooRealSumPdfFactory : public RooJSONFactoryWSTool::Importer {
246public:
247 bool importPdf(RooJSONFactoryWSTool *tool, const JSONNode &p) const override
248 {
249 std::string name(RooJSONFactoryWSTool::name(p));
250 if (!p.has_child("samples")) {
251 RooJSONFactoryWSTool::error("no samples given in '" + name + "'");
252 }
253 if (!p.has_child("coefficients")) {
254 RooJSONFactoryWSTool::error("no coefficients given in '" + name + "'");
255 }
256 RooArgList samples;
257 for (const auto &sample : p["samples"].children()) {
258 RooAbsReal *s = tool->request<RooAbsReal>(sample.val(), name);
259 samples.add(*s);
260 }
261 RooArgList coefficients;
262 for (const auto &coef : p["coefficients"].children()) {
263 RooAbsReal *c = tool->request<RooAbsReal>(coef.val(), name);
264 coefficients.add(*c);
265 }
266
267 bool extended = false;
268 if (p.has_child("extended") && p["extended"].val_bool()) {
269 extended = true;
270 }
271 RooRealSumPdf thepdf(name.c_str(), name.c_str(), samples, coefficients, extended);
272 tool->workspace()->import(thepdf, RooFit::RecycleConflictNodes(true), RooFit::Silence(true));
273 return true;
274 }
275};
276} // namespace
277
278///////////////////////////////////////////////////////////////////////////////////////////////////////
279// specialized exporter implementations
280///////////////////////////////////////////////////////////////////////////////////////////////////////
281
282#include <RooRealSumPdf.h>
283
284namespace {
285class RooRealSumPdfStreamer : public RooJSONFactoryWSTool::Exporter {
286public:
287 std::string const &key() const override
288 {
289 const static std::string keystring = "sumpdf";
290 return keystring;
291 }
292 bool exportObject(RooJSONFactoryWSTool *, const RooAbsArg *func, JSONNode &elem) const override
293 {
294 const RooRealSumPdf *pdf = static_cast<const RooRealSumPdf *>(func);
295 elem["type"] << key();
296 auto &samples = elem["samples"];
297 samples.set_seq();
298 auto &coefs = elem["coefficients"];
299 coefs.set_seq();
300 for (const auto &s : pdf->funcList()) {
301 samples.append_child() << s->GetName();
302 }
303 for (const auto &c : pdf->coefList()) {
304 coefs.append_child() << c->GetName();
305 }
306 elem["extended"] << (pdf->extendMode() == RooAbsPdf::CanBeExtended);
307 return true;
308 }
309};
310} // namespace
311
312namespace {
313class RooSimultaneousStreamer : public RooJSONFactoryWSTool::Exporter {
314public:
315 std::string const &key() const override
316 {
317 const static std::string keystring = "simultaneous";
318 return keystring;
319 }
320 bool autoExportDependants() const override { return false; }
321 bool exportObject(RooJSONFactoryWSTool *tool, const RooAbsArg *func, JSONNode &elem) const override
322 {
323 const RooSimultaneous *sim = static_cast<const RooSimultaneous *>(func);
324 elem["type"] << key();
325 elem["index"] << sim->indexCat().GetName();
326 auto &channels = elem["channels"];
327 channels.set_map();
328 const auto &indexCat = sim->indexCat();
329 for (const auto &cat : indexCat) {
330 const auto catname = cat.first.c_str();
331 RooAbsPdf *pdf = sim->getPdf(catname);
332 if (!pdf)
333 RooJSONFactoryWSTool::error("no pdf found for category");
334 tool->exportObject(pdf, channels);
335 }
336 return true;
337 }
338};
339} // namespace
340
341#include <RooHistFunc.h>
342#include <TH1.h>
343
344namespace {
345class RooHistFuncStreamer : public RooJSONFactoryWSTool::Exporter {
346public:
347 std::string const &key() const override
348 {
349 static const std::string keystring = "histogram";
350 return keystring;
351 }
352 bool exportObject(RooJSONFactoryWSTool *, const RooAbsArg *func, JSONNode &elem) const override
353 {
354 const RooHistFunc *hf = static_cast<const RooHistFunc *>(func);
355 const RooDataHist &dh = hf->dataHist();
356 elem["type"] << key();
357 RooArgList vars(*dh.get());
358 std::unique_ptr<TH1> hist{hf->createHistogram(RooJSONFactoryWSTool::concat(&vars).c_str())};
359 auto &data = elem["data"];
361 return true;
362 }
363};
364} // namespace
365
366namespace {
367class RooHistFuncFactory : public RooJSONFactoryWSTool::Importer {
368public:
369 bool importFunction(RooJSONFactoryWSTool *tool, const JSONNode &p) const override
370 {
371 std::string name(RooJSONFactoryWSTool::name(p));
372 if (!p.has_child("data")) {
373 RooJSONFactoryWSTool::error("function '" + name + "' is of histogram type, but does not define a 'data' key");
374 }
375 RooArgSet varlist;
376 tool->getObservables(p["data"], name, varlist);
377 RooDataHist *dh = dynamic_cast<RooDataHist *>(tool->workspace()->embeddedData(name.c_str()));
378 if (!dh) {
379 auto dhForImport = tool->readBinnedData(p["data"], name, varlist);
380 tool->workspace()->import(*dhForImport, RooFit::Silence(true), RooFit::Embedded());
381 dh = static_cast<RooDataHist *>(tool->workspace()->embeddedData(dhForImport->GetName()));
382 }
383 RooHistFunc hf(name.c_str(), name.c_str(), *(dh->get()), *dh);
385 return true;
386 }
387};
388} // namespace
389
390#include <RooBinSamplingPdf.h>
391
392namespace {
393class RooBinSamplingPdfStreamer : public RooJSONFactoryWSTool::Exporter {
394public:
395 std::string const &key() const override
396 {
397 static const std::string keystring = "binsampling";
398 return keystring;
399 }
400 bool exportObject(RooJSONFactoryWSTool *, const RooAbsArg *func, JSONNode &elem) const override
401 {
402 const RooBinSamplingPdf *pdf = static_cast<const RooBinSamplingPdf *>(func);
403 elem["type"] << key();
404 elem["pdf"] << pdf->pdf().GetName();
405 elem["observable"] << pdf->observable().GetName();
406 elem["epsilon"] << pdf->epsilon();
407 return true;
408 }
409};
410} // namespace
411
412#include <RooProdPdf.h>
413
414namespace {
415class RooProdPdfStreamer : public RooJSONFactoryWSTool::Exporter {
416public:
417 std::string const &key() const override
418 {
419 static const std::string keystring = "pdfprod";
420 return keystring;
421 }
422 bool exportObject(RooJSONFactoryWSTool *, const RooAbsArg *func, JSONNode &elem) const override
423 {
424 const RooProdPdf *pdf = static_cast<const RooProdPdf *>(func);
425 elem["type"] << key();
426 auto &factors = elem["pdfs"];
427 for (const auto &f : pdf->pdfList()) {
428 factors.append_child() << f->GetName();
429 }
430 return true;
431 }
432};
433} // namespace
434
435#include <RooGenericPdf.h>
436
437namespace {
438class RooGenericPdfStreamer : public RooJSONFactoryWSTool::Exporter {
439public:
440 std::string const &key() const override
441 {
442 static const std::string keystring = "genericpdf";
443 return keystring;
444 }
445 bool exportObject(RooJSONFactoryWSTool *, const RooAbsArg *func, JSONNode &elem) const override
446 {
447 const RooGenericPdf *pdf = static_cast<const RooGenericPdf *>(func);
448 elem["type"] << key();
449 elem["formula"] << pdf->expression();
450 auto &factors = elem["dependents"];
451 for (const auto &f : pdf->dependents()) {
452 factors.append_child() << f->GetName();
453 }
454 return true;
455 }
456};
457} // namespace
458
459#include <RooBinWidthFunction.h>
460
461namespace {
462class RooBinWidthFunctionStreamer : public RooJSONFactoryWSTool::Exporter {
463public:
464 std::string const &key() const override
465 {
466 static const std::string keystring = "binwidth";
467 return keystring;
468 }
469 bool exportObject(RooJSONFactoryWSTool *, const RooAbsArg *func, JSONNode &elem) const override
470 {
471 const RooBinWidthFunction *pdf = static_cast<const RooBinWidthFunction *>(func);
472 elem["type"] << key();
473 elem["histogram"] << pdf->histFunc().GetName();
474 elem["divideByBinWidth"] << pdf->divideByBinWidth();
475 return true;
476 }
477};
478} // namespace
479
480#include <RooFormulaVar.h>
481
482namespace {
483class RooFormulaVarStreamer : public RooJSONFactoryWSTool::Exporter {
484public:
485 std::string const &key() const override
486 {
487 static const std::string keystring = "formulavar";
488 return keystring;
489 }
490 bool exportObject(RooJSONFactoryWSTool *, const RooAbsArg *func, JSONNode &elem) const override
491 {
492 const RooFormulaVar *var = static_cast<const RooFormulaVar *>(func);
493 elem["type"] << key();
494 elem["formula"] << var->expression();
495 auto &factors = elem["dependents"];
496 for (const auto &f : var->dependents()) {
497 factors.append_child() << f->GetName();
498 }
499 return true;
500 }
501};
502} // namespace
503
504///////////////////////////////////////////////////////////////////////////////////////////////////////
505// instantiate all importers and exporters
506///////////////////////////////////////////////////////////////////////////////////////////////////////
507
508namespace {
510
511 using Tool = RooJSONFactoryWSTool;
512
513 Tool::registerImporter<RooProdPdfFactory>("pdfprod", false);
514 Tool::registerImporter<RooGenericPdfFactory>("genericpdf", false);
515 Tool::registerImporter<RooFormulaVarFactory>("formulavar", false);
516 Tool::registerImporter<RooBinSamplingPdfFactory>("binsampling", false);
517 Tool::registerImporter<RooAddPdfFactory>("pdfsum", false);
518 Tool::registerImporter<RooHistFuncFactory>("histogram", false);
519 Tool::registerImporter<RooSimultaneousFactory>("simultaneous", false);
520 Tool::registerImporter<RooBinWidthFunctionFactory>("binwidth", false);
521 Tool::registerImporter<RooRealSumPdfFactory>("sumpdf", false);
522
523 Tool::registerExporter<RooBinWidthFunctionStreamer>(RooBinWidthFunction::Class(), false);
524 Tool::registerExporter<RooProdPdfStreamer>(RooProdPdf::Class(), false);
525 Tool::registerExporter<RooSimultaneousStreamer>(RooSimultaneous::Class(), false);
526 Tool::registerExporter<RooBinSamplingPdfStreamer>(RooBinSamplingPdf::Class(), false);
527 Tool::registerExporter<RooHistFuncStreamer>(RooHistFunc::Class(), false);
528 Tool::registerExporter<RooGenericPdfStreamer>(RooGenericPdf::Class(), false);
529 Tool::registerExporter<RooFormulaVarStreamer>(RooFormulaVar::Class(), false);
530 Tool::registerExporter<RooRealSumPdfStreamer>(RooRealSumPdf::Class(), false);
531
532)
533} // namespace
#define d(i)
Definition RSha256.hxx:102
#define f(i)
Definition RSha256.hxx:104
#define c(i)
Definition RSha256.hxx:101
char name[80]
Definition TGX11.cxx:110
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition RooAbsArg.h:69
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
virtual void Print(Option_t *options=0) const
Print the object to the defaultPrintStream().
Definition RooAbsArg.h:337
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
const char * GetName() const
Returns name of object.
@ CanBeExtended
Definition RooAbsPdf.h:256
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition RooAbsReal.h:64
TH1 * createHistogram(const char *varNameList, Int_t xbins=0, Int_t ybins=0, Int_t zbins=0) const
Create and fill a ROOT histogram TH1, TH2 or TH3 with the values of this function for the variables w...
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
Definition RooAddPdf.h:32
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:35
The RooBinSamplingPdf is supposed to be used as an adapter between a continuous PDF and a binned dist...
double epsilon() const
const RooAbsPdf & pdf() const
const RooAbsReal & observable() const
RooBinWidthFunction is a class that returns the bin width (or volume) given a RooHistFunc.
const RooHistFunc & histFunc() const
RooCategory is an object to represent discrete states.
Definition RooCategory.h:27
The RooDataHist is a container class to hold N-dimensional binned data.
Definition RooDataHist.h:45
const RooArgSet * get() const override
Get bin centre of current bin.
Definition RooDataHist.h:84
virtual std::string val() const =0
virtual bool has_child(std::string const &) const =0
virtual bool val_bool() const
A RooFormulaVar is a generic implementation of a real-valued object, which takes a RooArgList of serv...
const char * expression() const
RooGenericPdf is a concrete implementation of a probability density function, which takes a RooArgLis...
const char * expression() const
RooHistFunc implements a real-valued function sampled from a multidimensional histogram.
Definition RooHistFunc.h:30
RooDataHist & dataHist()
Return RooDataHist that is represented.
Definition RooHistFunc.h:40
virtual std::string const & key() const =0
virtual bool exportObject(RooJSONFactoryWSTool *, const RooAbsArg *, RooFit::Experimental::JSONNode &) const
virtual bool autoExportDependants() const
virtual bool importFunction(RooJSONFactoryWSTool *, const RooFit::Experimental::JSONNode &) const
virtual bool importPdf(RooJSONFactoryWSTool *, const RooFit::Experimental::JSONNode &) const
When using RooFit, statistical models can be conveniently handled and stored as a RooWorkspace.
static void exportHistogram(const TH1 &h, RooFit::Experimental::JSONNode &n, const std::vector< std::string > &obsnames, const TH1 *errH=0, bool writeObservables=true, bool writeErrors=true)
T * request(const std::string &objname, const std::string &requestAuthor)
std::ostream & log(int level) const
void exportObject(const RooAbsArg *func, RooFit::Experimental::JSONNode &n)
static std::string concat(const T *items, const std::string &sep=",")
static std::string name(const RooFit::Experimental::JSONNode &n)
static std::vector< std::string > names(const T *items)
std::unique_ptr< RooDataHist > readBinnedData(const RooFit::Experimental::JSONNode &n, const std::string &namecomp, RooArgList observables)
void getObservables(const RooFit::Experimental::JSONNode &n, const std::string &obsnamecomp, RooArgSet &out)
static void error(const char *s)
void importFunction(const RooFit::Experimental::JSONNode &n, bool isPdf)
RooProdPdf is an efficient implementation of a product of PDFs of the form.
Definition RooProdPdf.h:33
The class RooRealSumPdf implements a PDF constructed from a sum of functions:
virtual ExtendMode extendMode() const
Returns ability of PDF to provide extended likelihood terms.
RooRealVar represents a variable that can be changed from the outside.
Definition RooRealVar.h:39
RooSimultaneous facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
const RooAbsCategoryLValue & indexCat() const
RooAbsPdf * getPdf(const char *catName) const
Return the p.d.f associated with the given index category name.
RooAbsData * embeddedData(const char *name) const
Retrieve dataset (binned or unbinned) with given name. A null pointer is returned if not found.
Bool_t import(const RooAbsArg &arg, const RooCmdArg &arg1=RooCmdArg(), const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg(), const RooCmdArg &arg9=RooCmdArg())
Import a RooAbsArg object, e.g.
TObject * obj(const char *name) const
Return any type of object (RooAbsArg, RooAbsData or generic object) with given name)
virtual const char * GetName() const
Returns name of object.
Definition TNamed.h:47
Mother of all ROOT objects.
Definition TObject.h:41
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition TObject.cxx:515
Basic string class.
Definition TString.h:136
RooCmdArg RecycleConflictNodes(Bool_t flag=kTRUE)
RooCmdArg Embedded(Bool_t flag=kTRUE)
RooCmdArg Silence(Bool_t flag=kTRUE)
#define STATIC_EXECUTE(MY_CODE)
REAL epsilon
Definition triangle.c:618