67 _respectCompSelect(
kFALSE),
73 _restartNumIntEngine(
kFALSE),
99 const char* rangeName) :
102 _respectCompSelect(
kFALSE),
103 _sumList(
"!sumList",
"Categories to be summed numerically",this,
kFALSE,
kFALSE),
104 _intList(
"!intList",
"Variables to be integrated numerically",this,
kFALSE,
kFALSE),
105 _anaList(
"!anaList",
"Variables to be integrated analytically",this,
kFALSE,
kFALSE),
106 _jacList(
"!jacList",
"Jacobian product term",this,
kFALSE,
kFALSE),
107 _facList(
"!facList",
"Variables independent of function",this,
kFALSE,
kTRUE),
108 _facListIter(_facList.createIterator()),
109 _jacListIter(_jacList.createIterator()),
110 _function(
"!func",
"Function to be integrated",this,
113 _sumCat(
"!sumCat",
"SuperCategory for summation",this,
kFALSE,
kFALSE),
117 _restartNumIntEngine(
kFALSE),
146 <<
function.GetName() <<
" over observables" << depList <<
" with normalization "
147 << (funcNormSet?*funcNormSet:
RooArgSet()) <<
" with range identifier "
148 << (rangeName?rangeName:
"<none>") << endl ;
212 RooArgSet exclLVBranches(
"exclLVBranches") ;
214 function.branchNodeServerList(&branchList) ;
221 if ((realArgLV && (realArgLV->
isJacobianOK(intDepList)!=0)) || catArgLV) {
222 exclLVBranches.
add(*branch) ;
227 branchListVD.
add(*branch) ;
237 RooArgSet exclLVServers(
"exclLVServers") ;
238 exclLVServers.
add(intDepList) ;
254 exclLVServers.
remove(*server) ;
291 if (exclLVServers.
getSize()>0 && !
function.isBinnedDistribution(exclLVBranches)) {
293 intDepList.
remove(exclLVServers) ;
294 intDepList.
add(exclLVBranches) ;
310 if (
function.forceAnalyticalInt(*arg)) {
311 anIntOKDepList.
add(*arg) ;
316 if (anIntOKDepList.
getSize()>0) {
336 if (
function.dependsOnValue(*arg)) {
376 << arg->
GetName() <<
" as shape dependent" << endl ;
381 if (
function.dependsOnValue(*leaf)) {
405 if ((realArgLV && intDepList.
find(realArgLV->
GetName()) && (realArgLV->
isJacobianOK(intDepList)!=0)) || catArgLV) {
418 if (arg==otherArg) continue ;
426 if (!overlapOK) depOK=
kFALSE ;
506 if (exclLVServers.
getSize()>0) {
508 intDepList.
remove(exclLVBranches) ;
509 intDepList.
add(exclLVServers) ;
581 if (numIntDepList.
getSize()>0) {
672 if (!(exclLVBranches.
find(client->
GetName())==client)) {
692 return (numLVServ==1) ;
745 cxcoutI(
NumIntegration) <<
"RooRealIntegral::init(" <<
GetName() <<
") evaluation requires " <<
_intList.
getSize() <<
"-D numeric integration step. Evaluation may be slow, sufficient numeric precision for fitting & minimization is not guaranteed" << endl ;
759 _valid(other._valid),
760 _respectCompSelect(other._respectCompSelect),
761 _sumList(
"!sumList",this,other._sumList),
762 _intList(
"!intList",this,other._intList),
763 _anaList(
"!anaList",this,other._anaList),
764 _jacList(
"!jacList",this,other._jacList),
765 _facList(
"!facList",
"Variables independent of function",this,
kFALSE,
kTRUE),
766 _facListIter(_facList.createIterator()),
767 _jacListIter(_jacList.createIterator()),
768 _function(
"!func",this,other._function),
769 _iconfig(other._iconfig),
770 _sumCat(
"!sumCat",this,other._sumCat),
773 _intOperMode(other._intOperMode),
774 _restartNumIntEngine(
kFALSE),
777 _rangeName(other._rangeName),
923 <<
":evaluate: cannot initialize numerical integrator" << endl;
1029 return fabs(jacProd) ;
1207 os << indent <<
"--- RooRealIntegral ---" << endl;
1208 os << indent <<
" Integrates ";
1210 TString deeper(indent);
1212 os << indent <<
" operating mode is "
1214 os << indent <<
" Summed discrete args are " <<
_sumList << endl ;
1215 os << indent <<
" Numerically integrated args are " <<
_intList << endl;
1216 os << indent <<
" Analytically integrated args using mode " <<
_mode <<
" are " <<
_anaList << endl ;
1217 os << indent <<
" Arguments included in Jacobian are " <<
_jacList << endl ;
1218 os << indent <<
" Factorized arguments are " <<
_facList << endl ;
1219 os << indent <<
" Function normalization set " ;
static unsigned int total
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
RooExpensiveObjectCache & expensiveObjectCache() const
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
virtual Bool_t isLValue() const
void addServer(RooAbsArg &server, Bool_t valueProp=kTRUE, Bool_t shapeProp=kFALSE)
Register another RooAbsArg as a server to us, ie, declare that we depend on it.
Bool_t isValueServer(const RooAbsArg &arg) const
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.
Bool_t isShapeServer(const RooAbsArg &arg) const
void leafNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with all leaf nodes of the arg tree, starting with ourself as top node.
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
static void setDirtyInhibit(Bool_t flag)
Control global dirty inhibit mode.
Bool_t inhibitDirty() const
Delete watch flag.
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
virtual Bool_t isFundamental() const
Bool_t isValueOrShapeDirtyAndClear() const
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Bool_t overlaps(const RooAbsArg &testArg, Bool_t valueOnly=kFALSE) const
Test if any of the nodes of tree are shared with that of the given tree.
virtual Bool_t isDerived() const
TIterator * valueClientIterator() const
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
Bool_t dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
TIterator * serverIterator() const
OperMode operMode() const
RooRefCountList _clientList
virtual Bool_t isParameterized() const
virtual RooAbsReal * highBoundFunc() const
virtual RooAbsReal * lowBoundFunc() const
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
TIterator * typeIterator() const
Return iterator over all defined states.
Int_t numTypes(const char *=0) const
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects.
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
Bool_t contains(const RooAbsArg &var) const
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
RooAbsArg * first() const
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
const char * GetName() const
Returns name of object.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
TIterator * createIterator(Bool_t dir=kIterForward) const
RooAbsArg * find(const char *name) const
Find object with given name in list.
Double_t calculate(const Double_t *yvec=0)
Calculate integral value with given array of parameter values.
virtual Bool_t checkLimits() const
Abstract base class for objects that are lvalues, i.e.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual Double_t getMax(const char *name=0) const
virtual const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const =0
virtual Bool_t isJacobianOK(const RooArgSet &depList) const
virtual Double_t jacobian() const
virtual Double_t getMin(const char *name=0) const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=0) const
Variant of getAnalyticalIntegral that is also passed the normalization set that should be applied to ...
friend class RooRealBinding
Double_t traceEval(const RooArgSet *set) const
Calculate current value of object, with error tracing wrapper.
virtual Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
Double_t getVal(const RooArgSet *set=0) const
Evaluate object. Returns either cached value or triggers a recalculation.
static Bool_t _globalSelectComp
Component selection flag for RooAbsPdf::plotCompOn.
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
RooArgSet is a container object that can hold multiple RooAbsArg objects.
virtual Bool_t addOwned(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
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...
virtual void addClone(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling addOwned() for each element in the source...
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state.
RooDouble is a minimal implementation of a TObject holding a Double_t value.
Bool_t registerObject(const char *ownerName, const char *objectName, TObject &cacheObject, TIterator *paramIter)
Register object associated with given name and given associated parameters with given values in cache...
const TObject * retrieveObject(const char *name, TClass *tclass, const RooArgSet ¶ms)
Retrieve object from cache that was registered under given name with given parameters,...
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::addOwned()
RooNameReg is a registry for 'const char*' name.
static const char * str(const TNamed *ptr)
Return C++ string corresponding to given TNamed pointer.
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
RooAbsIntegrator * createIntegrator(RooAbsFunc &func, const RooNumIntConfig &config, Int_t ndim=0, Bool_t isBinned=kFALSE)
Construct a numeric integrator instance that operates on function 'func' and is configured with 'conf...
static RooNumIntFactory & instance()
Static method returning reference to singleton instance of factory.
virtual void printStream(std::ostream &os, Int_t contents, StyleOption style, TString indent="") const
Print description of object on ostream, printing contents set by contents integer,...
Lightweight RooAbsFunc interface adaptor that binds an analytic integral of a RooAbsReal object (spec...
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects.
RooNumIntConfig * _iconfig
do not persist
virtual void operModeHook()
Cache all integrals with given numeric dimension.
Bool_t getAllowComponentSelection() const
Check if component selection is allowed.
Bool_t servesExclusively(const RooAbsArg *server, const RooArgSet &exclLVBranches, const RooArgSet &allBranches) const
Utility function that returns true if 'object server' is a server to exactly one of the RooAbsArgs in...
RooRealProxy _function
Iterator over lvalue observables with Jacobian.
RooArgSet intVars() const
void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Print the state of this object to the specified output stream.
TIterator * _sumCatIter
do not persist
RooAbsFunc * _numIntegrand
do not persist
static void setCacheAllNumeric(Int_t ndim)
Global switch to cache all integral values that integrate at least ndim dimensions numerically.
RooAbsIntegrator * _numIntEngine
do not persist
virtual ~RooRealIntegral()
void printMetaArgs(std::ostream &os) const
Customized printing of arguments of a RooRealIntegral to more intuitively reflect the contents of the...
const RooArgSet & parameters() const
virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) const
Check if current value is valid.
TNamed * _rangeName
do not persist
TIterator * _jacListIter
Iterator over factorizing observables.
virtual RooAbsReal * createIntegral(const RooArgSet &iset, const RooArgSet *nset=0, const RooNumIntConfig *cfg=0, const char *rangeName=0) const
Create an object that represents the integral of the function over one or more observables listed in ...
virtual Double_t sum() const
Perform summation of list of category dependents to be integrated.
Bool_t _restartNumIntEngine
Bool_t initNumIntegrator() const
(Re)Initialize numerical integration engine if necessary.
virtual Bool_t redirectServersHook(const RooAbsCollection &newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive)
Intercept server redirects and reconfigure internal object accordingly.
virtual Double_t getValV(const RooArgSet *set=0) const
Return value of object.
virtual Double_t jacobianProduct() const
Return product of jacobian terms originating from analytical integration.
Bool_t _cacheNum
cache for set of parameters
static Int_t getCacheAllNumeric()
Return minimum dimensions of numeric integration for which values are cached.
RooArgSet _saveSum
do not persist
static Int_t _cacheAllNDim
void setAllowComponentSelection(Bool_t allow)
Set component selection to be allowed/forbidden.
Double_t evaluate() const
Perform the integration and return the result.
virtual Double_t integrate() const
Perform hybrid numerical/analytical integration over all real-valued dependents.
void autoSelectDirtyMode()
Set appropriate cache operation mode for integral depending on cache operation mode of server objects...
Bool_t _respectCompSelect
const RooAbsReal & arg() const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Overloaded RooArgSet::add() method inserts 'var' into set and registers 'var' as server to owner with...
virtual void removeAll()
Remove all argument inset using remove(const RooAbsArg&).
RooSuperCategory consolidates several RooAbsCategoryLValue objects into a single category.
virtual Bool_t inRange(const char *rangeName) const
Return true of all of the input category states are in the given range.
virtual Bool_t setIndex(Int_t index, Bool_t printError=kTRUE)
Set the value of the super category by specifying the state index code by setting the states of the c...
Iterator abstract base class.
virtual TObject * Next()=0
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetName() const
Returns name of object.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
static constexpr double liter