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