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