Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooAbsRealLValue.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/**
18\file RooAbsRealLValue.cxx
19\class RooAbsRealLValue
20\ingroup Roofitcore
21
22RooAbsRealLValue is the common abstract base class for objects that represent a
23real value that may appear on the left hand side of an equation ('lvalue').
24Each implementation must provide a setVal() member to allow direct modification
25of the value. RooAbsRealLValue may be derived, but its functional relation
26to other RooAbsArg must be invertible
27
28This class has methods that export the defined range of the lvalue,
29but doesn't hold its values because these limits may be derived
30from limits of client object. The range serve as integration
31range when interpreted as a observable and a boundaries when
32interpreted as a parameter.
33**/
34
35#include "RooAbsRealLValue.h"
36
37#include "RooFit.h"
38#include "RooStreamParser.h"
39#include "RooRandom.h"
40#include "RooPlot.h"
41#include "RooArgList.h"
42#include "RooAbsBinning.h"
43#include "RooBinning.h"
44#include "RooUniformBinning.h"
45#include "RooCmdConfig.h"
46#include "RooAbsData.h"
47#include "RooRealVar.h"
49#include "RooHelpers.h"
50
51#include "TH1.h"
52#include "TH2.h"
53#include "TH3.h"
54
55#include <cmath>
56
57using namespace std;
58
60
61////////////////////////////////////////////////////////////////////////////////
62/// Constructor
63
64RooAbsRealLValue::RooAbsRealLValue(const char *name, const char *title, const char *unit) :
65 RooAbsReal(name, title, 0, 0, unit)
66{
67}
68
69
70
71////////////////////////////////////////////////////////////////////////////////
72/// Copy constructor
73
75 RooAbsReal(other,name), RooAbsLValue(other)
76{
77}
78
79
80////////////////////////////////////////////////////////////////////////////////
81/// Destructor
82
84{
85}
86
87
88
89////////////////////////////////////////////////////////////////////////////////
90/// Return kTRUE if the input value is within our fit range. Otherwise, return
91/// kFALSE and write a clipped value into clippedValPtr if it is non-zero.
92
93Bool_t RooAbsRealLValue::inRange(Double_t value, const char* rangeName, Double_t* clippedValPtr) const
94{
95 // Double_t range = getMax() - getMin() ; // ok for +/-INIFINITY
96 Double_t clippedValue(value);
97 Bool_t isInRange(kTRUE) ;
98
99 const RooAbsBinning& binning = getBinning(rangeName) ;
100 Double_t min = binning.lowBound() ;
101 Double_t max = binning.highBound() ;
102
103 // test this value against our upper fit limit
104 if(!RooNumber::isInfinite(max) && value > (max+1e-6)) {
105 clippedValue = max;
106 isInRange = kFALSE ;
107 }
108 // test this value against our lower fit limit
109 if(!RooNumber::isInfinite(min) && value < min-1e-6) {
110 clippedValue = min ;
111 isInRange = kFALSE ;
112 }
113
114 if (clippedValPtr) *clippedValPtr=clippedValue ;
115
116 return isInRange ;
117}
118
119
120
121////////////////////////////////////////////////////////////////////////////////
122/// Check if given value is valid
123
125{
126 if (!inRange(value,0)) {
127 if (verbose)
128 coutI(InputArguments) << "RooRealVar::isValid(" << GetName() << "): value " << value
129 << " out of range (" << getMin() << " - " << getMax() << ")" << endl ;
130 return kFALSE ;
131 }
132 return kTRUE ;
133}
134
135
136
137////////////////////////////////////////////////////////////////////////////////
138/// Read object contents from given stream
139
140Bool_t RooAbsRealLValue::readFromStream(istream& /*is*/, Bool_t /*compact*/, Bool_t /*verbose*/)
141{
142 return kTRUE ;
143}
144
145
146
147////////////////////////////////////////////////////////////////////////////////
148/// Write object contents to given stream
149
150void RooAbsRealLValue::writeToStream(ostream& /*os*/, Bool_t /*compact*/) const
151{
152}
153
154
155
156////////////////////////////////////////////////////////////////////////////////
157/// Assignment operator from a Double_t
158
160{
161 Double_t clipValue ;
162 // Clip
163 inRange(newValue,0,&clipValue) ;
164 setVal(clipValue) ;
165
166 return *this ;
167}
168
169
170////////////////////////////////////////////////////////////////////////////////
171/// Assignment operator from other RooAbsReal
172
174{
175 return operator=(arg.getVal()) ;
176}
177
178
179
180////////////////////////////////////////////////////////////////////////////////
181/// Create a new RooPlot on the heap with a drawing frame initialized for this
182/// object, but no plot contents. Use x.frame() as the first argument to a
183/// y.plotOn(...) method, for example. The caller is responsible for deleting
184/// the returned object.
185///
186/// <table>
187/// <tr><th> Optional arguments <th>
188/// <tr><td> Range(double lo, double hi) <td> Make plot frame for the specified range
189/// <tr><td> Range(const char* name) <td> Make plot frame for range with the specified name
190/// <tr><td> Bins(Int_t nbins) <td> Set default binning for datasets to specified number of bins
191/// <tr><td> AutoRange(const RooAbsData& data, double margin) <td> Specifies range so that all points in given data set fit
192/// inside the range with given margin.
193/// <tr><td> AutoSymRange(const RooAbsData& data, double margin) <td> Specifies range so that all points in given data set fit
194/// inside the range and center of range coincides with mean of distribution in given dataset.
195/// <tr><td> Name(const char* name) <td> Give specified name to RooPlot object
196/// <tr><td> Title(const char* title) <td> Give specified title to RooPlot object
197/// </table>
198///
199RooPlot* RooAbsRealLValue::frame(const RooCmdArg& arg1, const RooCmdArg& arg2, const RooCmdArg& arg3, const RooCmdArg& arg4,
200 const RooCmdArg& arg5, const RooCmdArg& arg6, const RooCmdArg& arg7, const RooCmdArg& arg8) const
201{
202 RooLinkedList cmdList ;
203 cmdList.Add(const_cast<RooCmdArg*>(&arg1)) ; cmdList.Add(const_cast<RooCmdArg*>(&arg2)) ;
204 cmdList.Add(const_cast<RooCmdArg*>(&arg3)) ; cmdList.Add(const_cast<RooCmdArg*>(&arg4)) ;
205 cmdList.Add(const_cast<RooCmdArg*>(&arg5)) ; cmdList.Add(const_cast<RooCmdArg*>(&arg6)) ;
206 cmdList.Add(const_cast<RooCmdArg*>(&arg7)) ; cmdList.Add(const_cast<RooCmdArg*>(&arg8)) ;
207
208 return frame(cmdList) ;
209}
210
211
212
213////////////////////////////////////////////////////////////////////////////////
214/// Back-end function for named argument frame() method
215
217{
218 // Define configuration for this method
219 RooCmdConfig pc(Form("RooAbsRealLValue::frame(%s)",GetName())) ;
220 pc.defineDouble("min","Range",0,getMin()) ;
221 pc.defineDouble("max","Range",1,getMax()) ;
222 pc.defineInt("nbins","Bins",0,getBins()) ;
223 pc.defineString("rangeName","RangeWithName",0,"") ;
224 pc.defineString("name","Name",0,"") ;
225 pc.defineString("title","Title",0,"") ;
226 pc.defineMutex("Range","RangeWithName","AutoRange") ;
227 pc.defineObject("rangeData","AutoRange",0,0) ;
228 pc.defineDouble("rangeMargin","AutoRange",0,0.1) ;
229 pc.defineInt("rangeSym","AutoRange",0,0) ;
230
231 // Process & check varargs
232 pc.process(cmdList) ;
233 if (!pc.ok(kTRUE)) {
234 return 0 ;
235 }
236
237 // Extract values from named arguments
239 if (pc.hasProcessed("Range")) {
240 xmin = pc.getDouble("min") ;
241 xmax = pc.getDouble("max") ;
242 if (xmin==xmax) {
243 xmin = getMin() ;
244 xmax = getMax() ;
245 }
246 } else if (pc.hasProcessed("RangeWithName")) {
247 const char* rangeName=pc.getString("rangeName",0,kTRUE) ;
248 xmin = getMin(rangeName) ;
249 xmax = getMax(rangeName) ;
250 } else if (pc.hasProcessed("AutoRange")) {
251 auto rangeData = static_cast<RooAbsData*>(pc.getObject("rangeData")) ;
252 const bool error = rangeData->getRange(*this,xmin,xmax);
253 if (error) {
254 xmin = getMin();
255 xmax = getMax();
256 }
257 if (pc.getInt("rangeSym")==0) {
258 // Regular mode: range is from xmin to xmax with given extra margin
259 Double_t margin = pc.getDouble("rangeMargin")*(xmax-xmin) ;
260 xmin -= margin ;
261 xmax += margin ;
262 if (xmin<getMin()) xmin = getMin() ;
263 if (xmin>getMax()) xmax = getMax() ;
264 } else {
265 // Symmetric mode: range is centered at mean of distribution with enough width to include
266 // both lowest and highest point with margin
267 Double_t dmean = rangeData->moment((RooRealVar&)*this,1) ;
268 Double_t ddelta = ((xmax-dmean)>(dmean-xmin)?(xmax-dmean):(dmean-xmin))*(1+pc.getDouble("rangeMargin")) ;
269 xmin = dmean-ddelta ;
270 xmax = dmean+ddelta ;
271 if (xmin<getMin()) xmin = getMin() ;
272 if (xmin>getMax()) xmax = getMax() ;
273 }
274 } else {
275 xmin = getMin() ;
276 xmax = getMax() ;
277 }
278
279 Int_t nbins = pc.getInt("nbins") ;
280 const char* name = pc.getString("name",0,kTRUE) ;
281 const char* title = pc.getString("title",0,kTRUE) ;
282
283 RooPlot* theFrame = new RooPlot(*this,xmin,xmax,nbins) ;
284
285 if (name) {
286 theFrame->SetName(name) ;
287 }
288 if (title) {
289 theFrame->SetTitle(title) ;
290 }
291
292 return theFrame ;
293}
294
295
296
297////////////////////////////////////////////////////////////////////////////////
298/// Create a new RooPlot on the heap with a drawing frame initialized for this
299/// object, but no plot contents. Use x.frame() as the first argument to a
300/// y.plotOn(...) method, for example. The caller is responsible for deleting
301/// the returned object.
302
304{
305 return new RooPlot(*this,xlo,xhi,nbins);
306}
307
308
309
310////////////////////////////////////////////////////////////////////////////////
311/// Create a new RooPlot on the heap with a drawing frame initialized for this
312/// object, but no plot contents. Use x.frame() as the first argument to a
313/// y.plotOn(...) method, for example. The caller is responsible for deleting
314/// the returned object.
315
317{
318 return new RooPlot(*this,xlo,xhi,getBins());
319}
320
321
322
323////////////////////////////////////////////////////////////////////////////////
324/// Create a new RooPlot on the heap with a drawing frame initialized for this
325/// object, but no plot contents. Use x.frame() as the first argument to a
326/// y.plotOn(...) method, for example. The caller is responsible for deleting
327/// the returned object.
328///
329/// The current fit range may not be open ended or empty.
330
332{
333 // Plot range of variable may not be infinite or empty
334 if (getMin()==getMax()) {
335 coutE(InputArguments) << "RooAbsRealLValue::frame(" << GetName() << ") ERROR: empty fit range, must specify plot range" << endl ;
336 return 0 ;
337 }
339 coutE(InputArguments) << "RooAbsRealLValue::frame(" << GetName() << ") ERROR: open ended fit range, must specify plot range" << endl ;
340 return 0 ;
341 }
342
343 return new RooPlot(*this,getMin(),getMax(),nbins);
344}
345
346
347
348////////////////////////////////////////////////////////////////////////////////
349/// Create a new RooPlot on the heap with a drawing frame initialized for this
350/// object, but no plot contents. Use x.frame() as the first argument to a
351/// y.plotOn(...) method, for example. The caller is responsible for deleting
352/// the returned object.
353///
354/// The current fit range may not be open ended or empty.
355
357{
358 // Plot range of variable may not be infinite or empty
359 if (getMin()==getMax()) {
360 coutE(InputArguments) << "RooAbsRealLValue::frame(" << GetName() << ") ERROR: empty fit range, must specify plot range" << endl ;
361 return 0 ;
362 }
364 coutE(InputArguments) << "RooAbsRealLValue::frame(" << GetName() << ") ERROR: open ended fit range, must specify plot range" << endl ;
365 return 0 ;
366 }
367
368 return new RooPlot(*this,getMin(),getMax(),getBins());
369}
370
371
372
373////////////////////////////////////////////////////////////////////////////////
374/// Copy cache of another RooAbsArg to our cache
375
376void RooAbsRealLValue::copyCache(const RooAbsArg* source, Bool_t valueOnly, Bool_t setValDirty)
377{
378 RooAbsReal::copyCache(source,valueOnly,setValDirty) ;
379 setVal(_value) ; // force back-propagation
380}
381
382
383////////////////////////////////////////////////////////////////////////////////
384/// Structure printing
385
386void RooAbsRealLValue::printMultiline(ostream& os, Int_t contents, Bool_t verbose, TString indent) const
387{
388 RooAbsReal::printMultiline(os,contents,verbose,indent);
389 os << indent << "--- RooAbsRealLValue ---" << endl;
390 TString unit(_unit);
391 if(!unit.IsNull()) unit.Prepend(' ');
392 os << indent << " Fit range is [ ";
393 if(hasMin()) {
394 os << getMin() << unit << " , ";
395 }
396 else {
397 os << "-INF , ";
398 }
399 if(hasMax()) {
400 os << getMax() << unit << " ]" << endl;
401 }
402 else {
403 os << "+INF ]" << endl;
404 }
405}
406
407
408
409////////////////////////////////////////////////////////////////////////////////
410/// Set a new value sampled from a uniform distribution over the fit range.
411/// Prints a warning and does nothing if the fit range is not finite.
412
413void RooAbsRealLValue::randomize(const char* rangeName)
414{
415 RooAbsBinning& binning = getBinning(rangeName) ;
416 Double_t min = binning.lowBound() ;
417 Double_t max = binning.highBound() ;
418
420 setValFast(min + RooRandom::uniform()*(max-min));
421 }
422 else {
423 coutE(Generation) << fName << "::" << ClassName() << ":randomize: fails with unbounded fit range" << endl;
424 }
425}
426
427
428
429////////////////////////////////////////////////////////////////////////////////
430/// Set value to center of bin 'ibin' of binning 'rangeName' (or of
431/// default binning if no range is specified)
432
433void RooAbsRealLValue::setBin(Int_t ibin, const char* rangeName)
434{
435 // Check range of plot bin index
436 if (ibin<0 || ibin>=numBins(rangeName)) {
437 coutE(InputArguments) << "RooAbsRealLValue::setBin(" << GetName() << ") ERROR: bin index " << ibin
438 << " is out of range (0," << getBins(rangeName)-1 << ")" << endl ;
439 return ;
440 }
441
442 // Set value to center of requested bin
443 setVal(getBinning(rangeName).binCenter(ibin)) ;
444}
445
446
447
448
449
450////////////////////////////////////////////////////////////////////////////////
451/// Set value to center of bin 'ibin' of binning 'binning'
452
454{
455 // Set value to center of requested bin
456 setVal(binning.binCenter(ibin)) ;
457}
458
459
460
461
462
463////////////////////////////////////////////////////////////////////////////////
464/// Set a new value sampled from a uniform distribution over the fit range.
465/// Prints a warning and does nothing if the fit range is not finite.
466
468{
469 Double_t range= binning.highBound() - binning.lowBound() ;
470 setVal(binning.lowBound() + RooRandom::uniform()*range);
471}
472
473
474
475
476
477////////////////////////////////////////////////////////////////////////////////
478/// Set value to center of bin 'ibin' of binning 'rangeName' (or of
479/// default binning if no range is specified)
480
482{
483 // Set value to center of requested bin
484 setValFast(binning.binCenter(ibin)) ;
485}
486
487
488
489////////////////////////////////////////////////////////////////////////////////
490/// Check if fit range is usable as plot range, i.e. it is neither
491/// open ended, nor empty
492
494{
495 return (hasMin() && hasMax() && (getMin()!=getMax())) ;
496}
497
498
499
500////////////////////////////////////////////////////////////////////////////////
501/// Check if current value is inside range with given name. Multiple comma-separated
502/// ranges can be passed. In this case, it will be checked if the value is in any of
503/// these ranges.
505{
506 const double val = getVal() ;
507 const double epsilon = 1e-8 * fabs(val) ;
508 if (!name || name[0] == '\0') {
509 const auto minMax = getRange(nullptr);
510 return minMax.first - epsilon <= val && val <= minMax.second + epsilon;
511 }
512
513 const auto& ranges = RooHelpers::tokenise(name, ",");
514 return std::any_of(ranges.begin(), ranges.end(), [val,epsilon,this](const std::string& range){
515 const auto minMax = this->getRange(range.c_str());
516 return minMax.first - epsilon <= val && val <= minMax.second + epsilon;
517 });
518}
519
520
521
522////////////////////////////////////////////////////////////////////////////////
523
524TH1* RooAbsRealLValue::createHistogram(const char *name, const RooCmdArg& arg1, const RooCmdArg& arg2,
525 const RooCmdArg& arg3, const RooCmdArg& arg4, const RooCmdArg& arg5,
526 const RooCmdArg& arg6, const RooCmdArg& arg7, const RooCmdArg& arg8) const
527
528 // Create an empty ROOT histogram TH1,TH2 or TH3 suitabe to store information represent by the RooAbsRealLValue
529 //
530 // This function accepts the following arguments
531 //
532 // name -- Name of the ROOT histogram
533 //
534 // Binning(const char* name) -- Apply binning with given name to x axis of histogram
535 // Binning(RooAbsBinning& binning) -- Apply specified binning to x axis of histogram
536 // Binning(int_t nbins) -- Apply specified binning to x axis of histogram
537 // Binning(int_t nbins, double lo, double hi) -- Apply specified binning to x axis of histogram
538 // ConditionalObservables(const RooArgSet& set) -- Do not normalized PDF over following observables when projecting PDF into histogram
539 //
540 // YVar(const RooAbsRealLValue& var,...) -- Observable to be mapped on y axis of ROOT histogram
541 // ZVar(const RooAbsRealLValue& var,...) -- Observable to be mapped on z axis of ROOT histogram
542 //
543 // The YVar() and ZVar() arguments can be supplied with optional Binning() arguments to control the binning of the Y and Z axes, e.g.
544 // createHistogram("histo",x,Binning(-1,1,20), YVar(y,Binning(-1,1,30)), ZVar(z,Binning("zbinning")))
545 //
546 // The caller takes ownership of the returned histogram
547{
549 l.Add((TObject*)&arg1) ; l.Add((TObject*)&arg2) ;
550 l.Add((TObject*)&arg3) ; l.Add((TObject*)&arg4) ;
551 l.Add((TObject*)&arg5) ; l.Add((TObject*)&arg6) ;
552 l.Add((TObject*)&arg7) ; l.Add((TObject*)&arg8) ;
553
554 return createHistogram(name,l) ;
555}
556
557
558
559////////////////////////////////////////////////////////////////////////////////
560/// Create empty 1,2 or 3D histogram
561/// Arguments recognized
562///
563/// YVar() -- RooRealVar defining Y dimension with optional range/binning
564/// ZVar() -- RooRealVar defining Z dimension with optional range/binning
565/// AxisLabel() -- Vertical axis label
566/// Binning() -- Range/Binning specification of X axis
567
568TH1* RooAbsRealLValue::createHistogram(const char *name, const RooLinkedList& cmdList) const
569{
570 // Define configuration for this method
571 RooCmdConfig pc(Form("RooAbsRealLValue::createHistogram(%s)",GetName())) ;
572
573 pc.defineObject("xbinning","Binning",0,0) ;
574 pc.defineString("xbinningName","BinningName",0,"") ;
575 pc.defineInt("nxbins","BinningSpec",0) ;
576 pc.defineDouble("xlo","BinningSpec",0,0) ;
577 pc.defineDouble("xhi","BinningSpec",1,0) ;
578
579 pc.defineObject("yvar","YVar",0,0) ;
580 pc.defineObject("ybinning","YVar::Binning",0,0) ;
581 pc.defineString("ybinningName","YVar::BinningName",0,"") ;
582 pc.defineInt("nybins","YVar::BinningSpec",0) ;
583 pc.defineDouble("ylo","YVar::BinningSpec",0,0) ;
584 pc.defineDouble("yhi","YVar::BinningSpec",1,0) ;
585
586 pc.defineObject("zvar","ZVar",0,0) ;
587 pc.defineObject("zbinning","ZVar::Binning",0,0) ;
588 pc.defineString("zbinningName","ZVar::BinningName",0,"") ;
589 pc.defineInt("nzbins","ZVar::BinningSpec",0) ;
590 pc.defineDouble("zlo","ZVar::BinningSpec",0,0) ;
591 pc.defineDouble("zhi","ZVar::BinningSpec",1,0) ;
592
593 pc.defineString("axisLabel","AxisLabel",0,"Events") ;
594
595 pc.defineDependency("ZVar","YVar") ;
596
597 // Process & check varargs
598 pc.process(cmdList) ;
599 if (!pc.ok(kTRUE)) {
600 return 0 ;
601 }
602
603 // Initialize arrays for call to implementation version of createHistogram
604 const char* axisLabel = pc.getString("axisLabel") ;
605 const RooAbsBinning* binning[3] ;
606 Bool_t ownBinning[3] = { kFALSE, kFALSE, kFALSE } ;
607 RooArgList vars ;
608
609 // Prepare X dimension
610 vars.add(*this) ;
611 if (pc.hasProcessed("Binning")) {
612 binning[0] = static_cast<RooAbsBinning*>(pc.getObject("xbinning")) ;
613 } else if (pc.hasProcessed("BinningName")) {
614 binning[0] = &getBinning(pc.getString("xbinningName",0,kTRUE)) ;
615 } else if (pc.hasProcessed("BinningSpec")) {
616 Double_t xlo = pc.getDouble("xlo") ;
617 Double_t xhi = pc.getDouble("xhi") ;
618 binning[0] = new RooUniformBinning((xlo==xhi)?getMin():xlo,(xlo==xhi)?getMax():xhi,pc.getInt("nxbins")) ;
619 ownBinning[0] = kTRUE ;
620 } else {
621 binning[0] = &getBinning() ;
622 }
623
624 if (pc.hasProcessed("YVar")) {
625 RooAbsRealLValue& yvar = *static_cast<RooAbsRealLValue*>(pc.getObject("yvar")) ;
626 vars.add(yvar) ;
627 if (pc.hasProcessed("YVar::Binning")) {
628 binning[1] = static_cast<RooAbsBinning*>(pc.getObject("ybinning")) ;
629 } else if (pc.hasProcessed("YVar::BinningName")) {
630 binning[1] = &yvar.getBinning(pc.getString("ybinningName",0,kTRUE)) ;
631 } else if (pc.hasProcessed("YVar::BinningSpec")) {
632 Double_t ylo = pc.getDouble("ylo") ;
633 Double_t yhi = pc.getDouble("yhi") ;
634 binning[1] = new RooUniformBinning((ylo==yhi)?yvar.getMin():ylo,(ylo==yhi)?yvar.getMax():yhi,pc.getInt("nybins")) ;
635 ownBinning[1] = kTRUE ;
636 } else {
637 binning[1] = &yvar.getBinning() ;
638 }
639 }
640
641 if (pc.hasProcessed("ZVar")) {
642 RooAbsRealLValue& zvar = *static_cast<RooAbsRealLValue*>(pc.getObject("zvar")) ;
643 vars.add(zvar) ;
644 if (pc.hasProcessed("ZVar::Binning")) {
645 binning[2] = static_cast<RooAbsBinning*>(pc.getObject("zbinning")) ;
646 } else if (pc.hasProcessed("ZVar::BinningName")) {
647 binning[2] = &zvar.getBinning(pc.getString("zbinningName",0,kTRUE)) ;
648 } else if (pc.hasProcessed("ZVar::BinningSpec")) {
649 Double_t zlo = pc.getDouble("zlo") ;
650 Double_t zhi = pc.getDouble("zhi") ;
651 binning[2] = new RooUniformBinning((zlo==zhi)?zvar.getMin():zlo,(zlo==zhi)?zvar.getMax():zhi,pc.getInt("nzbins")) ;
652 ownBinning[2] = kTRUE ;
653 } else {
654 binning[2] = &zvar.getBinning() ;
655 }
656 }
657
658
659 TH1* ret = createHistogram(name, vars, axisLabel, binning) ;
660
661 if (ownBinning[0]) delete binning[0] ;
662 if (ownBinning[1]) delete binning[1] ;
663 if (ownBinning[2]) delete binning[2] ;
664
665 return ret ;
666}
667
668
669
670////////////////////////////////////////////////////////////////////////////////
671/// Create an empty 1D-histogram with appropriate scale and labels for this variable.
672/// This method uses the default plot range which can be changed using the
673/// setPlotMin(),setPlotMax() methods, and the default binning which can be
674/// changed with setPlotBins(). The caller takes ownership of the returned
675/// object and is responsible for deleting it.
676
677TH1F *RooAbsRealLValue::createHistogram(const char *name, const char *yAxisLabel) const
678{
679 // Check if the fit range is usable as plot range
680 if (!fitRangeOKForPlotting()) {
681 coutE(InputArguments) << "RooAbsRealLValue::createHistogram(" << GetName()
682 << ") ERROR: fit range empty or open ended, must explicitly specify range" << endl ;
683 return 0 ;
684 }
685
686 RooArgList list(*this) ;
687 Double_t xlo = getMin() ;
688 Double_t xhi = getMax() ;
689 Int_t nbins = getBins() ;
690
691 // coverity[ARRAY_VS_SINGLETON]
692 return (TH1F*)createHistogram(name, list, yAxisLabel, &xlo, &xhi, &nbins);
693}
694
695
696
697////////////////////////////////////////////////////////////////////////////////
698/// Create an empty 1D-histogram with appropriate scale and labels for this variable.
699/// This method uses the default plot range which can be changed using the
700/// setPlotMin(),setPlotMax() methods, and the default binning which can be
701/// changed with setPlotBins(). The caller takes ownership of the returned
702/// object and is responsible for deleting it.
703
704TH1F *RooAbsRealLValue::createHistogram(const char *name, const char *yAxisLabel, Double_t xlo, Double_t xhi, Int_t nBins) const
705{
706 RooArgList list(*this) ;
707
708 // coverity[ARRAY_VS_SINGLETON]
709 return (TH1F*)createHistogram(name, list, yAxisLabel, &xlo, &xhi, &nBins);
710}
711
712
713
714////////////////////////////////////////////////////////////////////////////////
715/// Create an empty 1D-histogram with appropriate scale and labels for this variable.
716
717TH1F *RooAbsRealLValue::createHistogram(const char *name, const char *yAxisLabel, const RooAbsBinning& bins) const
718{
719 RooArgList list(*this) ;
720 const RooAbsBinning* pbins = &bins ;
721
722 // coverity[ARRAY_VS_SINGLETON]
723 return (TH1F*)createHistogram(name, list, yAxisLabel, &pbins);
724}
725
726
727
728////////////////////////////////////////////////////////////////////////////////
729/// Create an empty 2D-histogram with appropriate scale and labels for this variable (x)
730/// and the specified y variable. This method uses the default plot ranges for x and y which
731/// can be changed using the setPlotMin(),setPlotMax() methods, and the default binning which
732/// can be changed with setPlotBins(). The caller takes ownership of the returned object
733/// and is responsible for deleting it.
734
735TH2F *RooAbsRealLValue::createHistogram(const char *name, const RooAbsRealLValue &yvar, const char *zAxisLabel,
736 Double_t* xlo, Double_t* xhi, Int_t* nBins) const
737{
738 if ((!xlo && xhi) || (xlo && !xhi)) {
739 coutE(InputArguments) << "RooAbsRealLValue::createHistogram(" << GetName()
740 << ") ERROR must specify either no range, or both limits" << endl ;
741 return 0 ;
742 }
743
744 Double_t xlo_fit[2] ;
745 Double_t xhi_fit[2] ;
746 Int_t nbins_fit[2] ;
747
748 Double_t *xlo2 = xlo;
749 Double_t *xhi2 = xhi;
750 Int_t *nBins2 = nBins;
751
752 if (!xlo2) {
753
754 if (!fitRangeOKForPlotting()) {
755 coutE(InputArguments) << "RooAbsRealLValue::createHistogram(" << GetName()
756 << ") ERROR: fit range empty or open ended, must explicitly specify range" << endl ;
757 return 0 ;
758 }
759 if (!yvar.fitRangeOKForPlotting()) {
760 coutE(InputArguments) << "RooAbsRealLValue::createHistogram(" << GetName()
761 << ") ERROR: fit range of " << yvar.GetName() << " empty or open ended, must explicitly specify range" << endl ;
762 return 0 ;
763 }
764
765 xlo_fit[0] = getMin() ;
766 xhi_fit[0] = getMax() ;
767
768 xlo_fit[1] = yvar.getMin() ;
769 xhi_fit[1] = yvar.getMax() ;
770
771 xlo2 = xlo_fit ;
772 xhi2 = xhi_fit ;
773 }
774
775 if (!nBins2) {
776 nbins_fit[0] = getBins() ;
777 nbins_fit[1] = yvar.getBins() ;
778 nBins2 = nbins_fit ;
779 }
780
781
782 RooArgList list(*this,yvar) ;
783 // coverity[OVERRUN_STATIC]
784 return (TH2F*)createHistogram(name, list, zAxisLabel, xlo2, xhi2, nBins2);
785}
786
787
788
789////////////////////////////////////////////////////////////////////////////////
790/// Create an empty 2D-histogram with appropriate scale and labels for this variable (x)
791/// and the specified y variable.
792
794 const char *zAxisLabel, const RooAbsBinning** bins) const
795{
796 RooArgList list(*this,yvar) ;
797 return (TH2F*)createHistogram(name, list, zAxisLabel, bins);
798}
799
800
801
802////////////////////////////////////////////////////////////////////////////////
803/// Create an empty 3D-histogram with appropriate scale and labels for this variable (x)
804/// and the specified y,z variables. This method uses the default plot ranges for x,y,z which
805/// can be changed using the setPlotMin(),setPlotMax() methods, and the default binning which
806/// can be changed with setPlotBins(). The caller takes ownership of the returned object
807/// and is responsible for deleting it.
808
810 const char *tAxisLabel, Double_t* xlo, Double_t* xhi, Int_t* nBins) const
811{
812 if ((!xlo && xhi) || (xlo && !xhi)) {
813 coutE(InputArguments) << "RooAbsRealLValue::createHistogram(" << GetName()
814 << ") ERROR must specify either no range, or both limits" << endl ;
815 return 0 ;
816 }
817
818 Double_t xlo_fit[3] ;
819 Double_t xhi_fit[3] ;
820 Int_t nbins_fit[3] ;
821
822 Double_t *xlo2 = xlo;
823 Double_t *xhi2 = xhi;
824 Int_t* nBins2 = nBins;
825 if (!xlo2) {
826
827 if (!fitRangeOKForPlotting()) {
828 coutE(InputArguments) << "RooAbsRealLValue::createHistogram(" << GetName()
829 << ") ERROR: fit range empty or open ended, must explicitly specify range" << endl ;
830 return 0 ;
831 }
832 if (!yvar.fitRangeOKForPlotting()) {
833 coutE(InputArguments) << "RooAbsRealLValue::createHistogram(" << GetName()
834 << ") ERROR: fit range of " << yvar.GetName() << " empty or open ended, must explicitly specify range" << endl ;
835 return 0 ;
836 }
837 if (!zvar.fitRangeOKForPlotting()) {
838 coutE(InputArguments) << "RooAbsRealLValue::createHistogram(" << GetName()
839 << ") ERROR: fit range of " << zvar.GetName() << " empty or open ended, must explicitly specify range" << endl ;
840 return 0 ;
841 }
842
843 xlo_fit[0] = getMin() ;
844 xhi_fit[0] = getMax() ;
845
846 xlo_fit[1] = yvar.getMin() ;
847 xhi_fit[1] = yvar.getMax() ;
848
849 xlo_fit[2] = zvar.getMin() ;
850 xhi_fit[2] = zvar.getMax() ;
851
852 xlo2 = xlo_fit ;
853 xhi2 = xhi_fit ;
854 }
855
856 if (!nBins2) {
857 nbins_fit[0] = getBins() ;
858 nbins_fit[1] = yvar.getBins() ;
859 nbins_fit[2] = zvar.getBins() ;
860 nBins2 = nbins_fit ;
861 }
862
863 RooArgList list(*this,yvar,zvar) ;
864 return (TH3F*)createHistogram(name, list, tAxisLabel, xlo2, xhi2, nBins2);
865}
866
867
869 const char* tAxisLabel, const RooAbsBinning** bins) const
870{
871 // Create an empty 3D-histogram with appropriate scale and labels for this variable (x)
872 // and the specified y,z variables.
873
874 RooArgList list(*this,yvar,zvar) ;
875 return (TH3F*)createHistogram(name, list, tAxisLabel, bins);
876}
877
878
879
880
881////////////////////////////////////////////////////////////////////////////////
882/// Create 1-, 2- or 3-d ROOT histogram with labels taken
883/// from the variables in 'vars' and the with range and binning
884/// specified in xlo,xhi and nBins. The dimensions of the arrays xlo,xhi,
885/// nBins should match the number of objects in vars.
886
887TH1 *RooAbsRealLValue::createHistogram(const char *name, RooArgList &vars, const char *tAxisLabel,
888 Double_t* xlo, Double_t* xhi, Int_t* nBins)
889{
890 const RooAbsBinning* bin[3] ;
891 Int_t ndim = vars.getSize() ;
892 bin[0] = new RooUniformBinning(xlo[0],xhi[0],nBins[0]) ;
893 bin[1] = (ndim>1) ? new RooUniformBinning(xlo[1],xhi[1],nBins[1]) : 0 ;
894 bin[2] = (ndim>2) ? new RooUniformBinning(xlo[2],xhi[2],nBins[2]) : 0 ;
895
896 TH1* ret = createHistogram(name,vars,tAxisLabel,bin) ;
897
898 if (bin[0]) delete bin[0] ;
899 if (bin[1]) delete bin[1] ;
900 if (bin[2]) delete bin[2] ;
901 return ret ;
902}
903
904
905
906////////////////////////////////////////////////////////////////////////////////
907/// Create a 1,2, or 3D-histogram with appropriate scale and labels.
908/// Binning and ranges are taken from the variables themselves and can be changed by
909/// calling their setPlotMin/Max() and setPlotBins() methods. A histogram can be filled
910/// using RooAbsReal::fillHistogram() or RooTreeData::fillHistogram().
911/// The caller takes ownership of the returned object and is responsible for deleting it.
912
913TH1 *RooAbsRealLValue::createHistogram(const char *name, RooArgList &vars, const char *tAxisLabel, const RooAbsBinning** bins)
914{
915 // Check that we have 1-3 vars
916 Int_t dim= vars.getSize();
917 if(dim < 1 || dim > 3) {
918 oocoutE((TObject*)0,InputArguments) << "RooAbsReal::createHistogram: dimension not supported: " << dim << endl;
919 return 0;
920 }
921
922 // Check that all variables are AbsReals and prepare a name of the form <name>_<var1>_...
923 TString histName(name);
924 histName.Append("_");
925 const RooAbsRealLValue *xyz[3];
926
927 Int_t index;
928 for(index= 0; index < dim; index++) {
929 const RooAbsArg *arg= vars.at(index);
930 xyz[index]= dynamic_cast<const RooAbsRealLValue*>(arg);
931 if(!xyz[index]) {
932 oocoutE((TObject*)0,InputArguments) << "RooAbsRealLValue::createHistogram: variable is not real lvalue: " << arg->GetName() << endl;
933 return 0;
934 }
935 histName.Append("_");
936 histName.Append(arg->GetName());
937 }
938 TString histTitle(histName);
939 histTitle.Prepend("Histogram of ");
940
941 // Create the histogram
942 TH1 *histogram = 0;
943 switch(dim) {
944 case 1:
945 if (bins[0]->isUniform()) {
946 histogram= new TH1F(histName.Data(), histTitle.Data(),
947 bins[0]->numBins(),bins[0]->lowBound(),bins[0]->highBound());
948 } else {
949 histogram= new TH1F(histName.Data(), histTitle.Data(),
950 bins[0]->numBins(),bins[0]->array());
951 }
952 break;
953 case 2:
954 if (bins[0]->isUniform() && bins[1]->isUniform()) {
955 histogram= new TH2F(histName.Data(), histTitle.Data(),
956 bins[0]->numBins(),bins[0]->lowBound(),bins[0]->highBound(),
957 bins[1]->numBins(),bins[1]->lowBound(),bins[1]->highBound());
958 } else {
959 histogram= new TH2F(histName.Data(), histTitle.Data(),
960 bins[0]->numBins(),bins[0]->array(),
961 bins[1]->numBins(),bins[1]->array());
962 }
963 break;
964 case 3:
965 if (bins[0]->isUniform() && bins[1]->isUniform() && bins[2]->isUniform()) {
966 histogram= new TH3F(histName.Data(), histTitle.Data(),
967 bins[0]->numBins(),bins[0]->lowBound(),bins[0]->highBound(),
968 bins[1]->numBins(),bins[1]->lowBound(),bins[1]->highBound(),
969 bins[2]->numBins(),bins[2]->lowBound(),bins[2]->highBound()) ;
970 } else {
971 histogram= new TH3F(histName.Data(), histTitle.Data(),
972 bins[0]->numBins(),bins[0]->array(),
973 bins[1]->numBins(),bins[1]->array(),
974 bins[2]->numBins(),bins[2]->array()) ;
975 }
976 break;
977 }
978 if(!histogram) {
979 oocoutE((TObject*)0,InputArguments) << "RooAbsReal::createHistogram: unable to create a new histogram" << endl;
980 return 0;
981 }
982
983 // Set the histogram coordinate axis labels from the titles of each variable, adding units if necessary.
984 for(index= 0; index < dim; index++) {
985 TString axisTitle(xyz[index]->getTitle(kTRUE));
986 switch(index) {
987 case 0:
988 histogram->SetXTitle(axisTitle.Data());
989 break;
990 case 1:
991 histogram->SetYTitle(axisTitle.Data());
992 break;
993 case 2:
994 histogram->SetZTitle(axisTitle.Data());
995 break;
996 default:
997 assert(0);
998 break;
999 }
1000 }
1001
1002 // Set the t-axis title if given one
1003 if((0 != tAxisLabel) && (0 != strlen(tAxisLabel))) {
1004 TString axisTitle(tAxisLabel);
1005 axisTitle.Append(" / ( ");
1006 for(Int_t index2= 0; index2 < dim; index2++) {
1007 Double_t delta= bins[index2]->averageBinWidth() ; // xyz[index2]->getBins();
1008 if(index2 > 0) axisTitle.Append(" x ");
1009 axisTitle.Append(Form("%g",delta));
1010 if(strlen(xyz[index2]->getUnit())) {
1011 axisTitle.Append(" ");
1012 axisTitle.Append(xyz[index2]->getUnit());
1013 }
1014 }
1015 axisTitle.Append(" )");
1016 switch(dim) {
1017 case 1:
1018 histogram->SetYTitle(axisTitle.Data());
1019 break;
1020 case 2:
1021 histogram->SetZTitle(axisTitle.Data());
1022 break;
1023 case 3:
1024 // not supported in TH1
1025 break;
1026 default:
1027 assert(0);
1028 break;
1029 }
1030 }
1031
1032 return histogram;
1033}
1034
1035
1037{
1038 // Interface function to indicate that this lvalue
1039 // has a unit or constant jacobian terms with respect to
1040 // the observable passed as argument. This default implementation
1041 // always returns true (i.e. jacobian is constant)
1042 return kTRUE ;
1043}
#define e(i)
Definition RSha256.hxx:103
#define coutI(a)
#define oocoutE(o, a)
#define coutE(a)
const Bool_t kFALSE
Definition RtypesCore.h:92
const Bool_t kTRUE
Definition RtypesCore.h:91
#define ClassImp(name)
Definition Rtypes.h:364
static void indent(ostringstream &buf, int indent_level)
char name[80]
Definition TGX11.cxx:110
float xmin
float xmax
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Definition RooAbsArg.h:72
RooAbsBinning is the abstract base class for RooRealVar binning definitions.
virtual Double_t * array() const =0
Int_t numBins() const
Return number of bins.
virtual Double_t highBound() const =0
virtual Double_t binCenter(Int_t bin) const =0
virtual Double_t lowBound() const =0
virtual Double_t averageBinWidth() const =0
Int_t getSize() const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:49
Bool_t getRange(const RooAbsRealLValue &var, Double_t &lowest, Double_t &highest, Double_t marginFrac=0, Bool_t symMode=kFALSE) const
Fill Doubles 'lowest' and 'highest' with the lowest and highest value of observable 'var' in this dat...
Abstract base class for objects that are lvalues, i.e.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual Double_t getMax(const char *name=0) const
Get maximum of currently defined range.
Bool_t hasMax(const char *name=0) const
Check if variable has an upper bound.
void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
Copy cache of another RooAbsArg to our cache.
virtual const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const =0
Retrive binning configuration with given name or default binning.
std::pair< double, double > getRange(const char *name=0) const
Get low and high bound of the variable.
virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) const
Check if given value is valid.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
virtual void setBin(Int_t ibin, const char *rangeName=0)
Set value to center of bin 'ibin' of binning 'rangeName' (or of default binning if no range is specif...
virtual void setVal(Double_t value)=0
Set the current value of the object. Needs to be overridden by implementations.
virtual Int_t numBins(const char *rangeName=0) const
virtual Bool_t readFromStream(std::istream &is, Bool_t compact, Bool_t verbose=kFALSE)
Read object contents from given stream.
virtual void randomize(const char *rangeName=0)
Set a new value sampled from a uniform distribution over the fit range.
RooPlot * frame() const
Create a new RooPlot on the heap with a drawing frame initialized for this object,...
RooPlot * frame(const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Create a new RooPlot on the heap with a drawing frame initialized for this object,...
TH1 * createHistogram(const char *name, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
virtual void writeToStream(std::ostream &os, Bool_t compact) const
Write object contents to given stream.
virtual Bool_t inRange(const char *name) const
Check if current value is inside range with given name.
virtual Bool_t isJacobianOK(const RooArgSet &depList) const
virtual Int_t getBins(const char *name=0) const
Get number of bins of currently defined range.
virtual void setValFast(Double_t value)
RooAbsRealLValue & operator=(const RooAbsRealLValue &)=default
Bool_t hasMin(const char *name=0) const
Check if variable has a lower bound.
virtual ~RooAbsRealLValue()
Destructor.
virtual Double_t getMin(const char *name=0) const
Get miniminum of currently defined range.
Bool_t fitRangeOKForPlotting() const
Check if fit range is usable as plot range, i.e.
virtual void setBinFast(Int_t ibin, const RooAbsBinning &binning)
Set value to center of bin 'ibin' of binning 'rangeName' (or of default binning if no range is specif...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition RooAbsReal.h:61
TString getTitle(Bool_t appendUnit=kFALSE) const
Return this variable's title string.
virtual void copyCache(const RooAbsArg *source, Bool_t valueOnly=kFALSE, Bool_t setValDirty=kTRUE)
Copy the cached value of another RooAbsArg to our cache.
TString _unit
Definition RooAbsReal.h:476
Double_t _value
Definition RooAbsReal.h:475
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
Definition RooAbsReal.h:91
const Text_t * getUnit() const
Definition RooAbsReal.h:146
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:21
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
Definition RooArgList.h:70
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:29
RooCmdArg is a named container for two doubles, two integers two object points and three string point...
Definition RooCmdArg.h:27
Class RooCmdConfig is a configurable parser for RooCmdArg named arguments.
TObject * getObject(const char *name, TObject *obj=0)
Return TObject property registered with name 'name'.
Bool_t defineInt(const char *name, const char *argName, Int_t intNum, Int_t defValue=0)
Define integer property name 'name' mapped to integer in slot 'intNum' in RooCmdArg with name argName...
void defineMutex(const char *argName1, const char *argName2)
Define arguments named argName1 and argName2 mutually exclusive.
Bool_t defineObject(const char *name, const char *argName, Int_t setNum, const TObject *obj=0, Bool_t isArray=kFALSE)
Define TObject property name 'name' mapped to object in slot 'setNum' in RooCmdArg with name argName ...
const char * getString(const char *name, const char *defaultValue="", Bool_t convEmptyToNull=kFALSE)
Return string property registered with name 'name'.
Int_t getInt(const char *name, Int_t defaultValue=0)
Return integer property registered with name 'name'.
Bool_t defineDouble(const char *name, const char *argName, Int_t doubleNum, Double_t defValue=0.)
Define Double_t property name 'name' mapped to Double_t in slot 'doubleNum' in RooCmdArg with name ar...
void defineDependency(const char *refArgName, const char *neededArgName)
Define that processing argument name refArgName requires processing of argument named neededArgName t...
Double_t getDouble(const char *name, Double_t defaultValue=0)
Return Double_t property registered with name 'name'.
Bool_t defineString(const char *name, const char *argName, Int_t stringNum, const char *defValue="", Bool_t appendMode=kFALSE)
Define Double_t property name 'name' mapped to Double_t in slot 'stringNum' in RooCmdArg with name ar...
Bool_t ok(Bool_t verbose) const
Return true of parsing was successful.
Bool_t process(const RooCmdArg &arg)
Process given RooCmdArg.
Bool_t hasProcessed(const char *cmdName) const
Return true if RooCmdArg with name 'cmdName' has been processed.
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
virtual void Add(TObject *arg)
static Int_t isInfinite(Double_t x)
Return true if x is infinite by RooNumBer internal specification.
Definition RooNumber.cxx:58
A RooPlot is a plot frame and a container for graphics objects within that frame.
Definition RooPlot.h:44
void SetTitle(const char *name)
Set the title of the RooPlot to 'title'.
Definition RooPlot.cxx:1242
void SetName(const char *name)
Set the name of the RooPlot to 'name'.
Definition RooPlot.cxx:1220
static Double_t uniform(TRandom *generator=randomGenerator())
Return a number uniformly distributed from (0,1)
Definition RooRandom.cxx:83
RooRealVar represents a variable that can be changed from the outside.
Definition RooRealVar.h:39
RooUniformBinning is an implementation of RooAbsBinning that provides a uniform binning in 'n' bins b...
1-D histogram with a float per channel (see TH1 documentation)}
Definition TH1.h:575
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:58
virtual void SetXTitle(const char *title)
Definition TH1.h:413
virtual void SetZTitle(const char *title)
Definition TH1.h:415
virtual void SetYTitle(const char *title)
Definition TH1.h:414
2-D histogram with a float per channel (see TH1 documentation)}
Definition TH2.h:251
3-D histogram with a float per channel (see TH1 documentation)}
Definition TH3.h:268
TString fName
Definition TNamed.h:32
virtual const char * GetName() const
Returns name of object.
Definition TNamed.h:47
Mother of all ROOT objects.
Definition TObject.h:37
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition TObject.cxx:130
Basic string class.
Definition TString.h:136
const char * Data() const
Definition TString.h:369
TString & Prepend(const char *cs)
Definition TString.h:661
Bool_t IsNull() const
Definition TString.h:407
TString & Append(const char *cs)
Definition TString.h:564
std::vector< std::string > tokenise(const std::string &str, const std::string &delims, bool returnEmptyToken=true)
Tokenise the string by splitting at the characters in delims.
auto * l
Definition textangle.C:4
REAL epsilon
Definition triangle.c:617