Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
xRooNode.h
Go to the documentation of this file.
1/*
2 * Project: xRooFit
3 * Author:
4 * Will Buttinger, RAL 2022
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
13#include "Config.h"
14
15#ifdef XROOFIT_USE_PRAGMA_ONCE
16#pragma once
17#endif
18#if !defined(XROOFIT_XROONODE_H) || defined(XROOFIT_USE_PRAGMA_ONCE)
19#ifndef XROOFIT_USE_PRAGMA_ONCE
20#define XROOFIT_XROONODE_H
21#endif
22
23#include "TNamed.h"
24#include <vector>
25#include <functional>
26
27class RooWorkspace;
28class RooAbsReal;
29class TH1;
30class RooAbsLValue;
31class RooArgList;
32class RooAbsBinning;
33class RooFitResult;
34class TGraph;
35class TAxis;
36class TGListTreeItem;
37class TGListTree;
38class TVirtualPad;
39class TStyle;
40
41#include "xRooFit.h"
42#include "RooLinkedList.h"
43#include "RooCmdArg.h"
44#include "TQObject.h"
45
47
48class xRooNode;
49class xRooNLLVar;
50
51class xRooNode : public TNamed, public std::vector<std::shared_ptr<xRooNode>> {
52
53public:
54 // functions of form value = f(orig,nom,nom_err)
55 // e.g. f = ratio would be simply orig/nom
56 // bool indicates if should be symmetrized
57 static std::map<std::string, std::tuple<std::function<double(double, double, double)>, bool>> auxFunctions;
58 static void SetAuxFunction(const char *title, const std::function<double(double, double, double)> &func,
59 bool symmetrize = false);
60
61 // this function is here because couldn't figure out how to check a null shared_ptr in pyroot
62 static inline bool isNull(const std::shared_ptr<xRooNode> &x) { return x == nullptr; }
63
64 // name of the node needn't match the name of the component that it points to
65 // the name of the node is how it is identified inside its parent
66 // In c++17 for constructors with a Node2& parent, could look at using shared_from_this and if it throws except then
67 // construct make_shared<Node2>(parent)
68 xRooNode(const char *type, const char *name, const char *title = "");
69 template <typename T>
70 xRooNode(const char *name, const char *title) : TNamed(name, title), fComp(std::make_shared<T>())
71 {
72 if (auto x = get<TNamed>(); x) {
73 x->SetNameTitle(name, title);
74 }
75 }
76 xRooNode(const char *name = "", const std::shared_ptr<TObject> &comp = nullptr,
77 const std::shared_ptr<xRooNode> &parent = nullptr);
78 xRooNode(const char *name, const std::shared_ptr<TObject> &comp, const xRooNode &parent)
79 : xRooNode(name, comp, std::make_shared<xRooNode>(parent))
80 {
81 }
82 xRooNode(const char *name, const TObject &comp, const std::shared_ptr<xRooNode> &parent)
83 : xRooNode(name, std::shared_ptr<TObject>(const_cast<TObject *>(&comp), [](TObject *) {}), parent)
84 {
85 } // needed to ensure passing a shared_ptr<Node2> for the parent doesnt become Node2(shared_ptr<Node2>) as parent
86 // because of Node2(shared_ptr<TObject>) constructor
87 xRooNode(const char *name, const TObject &comp, const xRooNode &parent)
88 : xRooNode(name, std::shared_ptr<TObject>(const_cast<TObject *>(&comp), [](TObject *) {}), parent)
89 {
90 }
91 xRooNode(const TObject &comp, const std::shared_ptr<xRooNode> &parent = nullptr);
92 xRooNode(const TObject &comp, const xRooNode &parent) : xRooNode(comp, std::make_shared<xRooNode>(parent)) {}
93 xRooNode(const std::shared_ptr<TObject> &comp, const std::shared_ptr<xRooNode> &parent = nullptr);
94 template <typename T>
95 xRooNode(const std::shared_ptr<T> &comp, const std::shared_ptr<xRooNode> &parent = nullptr)
96 : xRooNode(std::dynamic_pointer_cast<TObject>(comp), parent)
97 {
98 }
99 template <typename T>
100 xRooNode(const std::shared_ptr<T> &comp, const xRooNode &parent)
101 : xRooNode(std::dynamic_pointer_cast<TObject>(comp), std::make_shared<xRooNode>(parent))
102 {
103 }
104 template <typename T>
105 xRooNode(const std::shared_ptr<const T> &comp, const std::shared_ptr<xRooNode> &parent = nullptr)
106 : xRooNode(std::dynamic_pointer_cast<TObject>(std::const_pointer_cast<T>(comp)), parent)
107 {
108 }
109 template <typename T>
110 xRooNode(const std::shared_ptr<const T> &comp, const xRooNode &parent)
111 : xRooNode(std::dynamic_pointer_cast<TObject>(std::const_pointer_cast<T>(comp)),
112 std::make_shared<xRooNode>(parent))
113 {
114 }
115 xRooNode(double value);
116
117 virtual ~xRooNode();
118
119 void SetName(const char *name) override; // *MENU*
120 void SetTitle(const char *title) override; // *MENU*
121
122 const char *GetNodeType() const;
123
124 explicit operator bool() const { return strlen(GetName()) || get(); } // the 'null' Component is the empty string
125
126 // at doesn't do an initial browse of the object, unlike [] operator
127 const std::shared_ptr<xRooNode> &at(size_t idx, bool browseResult = true) const
128 {
129 IsFolder();
130 auto &out = std::vector<std::shared_ptr<xRooNode>>::at(idx);
131 if (browseResult && out)
132 out->browse();
133 return out;
134 }
135 std::shared_ptr<xRooNode> at(const std::string &name, bool browseResult = true) const;
136
137 RooArgList argList() const;
138
139 std::shared_ptr<xRooNode>
140 find(const std::string &name, bool browseResult = true) const; // same as at but return nullptr if not found
141 bool contains(const std::string &name) const; // doesn't trigger a browse of the found object, unlike find
142
143 // most users should use these methods: will do an initial browse and will browse the returned object too
144 std::shared_ptr<xRooNode> operator[](size_t idx) { return at(idx); }
145 std::shared_ptr<xRooNode> operator[](const std::string &name); // will create a new node if not existing, unlike 'at'
146
147 // custom iterator to ensure children are auto-browsed as we iterate through
148 class xRooNodeIterator : public std::vector<std::shared_ptr<xRooNode>>::const_iterator {
149 public:
150 xRooNodeIterator(std::vector<std::shared_ptr<xRooNode>>::const_iterator itr)
151 : std::vector<std::shared_ptr<xRooNode>>::const_iterator(itr)
152 {
153 }
154 std::shared_ptr<xRooNode> const &operator*() const
155 {
156 auto &&out = std::vector<std::shared_ptr<xRooNode>>::const_iterator::operator*();
157 if (out->get() && out->empty())
158 out->browse();
159 return std::move(out);
160 }
161 bool operator!=(xRooNodeIterator const &b) const
162 {
163 const std::vector<std::shared_ptr<xRooNode>>::const_iterator &aa = (*this);
164 const std::vector<std::shared_ptr<xRooNode>>::const_iterator &bb = b;
165 return aa != bb;
166 };
168 {
169 std::vector<std::shared_ptr<xRooNode>>::const_iterator::operator++();
170 return *this;
171 }
172 bool operator==(xRooNodeIterator const &b) const
173 {
174 const std::vector<std::shared_ptr<xRooNode>>::const_iterator &aa = (*this);
175 const std::vector<std::shared_ptr<xRooNode>>::const_iterator &bb = b;
176 return aa == bb;
177 };
178 };
179 auto begin() const -> xRooNodeIterator { return xRooNodeIterator(std::vector<std::shared_ptr<xRooNode>>::begin()); }
180 auto end() const -> xRooNodeIterator { return xRooNodeIterator(std::vector<std::shared_ptr<xRooNode>>::end()); }
181
182 // needed in pyROOT to avoid it creating iterators that follow the 'get' to death
183 // auto begin() const -> decltype(std::vector<std::shared_ptr<xRooNode>>::begin())
184 // {
185 // return std::vector<std::shared_ptr<xRooNode>>::begin();
186 // }
187 // auto end() const -> decltype(std::vector<std::shared_ptr<xRooNode>>::end())
188 // {
189 // return std::vector<std::shared_ptr<xRooNode>>::end();
190 // }
191
192 void Browse(TBrowser *b = nullptr) override; // will browse the children that aren't "null" nodes
193 bool IsFolder() const override;
194 const char *GetIconName() const override;
195 void Inspect() const override; // *MENU*
196
197 xRooNode &browse(); // refreshes child nodes
198
199 std::string GetPath() const;
200 void Print(Option_t *opt = "") const override; // *MENU*
201 // void Reverse() {
202 // std::reverse(std::vector<std::shared_ptr<Node2>>::begin(),std::vector<std::shared_ptr<Node2>>::end()); } // *MENU*
203
204 xRooNode &operator=(const TObject &o);
205
206 TObject *get() const { return fComp.get(); }
207 template <typename T>
208 T *get() const
209 {
210 return dynamic_cast<T *>(get());
211 }
212 TObject *xget() const { return xget<TObject>(); }
213 template <typename T>
214 T *xget() const
215 {
216 for (auto &c : fBrowsables) {
217 if (strcmp(c->GetName(), ".memory") == 0) {
218 return c->get<T>();
219 }
220 }
221 return nullptr;
222 }
223
224 TObject *operator->() const { return get(); }
225
226 RooWorkspace *ws() const;
227 std::shared_ptr<TObject>
228 acquire(const std::shared_ptr<TObject> &arg, bool checkFactory = false, bool mustBeNew = false);
229 // common pattern for 'creating' an acquired object
230 template <typename T, typename... Args>
231 std::shared_ptr<T> acquire(Args &&...args)
232 {
233 return std::dynamic_pointer_cast<T>(acquire(std::make_shared<T>(std::forward<Args>(args)...)));
234 }
235 template <typename T, typename T2, typename... Args>
236 // looser version of above ... first template type says what type to return
237 // allows returning different type to the one requested in T2 (e.g. ok to get RooConstVar when acquire a RooRealVar)
238 std::shared_ptr<T> acquire2(Args &&...args)
239 {
240 return std::dynamic_pointer_cast<T>(acquire(std::make_shared<T2>(std::forward<Args>(args)...)));
241 }
242 template <typename T, typename... Args>
243 std::shared_ptr<T> acquireNew(Args &&...args)
244 {
245 return std::dynamic_pointer_cast<T>(acquire(std::make_shared<T>(std::forward<Args>(args)...), false, true));
246 }
247 std::shared_ptr<TObject> getObject(const std::string &name, const std::string &type = "") const;
248 template <typename T>
249 std::shared_ptr<T> getObject(const std::string &name) const
250 {
251 return std::dynamic_pointer_cast<T>(getObject(name, T::Class_Name()));
252 }
253
254 xRooNode shallowCopy(const std::string &name, std::shared_ptr<xRooNode> parent = nullptr);
255
256 std::shared_ptr<TObject> convertForAcquisition(xRooNode &acquirer, const char *opt = "") const;
257
258 xRooNode vars() const; // obs,pars
259 xRooNode obs() const; // robs and globs
260 xRooNode robs() const; // just the regular obs
261 xRooNode globs() const; // just the global obs
262 xRooNode pars() const; // poi, np, and pp (prespecified pars)
263 xRooNode floats() const; // float poi or np
264 xRooNode consts() const; // just const poi or np
265
266 xRooNode poi() const; // parameters of interest
267 xRooNode np() const; // nuisance parameters (non-poi floatables)
268 xRooNode pp() const; // preset/prespecified parameters
269
270 xRooNode components() const; // additive children
271 xRooNode factors() const; // multiplicative children
272 xRooNode variations() const; // interpolated children (are bins a form of variation?)
273 xRooNode coefs() const;
274 xRooNode coords(bool setVals = true) const; // will move to the coords in the process if setVals=true
275 xRooNode bins() const;
276
277 xRooNode constraints() const; // pdfs other than the node's parent pdf where the deps of this node appear
278 xRooNode datasets()
279 const; // datasets corresponding to this pdf (parent nodes that do observable selections automatically applied)
280
281 xRooNode Replace(const xRooNode &node); // use to replace a node in the tree at the location of this node
282 xRooNode Remove(const xRooNode &child);
284 Add(const xRooNode &child,
285 Option_t *opt =
286 ""); // = components()[child.GetName()]=child; although need to handle case of adding same term multiple times
287 xRooNode Multiply(const xRooNode &child, Option_t *opt = ""); // = factors()[child.GetName()]=child;
288 xRooNode Vary(const xRooNode &child);
289 xRooNode Constrain(const xRooNode &child);
290
291 xRooNode Combine(const xRooNode &rhs); // combine rhs with this node
292
293 xRooNode reduced(const std::string &range = "", bool invert = false)
294 const; // return a node representing reduced version of this node, will use the SetRange to reduce if blank
295
296 // following versions are for the menu in the GUI
297 void _Add_(const char *name, const char *opt); // *MENU*
298 xRooNode _Multiply_(const char *what) { return Multiply(what); } // *MENU*
299 void _Vary_(const char *what); // *MENU*
300 xRooNode _Constrain_(const char *what) { return Constrain(what); } // *MENU*
301
302 void _ShowVars_(bool set = true); // *TOGGLE* *GETTER=_IsShowVars_
303 bool _IsShowVars_() const;
304
305 void SetHidden(bool set = true); // *TOGGLE* *GETTER=IsHidden
306 bool IsHidden() const;
307
308 bool SetContents(const TObject &obj)
309 {
310 operator=(obj);
311 return true;
312 } // populates the node's comp (creating if necessary) from given object
313 bool SetData(const TObject &obj, const char *dataName = "obsData");
314
315 bool SetContent(double value); // uses a RooConst
316 bool SetContent(double value, const char *par, double parVal = 1); // shortcut to setting a variation content
317 bool SetContents(const TObject &obj, const char *par, double parVal)
318 {
319 variations()[TString::Format("%s=%g", par, parVal).Data()]->operator=(obj);
320 return true;
321 }
322 bool SetBinError(int bin, double value);
323 bool SetBinContent(int bin, double value, const char *par = nullptr, double parVal = 1);
324 bool SetBinData(int bin, double value, const char *dataName = "obsData"); // only valid for pdf nodes
325
326 void _SetContent_(double value); // *MENU*
327 void _SetBinContent_(int bin, double value, const char *par = "", double parVal = 1); // *MENU*
328
329 bool SetXaxis(const RooAbsBinning &binning);
330 bool SetXaxis(TAxis *ax);
331 bool SetXaxis(const char *name, const char *title, int nbins, double low, double high);
332 bool SetXaxis(const char *name, const char *title, int nbins, const double *bins);
333 bool SetXaxis(const char *title, int nbins, double low, double high)
334 {
335 return SetXaxis("xaxis", title, nbins, low, high);
336 }
337 bool SetXaxis(const char *title, int nbins, const double *bins) { return SetXaxis("xaxis", title, nbins, bins); }
338 bool SetXaxis(int nbins, double low, double high) { return SetXaxis("xaxis", "", nbins, low, high); }
339 bool SetXaxis(int nbins, const double *bins) { return SetXaxis("xaxis", "", nbins, bins); }
340
341 std::shared_ptr<TStyle> style(TObject *initObject = nullptr, bool autoCreate = true) const;
342
343 TAxis *GetXaxis() const;
344
345 double GetBinData(int bin, const char *dataName = "obsData");
346 double GetBinContent(int bin) const { return GetBinContents(bin, bin).at(0); }
347 std::vector<double> GetBinContents(int binStart = 1, int binEnd = 0) const; // default will get all bins
348 double GetBinError(int bin, const xRooNode &fr = "") const;
349 std::vector<double> GetBinErrors(int binStart = 1, int binEnd = 0, const xRooNode &fr = "") const;
350 std::pair<double, double> IntegralAndError(const xRooNode &fr = "", const char *rangeName = nullptr) const;
351
352 // methods to access default content and error
353 double GetContent() const { return GetBinContent(fBinNumber); }
354 double GetError(const xRooNode &fr = "") const
355 {
356 return (fBinNumber == -1) ? IntegralAndError(fr).second : GetBinError(fBinNumber, fr);
357 }
358 double GetData(const char *dataName = "obsData") { return GetBinData(fBinNumber, dataName); }
359
360 xRooNLLVar nll(const xRooNode &_data, std::initializer_list<RooCmdArg> nllOpts) const;
361 xRooNLLVar nll(const xRooNode &_data, const RooLinkedList &nllOpts) const;
362 xRooNLLVar nll(const xRooNode &_data = "") const; // uses xRooFit::createNLLOption for nllOpts
363
364 xRooNode fitResult(const char *opt = "") const; // todo: make this 'fitResults'
365 void SetFitResult(const RooFitResult *fr = nullptr); // null means will load prefit
366 void SetFitResult(const std::shared_ptr<const RooFitResult> &fr) { SetFitResult(fr.get()); }
367 void SetFitResult(const xRooNode &fr);
368
370 generate(const xRooNode &fr = "", bool expected = false,
371 int seed = 0); // generate a dataset from a pdf node using given fr - if none given will use current fit
372
373 void _fit_(const char *constParValues = ""); // *MENU*
374 void _generate_(const char *name = "", bool expected = false); // *MENU*
375 void _scan_(const char *what = "plr", double nToys = 0, const char *xvar = "", int nPointsX = 0, double lowX = 0,
376 double highX = 0 /*, const char* yvar="", int nBinsY=0, double lowY=0, double highY=0*/,
377 const char *constParValues = ""); // *MENU*
378 // xRooNode fitTo(const char* datasetName) const;
379 // xRooNode fitTo(const xRooNode& _data) const;
380 // xRooNode generate(bool expected=false) const;
381 // void minosScan(const char* parName); // *MENU*
382 // void pllScan(const char* parName, int npoints=100); // *MENU*
383 // void breakdown(const char* parNames, const char* groupNames); // *MENU*
384
385 /*
386 double pll(Node2& data, const char* parName, double value, const Asymptotics::PLLType& pllType =
387 Asymptotics::TwoSided) const;
388 // pair is obs p_sb and p_b, vector is expected -2->+2 sigma p_sb (p_b are known by construction)
389 std::pair<std::pair<double,double>,std::vector<double>> pValue(Node2& data, const char* parName, double value,
390 double alt_value, const Asymptotics::PLLType& pllType); double sigma_mu(Node2& data, const char* parName, double
391 value, double alt_value) const;
392*/
393
394 void Checked(TObject *obj, bool val);
395 void SetChecked(bool val = true) { Checked(this, val); }
396
397 xRooNode histo(const xRooNode &vars = "x", const xRooNode &fr = "", bool content = true, bool errors = true) const;
398 xRooNode filter(const xRooNode &range) const;
399
400 TGraph *BuildGraph(RooAbsLValue *v = nullptr, bool includeZeros = false, TVirtualPad *fromPad = nullptr) const;
401 TH1 *BuildHistogram(RooAbsLValue *v = nullptr, bool empty = false, bool errors = false, int binStart = 1,
402 int binEnd = 0, const xRooNode &fr = "") const;
403 xRooNode mainChild() const;
404 void Draw(Option_t *opt = "") override; // *MENU*
405
406 void SaveAs(const char *filename = "", Option_t *option = "") const override; // *MENU*
407
408 TGListTreeItem *GetTreeItem(TBrowser *b) const;
409 TGListTree *GetListTree(TBrowser *b) const;
410
411 static void Interactive_PLLPlot();
412 static void Interactive_Pull();
414 public:
415 void Interactive_PLLPlot(TVirtualPad *pad, TObject *obj, Int_t x, Int_t y);
417 };
419
420 mutable std::shared_ptr<TObject> fComp; //!
421 int fTimes = 1; // when the same comp appears multiple times in a parent node, this is increased to reflect that
422 int fBinNumber = -1; // used by 'bin' nodes (a node that refers to a specific bin of a parent)
423 std::shared_ptr<xRooNode> fParent; //!
424 std::string fFolder = ""; // folder to put this node in when 'organising' the parent
425
426 void SetRange(const char *range, double low = std::numeric_limits<double>::quiet_NaN(),
427 double high = std::numeric_limits<double>::quiet_NaN()); // *MENU*
428 const char *GetRange() const;
429 mutable std::string fRange; //! only here so can have char* GetRange return so can return nullptr for no range set
430 //! (required for RooCategory)
431
432 mutable std::shared_ptr<TAxis>
433 fXAxis; //! appears that if was fXaxis then dialog box for SetXaxis will take as current value
434
435 mutable bool fInterrupted = false;
436
437 bool fAcquirer = false; // if true, when acquiring will go into objects memory rather than pass onto parent
438 std::shared_ptr<xRooNode> fProvider; //! like a parent but only for use by getObject
439
440 std::shared_ptr<xRooNode> parentPdf() const; // find first parent that is a pdf
441
442 void sterilize() const;
443
444 std::vector<std::shared_ptr<xRooNode>> fBrowsables; // will appear in the browser tree but are not actual children
445 std::function<xRooNode(xRooNode *)> fBrowseOperation; // a way to specify a custom browsing operation
446
447 std::shared_ptr<xRooNode> getBrowsable(const char *name) const;
448
450};
451
453
454#endif // include guard
#define b(i)
Definition RSha256.hxx:100
#define c(i)
Definition RSha256.hxx:101
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:337
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t option
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 filename
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 np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t child
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 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
Binding & operator=(OUT(*fun)(void))
static void GetRange(const char *comments, Double_t &xmin, Double_t &xmax, Double_t &factor)
Parse comments to search for a range specifier of the style: [xmin,xmax] or [xmin,...
This xRooNLLVar object has several special methods, e.g.
Definition xRooNLLVar.h:59
xRooNodeIterator(std::vector< std::shared_ptr< xRooNode > >::const_iterator itr)
Definition xRooNode.h:150
std::shared_ptr< xRooNode > const & operator*() const
Definition xRooNode.h:154
bool operator==(xRooNodeIterator const &b) const
Definition xRooNode.h:172
bool operator!=(xRooNodeIterator const &b) const
Definition xRooNode.h:161
The xRooNode class is designed to wrap over a TObject and provide functionality to aid with interacti...
Definition xRooNode.h:51
xRooNode(const std::shared_ptr< T > &comp, const xRooNode &parent)
Definition xRooNode.h:100
xRooNode _Multiply_(const char *what)
Definition xRooNode.h:298
std::vector< std::shared_ptr< xRooNode > > fBrowsables
Definition xRooNode.h:444
std::shared_ptr< T > acquire(Args &&...args)
Definition xRooNode.h:231
bool SetXaxis(int nbins, double low, double high)
Definition xRooNode.h:338
xRooNode(const std::shared_ptr< const T > &comp, const std::shared_ptr< xRooNode > &parent=nullptr)
Definition xRooNode.h:105
static InteractiveObject * gIntObj
Definition xRooNode.h:418
xRooNode(const std::shared_ptr< T > &comp, const std::shared_ptr< xRooNode > &parent=nullptr)
Definition xRooNode.h:95
xRooNode(const TObject &comp, const xRooNode &parent)
Definition xRooNode.h:92
xRooNode(const char *type, const char *name, const char *title="")
const std::shared_ptr< xRooNode > & at(size_t idx, bool browseResult=true) const
Definition xRooNode.h:127
xRooNLLVar nll(const xRooNode &_data, const RooLinkedList &nllOpts) const
bool SetXaxis(int nbins, const double *bins)
Definition xRooNode.h:339
std::shared_ptr< xRooNode > operator[](size_t idx)
Definition xRooNode.h:144
std::shared_ptr< T > acquireNew(Args &&...args)
Definition xRooNode.h:243
std::shared_ptr< T > acquire2(Args &&...args)
Definition xRooNode.h:238
std::shared_ptr< T > getObject(const std::string &name) const
Definition xRooNode.h:249
bool SetXaxis(const char *title, int nbins, double low, double high)
Definition xRooNode.h:333
xRooNode(const std::shared_ptr< const T > &comp, const xRooNode &parent)
Definition xRooNode.h:110
std::function< xRooNode(xRooNode *)> fBrowseOperation
Definition xRooNode.h:445
std::shared_ptr< xRooNode > fProvider
Definition xRooNode.h:438
std::shared_ptr< TAxis > fXAxis
only here so can have char* GetRange return so can return nullptr for no range set (required for RooC...
Definition xRooNode.h:433
static std::map< std::string, std::tuple< std::function< double(double, double, double)>, bool > > auxFunctions
Definition xRooNode.h:57
xRooNode(const char *name, const std::shared_ptr< TObject > &comp, const xRooNode &parent)
Definition xRooNode.h:78
xRooNode(const char *name, const TObject &comp, const xRooNode &parent)
Definition xRooNode.h:87
bool SetContents(const TObject &obj)
Definition xRooNode.h:308
std::shared_ptr< TObject > fComp
Definition xRooNode.h:420
void SetFitResult(const std::shared_ptr< const RooFitResult > &fr)
Definition xRooNode.h:366
static bool isNull(const std::shared_ptr< xRooNode > &x)
Definition xRooNode.h:62
xRooNode(const char *name, const TObject &comp, const std::shared_ptr< xRooNode > &parent)
Definition xRooNode.h:82
bool SetContent(double value, const char *par, double parVal=1)
xRooNode(const char *name, const char *title)
Definition xRooNode.h:70
double GetBinContent(int bin) const
Definition xRooNode.h:346
auto begin() const -> xRooNodeIterator
Definition xRooNode.h:179
std::shared_ptr< xRooNode > fParent
Definition xRooNode.h:423
auto end() const -> xRooNodeIterator
Definition xRooNode.h:180
xRooNode _Constrain_(const char *what)
Definition xRooNode.h:300
double GetData(const char *dataName="obsData")
Definition xRooNode.h:358
double GetError(const xRooNode &fr="") const
Definition xRooNode.h:354
bool SetXaxis(const char *title, int nbins, const double *bins)
Definition xRooNode.h:337
bool SetContents(const TObject &obj, const char *par, double parVal)
Definition xRooNode.h:317
Abstract base class for RooRealVar binning definitions.
Abstract base class for objects that are lvalues, i.e.
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:59
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
Persistable container for RooFit projects.
Class to manage histogram axis.
Definition TAxis.h:31
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
A list tree is a widget that can contain a number of items arranged in a tree structure.
Definition TGListTree.h:195
A TGraph is an object made of two arrays X and Y with npoints each.
Definition TGraph.h:41
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:58
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition TNamed.cxx:154
Mother of all ROOT objects.
Definition TObject.h:41
This is the ROOT implementation of the Qt object communication mechanism (see also http://www....
Definition TQObject.h:48
const char * Data() const
Definition TString.h:377
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2357
TStyle objects may be created to define special styles.
Definition TStyle.h:29
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
gr SetName("gr")
#define T2
Definition md5.inl:147
TMatrixT< Element > & Add(TMatrixT< Element > &target, Element scalar, const TMatrixT< Element > &source)
Modify addition: target += scalar * source.
#define BEGIN_XROOFIT_NAMESPACE
Definition Config.h:24
#define END_XROOFIT_NAMESPACE
Definition Config.h:25
static const char * what
Definition stlLoader.cc:6
th1 Draw()