54 : _setIter( _set.createIterator() )
69 , _set(
"!set",
"set of components",this)
70 , _setIter( _set.createIterator() )
75 while((comp = (
RooAbsArg*)inputIter->Next())) {
78 <<
" is not of type RooAbsReal" << endl ;
107 , _set(
"!set",
"set of components",this)
108 , _setIter( _set.createIterator() )
116 std::unique_ptr<TIterator> inputIter1( sumSet1.
createIterator() );
117 std::unique_ptr<TIterator> inputIter2( sumSet2.
createIterator() );
119 while((comp1 = (
RooAbsArg*)inputIter1->Next())) {
122 <<
" in first list is not of type RooAbsReal" << endl ;
128 <<
" in first list is not of type RooAbsReal" << endl ;
134 _name.
Append(comp1->GetName());
155 , _set(
"!set",this,other._set)
156 , _setIter( _set.createIterator() )
157 , _cacheMgr(other._cacheMgr,this)
180 for (
const auto arg :
_set) {
181 const auto comp =
static_cast<RooAbsReal*
>(arg);
220 if (nllArg && !chi2Arg) {
222 <<
") Summation contains a RooNLLVar, using its error level" << endl ;
224 }
else if (chi2Arg && !nllArg) {
226 <<
") Summation contains a RooChi2Var, using its error level" << endl ;
228 }
else if (!nllArg && !chi2Arg) {
230 <<
"Summation contains neither RooNLLVar nor RooChi2Var server, using default level of 1.0" << endl ;
233 <<
"Summation contains BOTH RooNLLVar and RooChi2Var server, using default level of 1.0" << endl ;
278 if (!
first) { os <<
" + " ;
291 analVars.
add(allVars);
294 Int_t sterileIndex(-1);
336 while ( (
I=(
RooAbsReal*)iter->Next() ) != 0 ) result +=
I->getVal();
347 std::list<Double_t>* sumBinB = 0 ;
355 std::list<Double_t>* funcBinB = func->
binBoundaries(obs,xlo,xhi) ;
364 std::list<Double_t>* newSumBinB =
new std::list<Double_t>(sumBinB->size()+funcBinB->size()) ;
367 merge(funcBinB->begin(),funcBinB->end(),sumBinB->begin(),sumBinB->end(),newSumBinB->begin()) ;
372 sumBinB = newSumBinB ;
380 std::list<Double_t>::iterator new_end = unique(sumBinB->begin(),sumBinB->end()) ;
381 sumBinB->erase(new_end,sumBinB->end()) ;
411 std::list<Double_t>* sumHint = 0 ;
430 std::list<Double_t>* newSumHint =
new std::list<Double_t>(sumHint->size()+funcHint->size()) ;
433 merge(funcHint->begin(),funcHint->end(),sumHint->begin(),sumHint->end(),newSumHint->begin()) ;
437 sumHint = newSumHint ;
445 std::list<Double_t>::iterator new_end = unique(sumHint->begin(),sumHint->end()) ;
446 sumHint->erase(new_end,sumHint->end()) ;
static RooMathCoreReg dummy
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
RooArgSet * getParameters(const RooAbsData *data, Bool_t stripDisconnected=kTRUE) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
RooArgSet * getComponents() const
RooAbsCacheElement is the abstract base class for objects to be stored in RooAbsCache cache manager o...
RooFIter fwdIterator() const R__SUGGEST_ALTERNATIVE("begin()
One-time forward iterator.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
TIterator * createIterator(Bool_t dir=kIterForward) const R__SUGGEST_ALTERNATIVE("begin()
TIterator-style iteration over contained elements.
RooAbsData is the common abstract base class for binned and unbinned datasets.
const RooArgSet * nset() const
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual Double_t defaultErrorLevel() const
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &, Double_t, Double_t) const
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
virtual void enableOffsetting(Bool_t)
virtual Bool_t setData(RooAbsData &, Bool_t=kTRUE)
RooAbsReal * createIntegral(const RooArgSet &iset, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Create an object that represents the integral of the function over one or more observables listed in ...
virtual Bool_t isBinnedDistribution(const RooArgSet &) const
virtual RooArgList containedArgs(Action)
Return list of all RooAbsArgs in cache element.
RooAddition calculates the sum of a set of RooAbsReal terms, or when constructed with two sets,...
void printMetaArgs(std::ostream &os) const
virtual std::list< Double_t > * plotSamplingHint(RooAbsRealLValue &, Double_t, Double_t) const
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &numVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
Bool_t isBinnedDistribution(const RooArgSet &obs) const
virtual void enableOffsetting(Bool_t)
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Calculate integral internally from appropriate integral cache.
Double_t evaluate() const
Calculate and return current value of self.
RooAddition()
Empty constructor.
RooObjCacheManager _cacheMgr
virtual std::list< Double_t > * binBoundaries(RooAbsRealLValue &, Double_t, Double_t) const
Bool_t setData(RooAbsData &data, Bool_t cloneData=kTRUE)
virtual Double_t defaultErrorLevel() const
Return the default error level for MINUIT error analysis If the addition contains one or more RooNLLV...
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
T * getObj(const RooArgSet *nset, Int_t *sterileIndex=0, const TNamed *isetRangeName=0)
const RooNameSet * nameSet2ByIndex(Int_t index) const
T * getObjByIndex(Int_t index) const
Int_t setObj(const RooArgSet *nset, T *obj, const TNamed *isetRangeName=0)
Class RooChi2Var implements a simple chi^2 calculation from a binned dataset and a PDF.
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::add()
Class RooNLLVar implements a a -log(likelihood) calculation from a dataset and a PDF.
static const TNamed * ptr(const char *stringPtr)
Return a unique TNamed pointer for given C++ string.
RooArgSet * select(const RooArgSet &list) const
Construct a RooArgSet of objects in input 'list' whose names match to those in the internal name list...
A RooProduct represents the product of a given set of RooAbsReal objects.
Iterator abstract base class.
virtual TObject * Next()=0
virtual const char * GetName() const
Returns name of object.
TString & Append(const char *cs)
static long int sum(long int i)