Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooAbsTestStatistic.cxx
Go to the documentation of this file.
1/// \cond ROOFIT_INTERNAL
2
3/*****************************************************************************
4 * Project: RooFit *
5 * Package: RooFitCore *
6 * @(#)root/roofitcore:$Id$
7 * Authors: *
8 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
9 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
10 * *
11 * Copyright (c) 2000-2005, Regents of the University of California *
12 * and Stanford University. All rights reserved. *
13 * *
14 * Redistribution and use in source and binary forms, *
15 * with or without modification, are permitted according to the terms *
16 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
17 *****************************************************************************/
18
19/**
20\file RooAbsTestStatistic.cxx
21\class RooAbsTestStatistic
22\ingroup Roofitcore
23
24Abstract base class for all test
25statistics. Test statistics that evaluate the PDF at each data
26point should inherit from the RooAbsOptTestStatistic class which
27implements several generic optimizations that can be done for such
28quantities.
29
30This test statistic base class organizes calculation of test
31statistic values for RooSimultaneous PDF as a combination of test
32statistic values for the PDF components of the simultaneous PDF and
33organizes multi-processor parallel calculation of test statistic
34values. For the latter, the test statistic value is calculated in
35partitions in parallel executing processes and a posteriori
36combined in the main thread.
37**/
38
39#include "RooAbsTestStatistic.h"
40
41#include "RooAbsPdf.h"
42#include "RooSimultaneous.h"
43#include "RooAbsData.h"
44#include "RooArgSet.h"
45#include "RooRealVar.h"
46#include "RooRealMPFE.h"
47#include "RooErrorHandler.h"
48#include "RooMsgService.h"
50#include "RooFitImplHelpers.h"
52#include "RooCategory.h"
53
54#include "TTimeStamp.h"
55#include "TClass.h"
56#include <string>
57#include <stdexcept>
58
59using std::endl, std::ostream;
60
61////////////////////////////////////////////////////////////////////////////////
62/// Create a test statistic from the given function and the data.
63/// \param[in] name Name of the test statistic
64/// \param[in] title Title (for plotting)
65/// \param[in] real Function to be used for tests
66/// \param[in] data Data to fit function to
67/// \param[in] projDeps A set of projected observables
68/// \param[in] cfg statistic configuration object
69///
70/// cfg contains:
71/// - rangeName Fit data only in range with given name
72/// - addCoefRangeName If not null, all RooAddPdf components of `real` will be instructed to fix their fraction definitions to the given named range.
73/// - nCPU If larger than one, the test statistic calculation will be parallelized over multiple processes.
74/// By default the data is split with 'bulk' partitioning (each process calculates a contiguous block of fraction 1/nCPU
75/// of the data). For binned data this approach may be suboptimal as the number of bins with >0 entries
76/// in each processing block many vary greatly thereby distributing the workload rather unevenly.
77/// - interleave is set to true, the interleave partitioning strategy is used where each partition
78/// i takes all bins for which (ibin % ncpu == i) which is more likely to result in an even workload.
79/// - verbose Be more verbose.
80/// - splitCutRange If true, a different rangeName constructed as rangeName_{catName} will be used
81/// as range definition for each index state of a RooSimultaneous. This means that a different range can be defined
82/// for each category such as
83/// ```
84/// myVariable.setRange("range_pi0", 135, 210);
85/// myVariable.setRange("range_gamma", 50, 210);
86/// ```
87/// if the categories are called "pi0" and "gamma".
88
89namespace {
90
91/// A RooSimultaneous implies a simultaneous fit over the states of its index
92/// category only if the index category is among the data columns. Otherwise,
93/// it acts as a "switch" pdf that evaluates to the component selected by the
94/// current index state (analogous to RooMultiPdf), and the test statistic has
95/// to treat it like any ordinary pdf instead of splitting the data.
97{
98 auto *simPdf = dynamic_cast<RooSimultaneous *>(&real);
99 return simPdf && simPdf->indexCatIsObservable(*data.get());
100}
101
102} // namespace
103
104RooAbsTestStatistic::RooAbsTestStatistic(const char *name, const char *title, RooAbsReal& real, RooAbsData& data,
105 const RooArgSet& projDeps, RooAbsTestStatistic::Configuration const& cfg) :
106 RooAbsReal(name,title),
107 _paramSet("paramSet","Set of parameters",this),
108 _func(&real),
109 _data(&data),
110 _projDeps(static_cast<RooArgSet*>(projDeps.Clone())),
111 _rangeName(cfg.rangeName),
114 _verbose(cfg.verbose),
115 // Determine if RooAbsReal implies a simultaneous fit over channels
116 _gofOpMode{(cfg.nCPU>1 || cfg.nCPU==-1) ? MPMaster : (isSimultaneousFit(real, data) ? SimMaster : Slave)},
117 _nEvents{data.numEntries()},
118 _nCPU(cfg.nCPU != -1 ? cfg.nCPU : 1),
119 _mpinterl(cfg.interleave),
120 _takeGlobalObservablesFromData{cfg.takeGlobalObservablesFromData}
121{
122 // Register all parameters as servers
123 _paramSet.add(*std::unique_ptr<RooArgSet>{real.getParameters(&data)});
124}
125
126
127
128////////////////////////////////////////////////////////////////////////////////
129/// Copy constructor
130
131RooAbsTestStatistic::RooAbsTestStatistic(const RooAbsTestStatistic& other, const char* name) :
133 _paramSet("paramSet","Set of parameters",this),
134 _func(other._func),
135 _data(other._data),
136 _projDeps(static_cast<RooArgSet*>(other._projDeps->Clone())),
137 _rangeName(other._rangeName),
140 _verbose(other._verbose),
141 // Determine if RooAbsReal implies a simultaneous fit over channels
143 : (isSimultaneousFit(*other._func, *other._data) ? SimMaster : Slave)},
144 _nEvents{_data->numEntries()},
145 _nCPU(other._nCPU != -1 ? other._nCPU : 1),
148 _takeGlobalObservablesFromData{other._takeGlobalObservablesFromData},
149 _offset(other._offset),
151{
152 // Our parameters are those of original
153 _paramSet.add(other._paramSet) ;
154}
155
156
157
158////////////////////////////////////////////////////////////////////////////////
159/// Destructor
160
161RooAbsTestStatistic::~RooAbsTestStatistic()
162{
163 if (MPMaster == _gofOpMode && _init) {
164 for (Int_t i = 0; i < _nCPU; ++i) delete _mpfeArray[i];
165 delete[] _mpfeArray ;
166 }
167
168 delete _projDeps ;
169}
170
171
172
173////////////////////////////////////////////////////////////////////////////////
174/// Calculate and return value of test statistic. If the test statistic
175/// is calculated from a RooSimultaneous, the test statistic calculation
176/// is performed separately on each simultaneous p.d.f component and associated
177/// data, and then combined. If the test statistic calculation is parallelized,
178/// partitions are calculated in nCPU processes and combined a posteriori.
179
180double RooAbsTestStatistic::evaluate() const
181{
182 // One-time Initialization
183 if (!_init) {
184 const_cast<RooAbsTestStatistic*>(this)->initialize() ;
185 }
186
187 if (SimMaster == _gofOpMode) {
188 // Evaluate array of owned GOF objects
189 double ret = 0.;
190
192 ret = combinedValue(reinterpret_cast<RooAbsReal**>(const_cast<std::unique_ptr<RooAbsTestStatistic>*>(_gofArray.data())),_gofArray.size());
193 } else {
194 double sum = 0.;
195 double carry = 0.;
196 int i = 0;
197 for (auto& gof : _gofArray) {
198 if (i % _numSets == _setNum || (_mpinterl==RooFit::Hybrid && gof->_mpinterl != RooFit::SimComponents )) {
199 double y = gof->getValV();
200 carry += gof->getCarry();
201 y -= carry;
202 const double t = sum + y;
203 carry = (t - sum) - y;
204 sum = t;
205 }
206 ++i;
207 }
208 ret = sum ;
209 _evalCarry = carry;
210 }
211
212 // Only apply global normalization if SimMaster doesn't have MP master
213 if (numSets()==1) {
214 const double norm = globalNormalization();
215 ret /= norm;
216 _evalCarry /= norm;
217 }
218
219 return ret ;
220
221 } else if (MPMaster == _gofOpMode) {
222
223 // Start calculations in parallel
224 for (Int_t i = 0; i < _nCPU; ++i) _mpfeArray[i]->calculate();
225
226 double sum(0);
227 double carry = 0.;
228 for (Int_t i = 0; i < _nCPU; ++i) {
229 double y = _mpfeArray[i]->getValV();
230 carry += _mpfeArray[i]->getCarry();
231 y -= carry;
232 const double t = sum + y;
233 carry = (t - sum) - y;
234 sum = t;
235 }
236
237 double ret = sum ;
238 _evalCarry = carry;
239
240 const double norm = globalNormalization();
241 ret /= norm;
242 _evalCarry /= norm;
243
244 return ret ;
245
246 } else {
247
248 // Evaluate as straight FUNC
249 Int_t nFirst(0);
250 Int_t nLast(_nEvents);
251 Int_t nStep(1);
252
253 switch (_mpinterl) {
255 nFirst = _nEvents * _setNum / _numSets ;
256 nLast = _nEvents * (_setNum+1) / _numSets ;
257 nStep = 1 ;
258 break;
259
261 nFirst = _setNum ;
262 nLast = _nEvents ;
263 nStep = _numSets ;
264 break ;
265
267 nFirst = 0 ;
268 nLast = _nEvents ;
269 nStep = 1 ;
270 break ;
271
272 case RooFit::Hybrid:
273 throw std::logic_error("this should never happen");
274 break ;
275 }
276
277 double ret = evaluatePartition(nFirst,nLast,nStep);
278
279 if (numSets()==1) {
280 const double norm = globalNormalization();
281 ret /= norm;
282 _evalCarry /= norm;
283 }
284
285 return ret ;
286
287 }
288}
289
290
291
292////////////////////////////////////////////////////////////////////////////////
293/// One-time initialization of the test statistic. Setup
294/// infrastructure for simultaneous p.d.f processing and/or
295/// parallelized processing if requested
296
297bool RooAbsTestStatistic::initialize()
298{
299 if (_init) return false;
300
301 if (MPMaster == _gofOpMode) {
302 initMPMode(_func,_data,_projDeps,_rangeName,_addCoefRangeName) ;
303 } else if (SimMaster == _gofOpMode) {
304 initSimMode(static_cast<RooSimultaneous*>(_func),_data,_projDeps,_rangeName,_addCoefRangeName) ;
305 }
306 _init = true;
307 return false;
308}
309
310
311
312////////////////////////////////////////////////////////////////////////////////
313/// Forward server redirect calls to component test statistics
314
315bool RooAbsTestStatistic::redirectServersHook(const RooAbsCollection& newServerList, bool mustReplaceAll, bool nameChange, bool isRecursive)
316{
317 if (SimMaster == _gofOpMode) {
318 // Forward to slaves
319 for(auto& gof : _gofArray) {
320 gof->recursiveRedirectServers(newServerList,mustReplaceAll,nameChange);
321 }
322 } else if (MPMaster == _gofOpMode&& _mpfeArray) {
323 // Forward to slaves
324 for (Int_t i = 0; i < _nCPU; ++i) {
325 if (_mpfeArray[i]) {
326 _mpfeArray[i]->recursiveRedirectServers(newServerList,mustReplaceAll,nameChange);
327// std::cout << "redirecting servers on " << _mpfeArray[i]->GetName() << std::endl;
328 }
329 }
330 }
332}
333
334
335
336////////////////////////////////////////////////////////////////////////////////
337/// Add extra information on component test statistics when printing
338/// itself as part of a tree structure
339
340void RooAbsTestStatistic::printCompactTreeHook(ostream& os, const char* indent)
341{
342 if (SimMaster == _gofOpMode) {
343 // Forward to slaves
344 os << indent << "RooAbsTestStatistic begin GOF contents" << std::endl ;
345 for (std::size_t i = 0; i < _gofArray.size(); ++i) {
347 indent2 += "[" + std::to_string(i) + "] ";
348 _gofArray[i]->printCompactTreeHook(os,indent2);
349 }
350 os << indent << "RooAbsTestStatistic end GOF contents" << std::endl;
351 } else if (MPMaster == _gofOpMode) {
352 // WVE implement this
353 }
354}
355
356
357
358////////////////////////////////////////////////////////////////////////////////
359/// Set MultiProcessor set number identification of this instance
360
361void RooAbsTestStatistic::setMPSet(Int_t inSetNum, Int_t inNumSets)
362{
365
366 if (SimMaster == _gofOpMode) {
367 // Forward to slaves
368 initialize();
369 for(auto& gof : _gofArray) {
370 gof->setMPSet(inSetNum,inNumSets);
371 }
372 }
373}
374
375
376
377////////////////////////////////////////////////////////////////////////////////
378/// Initialize multi-processor calculation mode. Create component test statistics in separate
379/// processed that are connected to this process through a RooAbsRealMPFE front-end class.
380
381void RooAbsTestStatistic::initMPMode(RooAbsReal* real, RooAbsData* data, const RooArgSet* projDeps, std::string const& rangeName, std::string const& addCoefRangeName)
382{
384
385 // Create proto-goodness-of-fit
386 Configuration cfg;
387 cfg.rangeName = rangeName;
388 cfg.addCoefRangeName = addCoefRangeName;
389 cfg.nCPU = 1;
390 cfg.interleave = _mpinterl;
391 cfg.verbose = _verbose;
392 cfg.splitCutRange = _splitRange;
393 cfg.takeGlobalObservablesFromData = _takeGlobalObservablesFromData;
394 // This configuration parameter is stored in the RooAbsOptTestStatistic.
395 // It would have been cleaner to move the member variable into RooAbsTestStatistic,
396 // but to avoid incrementing the class version we do the dynamic_cast trick.
397 if(auto thisAsRooAbsOptTestStatistic = dynamic_cast<RooAbsOptTestStatistic const*>(this)) {
398 cfg.integrateOverBinsPrecision = thisAsRooAbsOptTestStatistic->_integrateBinsPrecision;
399 }
400 RooAbsTestStatistic* gof = create(GetName(),GetTitle(),*real,*data,*projDeps,cfg);
401 gof->recursiveRedirectServers(_paramSet);
402
403 for (Int_t i = 0; i < _nCPU; ++i) {
404 gof->setMPSet(i,_nCPU);
405 gof->SetName(Form("%s_GOF%d",GetName(),i));
406 gof->SetTitle(Form("%s_GOF%d",GetTitle(),i));
407
408 ccoutD(Eval) << "RooAbsTestStatistic::initMPMode: starting remote server process #" << i << std::endl;
409 _mpfeArray[i] = new RooRealMPFE(Form("%s_%zx_MPFE%d",GetName(),reinterpret_cast<size_t>(this),i),Form("%s_%zx_MPFE%d",GetTitle(),reinterpret_cast<size_t>(this),i),*gof,false);
410 //_mpfeArray[i]->setVerbose(true,true);
411 _mpfeArray[i]->initialize();
412 if (i > 0) {
413 _mpfeArray[i]->followAsSlave(*_mpfeArray[0]);
414 }
415 }
416 _mpfeArray[_nCPU - 1]->addOwnedComponents(*gof);
417 coutI(Eval) << "RooAbsTestStatistic::initMPMode: started " << _nCPU << " remote server process." << std::endl;
418 //cout << "initMPMode --- done" << std::endl ;
419 return ;
420}
421
422
423
424////////////////////////////////////////////////////////////////////////////////
425/// Initialize simultaneous p.d.f processing mode. Strip simultaneous
426/// p.d.f into individual components, split dataset in subset
427/// matching each component and create component test statistics for
428/// each of them.
429
430void RooAbsTestStatistic::initSimMode(RooSimultaneous* simpdf, RooAbsData* data,
431 const RooArgSet* projDeps,
432 std::string const& rangeName, std::string const& addCoefRangeName)
433{
434
435 RooAbsCategoryLValue& simCat = const_cast<RooAbsCategoryLValue&>(simpdf->indexCat());
436
437 std::vector<std::unique_ptr<RooAbsData>> dsetList{const_cast<RooAbsData*>(data)->split(*simpdf,processEmptyDataSets())};
438
439 // Create array of regular fit contexts, containing subset of data and single fitCat PDF
440 for (const auto& catState : simCat) {
441 const std::string& catName = catState.first;
443
444 // If the channel is not in the selected range of the category variable, we
445 // won't create a slave calculator for this channel.
446 if(!rangeName.empty()) {
447 // Only the RooCategory supports ranges, not the other
448 // RooAbsCategoryLValue-derived classes.
449 auto simCatAsRooCategory = dynamic_cast<RooCategory*>(&simCat);
450 if(simCatAsRooCategory && !simCatAsRooCategory->isStateInRange(rangeName.c_str(), catIndex)) {
451 continue;
452 }
453 }
454
455 // Retrieve the PDF for this simCat state
456 RooAbsPdf* pdf = simpdf->getPdf(catName.c_str());
457 auto found = std::find_if(dsetList.begin(), dsetList.end(), [&](auto const &item) {
458 return catName == item->GetName();
459 });
460 RooAbsData *dset = found != dsetList.end() ? found->get() : nullptr;
461
462 if (pdf && dset && (0. != dset->sumEntries() || processEmptyDataSets())) {
463 ccoutI(Fitting) << "RooAbsTestStatistic::initSimMode: creating slave calculator #" << _gofArray.size() << " for state " << catName
464 << " (" << dset->numEntries() << " dataset entries)" << std::endl;
465
466
467 // *** START HERE
468 // WVE HACK determine if we have a RooRealSumPdf and then treat it like a binned likelihood
470 RooAbsReal &actualPdf = binnedInfo.binnedPdf ? *binnedInfo.binnedPdf : *pdf;
471 // WVE END HACK
472 // Below here directly pass binnedPdf instead of PROD(binnedPdf,constraints) as constraints are evaluated elsewhere anyway
473 // and omitting them reduces model complexity and associated handling/cloning times
474 Configuration cfg;
475 cfg.addCoefRangeName = addCoefRangeName;
476 cfg.interleave = _mpinterl;
477 cfg.verbose = _verbose;
478 cfg.splitCutRange = _splitRange;
479 cfg.binnedL = binnedInfo.isBinnedL;
480 cfg.takeGlobalObservablesFromData = _takeGlobalObservablesFromData;
481 // This configuration parameter is stored in the RooAbsOptTestStatistic.
482 // It would have been cleaner to move the member variable into RooAbsTestStatistic,
483 // but to avoid incrementing the class version we do the dynamic_cast trick.
484 if(auto thisAsRooAbsOptTestStatistic = dynamic_cast<RooAbsOptTestStatistic const*>(this)) {
485 cfg.integrateOverBinsPrecision = thisAsRooAbsOptTestStatistic->_integrateBinsPrecision;
486 }
488 cfg.nCPU = _nCPU;
489 _gofArray.emplace_back(create(catName.c_str(),catName.c_str(),actualPdf,*dset,*projDeps,cfg));
490 // *** END HERE
491
492 // Fill per-component split mode with Bulk Partition for now so that Auto will map to bulk-splitting of all components
494 _gofArray.back()->_mpinterl = dset->numEntries()<10 ? RooFit::SimComponents : RooFit::BulkPartition;
495 }
496
497 // Servers may have been redirected between instantiation and (deferred) initialization
498
500 actualPdf.getParameters(dset->get(), actualParams);
503
504 _gofArray.back()->recursiveRedirectServers(selTargetParams);
505 }
506 }
507 for(auto& gof : _gofArray) {
508 gof->setSimCount(_gofArray.size());
509 }
510 coutI(Fitting) << "RooAbsTestStatistic::initSimMode: created " << _gofArray.size() << " slave calculators." << std::endl;
511}
512
513
514////////////////////////////////////////////////////////////////////////////////
515/// Change dataset that is used to given one. If cloneData is true, a clone of
516/// in the input dataset is made. If the test statistic was constructed with
517/// a range specification on the data, the cloneData argument is ignored and
518/// the data is always cloned.
519bool RooAbsTestStatistic::setData(RooAbsData& indata, bool cloneData)
520{
521 // Trigger refresh of likelihood offsets
522 if (isOffsetting()) {
523 enableOffsetting(false);
524 enableOffsetting(true);
525 }
526
527 switch(operMode()) {
528 case Slave:
529 // Delegate to implementation
531 case SimMaster:
532 // Forward to slaves
533 if (indata.canSplitFast()) {
534 for(auto& gof : _gofArray) {
535 RooAbsData* compData = indata.getSimData(gof->GetName());
536 gof->setDataSlave(*compData, cloneData);
537 }
538 } else if (0 == indata.numEntries()) {
539 // For an unsplit empty dataset, simply assign empty dataset to each component
540 for(auto& gof : _gofArray) {
541 gof->setDataSlave(indata, cloneData);
542 }
543 } else {
544 std::vector<std::unique_ptr<RooAbsData>> dlist{indata.split(*static_cast<RooSimultaneous*>(_func), processEmptyDataSets())};
545
546 for(auto& gof : _gofArray) {
547 auto found = std::find_if(dlist.begin(), dlist.end(), [&](auto const &item) {
548 return strcmp(gof->GetName(), item->GetName()) == 0;
549 });
550 RooAbsData *compData = found != dlist.end() ? found->get() : nullptr;
551 if (compData) {
552 gof->setDataSlave(*compData,false,true);
553 } else {
554 coutE(DataHandling) << "RooAbsTestStatistic::setData(" << GetName() << ") ERROR: Cannot find component data for state " << gof->GetName() << std::endl;
555 }
556 }
557 }
558 break;
559 case MPMaster:
560 // Not supported
561 coutF(DataHandling) << "RooAbsTestStatistic::setData(" << GetName() << ") FATAL: setData() is not supported in multi-processor mode" << std::endl;
562 throw std::runtime_error("RooAbsTestStatistic::setData is not supported in MPMaster mode");
563 break;
564 }
565
566 return true;
567}
568
569
570
571void RooAbsTestStatistic::enableOffsetting(bool flag)
572{
573 // Apply internal value offsetting to control numeric precision
574 if (!_init) {
575 const_cast<RooAbsTestStatistic*>(this)->initialize() ;
576 }
577
578 switch(operMode()) {
579 case Slave:
580 _doOffset = flag ;
581 // Clear offset if feature is disabled to that it is recalculated next time it is enabled
582 if (!_doOffset) {
583 _offset = ROOT::Math::KahanSum<double>{0.} ;
584 }
585 setValueDirty() ;
586 break ;
587 case SimMaster:
588 _doOffset = flag;
589 for(auto& gof : _gofArray) {
590 gof->enableOffsetting(flag);
591 }
592 break ;
593 case MPMaster:
594 _doOffset = flag;
595 for (Int_t i = 0; i < _nCPU; ++i) {
596 _mpfeArray[i]->enableOffsetting(flag);
597 }
598 break;
599 }
600}
601
602
603double RooAbsTestStatistic::getCarry() const
604{ return _evalCarry; }
605
606/// \endcond
#define coutI(a)
#define coutF(a)
#define coutE(a)
#define ccoutI(a)
#define ccoutD(a)
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:60
static void indent(ostringstream &buf, int indent_level)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
char name[80]
Definition TGX11.cxx:142
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2570
The Kahan summation is a compensated summation algorithm, which significantly reduces numerical error...
Definition Util.h:141
const_iterator begin() const
const_iterator end() const
Abstract base class for objects that represent a discrete value that can be set from the outside,...
Abstract container object that can hold multiple RooAbsArg objects.
Abstract base class for binned and unbinned datasets.
Definition RooAbsData.h:55
Abstract interface for all probability density functions.
Definition RooAbsPdf.h:32
Abstract base class for objects that represent a real value and implements functionality common to al...
Definition RooAbsReal.h:63
bool redirectServersHook(const RooAbsCollection &newServerList, bool mustReplaceAll, bool nameChange, bool isRecursiveStep) override
Function that is called at the end of redirectServers().
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:24
RooArgSet * selectCommon(const RooAbsCollection &refColl) const
Use RooAbsCollection::selecCommon(), but return as RooArgSet.
Definition RooArgSet.h:154
Object to represent discrete states.
Definition RooCategory.h:28
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
Basic string class.
Definition TString.h:138
Double_t y[n]
Definition legend1.C:17
@ SimComponents
@ BulkPartition
std::string getRangeNameForSimComponent(std::string const &rangeName, bool splitRange, std::string const &catName)
BinnedLOutput getBinnedL(RooAbsPdf const &pdf)
void initialize(typename Architecture_t::Matrix_t &A, EInitialization m)
Definition Functions.h:282
static uint64_t sum(uint64_t i)
Definition Factory.cxx:2335