67 _respectCompSelect(
kFALSE),
73 _restartNumIntEngine(
kFALSE),
99 const char* rangeName) :
110 _function(
"!func",
"Function to be integrated",this,
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) ;
311 anIntOKDepList.
add(*arg) ;
316 if (anIntOKDepList.
getSize()>0) {
317 oocxcoutI(&
function,
Integration) <<
function.GetName() <<
": Observables that function forcibly requires to be integrated internally " << anIntOKDepList << endl ;
326 sIter =
function.serverIterator() ;
367 oocxcoutD(&
function,
Integration) <<
function.GetName() <<
" : Observable " << leaf->
GetName() <<
" has parameterized binning, add value dependence of boundary objects rather than shape of leaf" << endl ;
376 << arg->
GetName() <<
" as shape dependent" << endl ;
382 oocxcoutD(&
function,
Integration) <<
function.GetName() <<
": Adding parameter " << leaf->
GetName() <<
" of server " << arg->
GetName() <<
" as value dependent" << endl ;
385 oocxcoutD(&
function,
Integration) <<
function.GetName() <<
": Adding parameter " << leaf->
GetName() <<
" of server " << arg->
GetName() <<
" as shape dependent" << endl ;
405 if ((realArgLV && intDepList.
find(realArgLV->
GetName()) && (realArgLV->
isJacobianOK(intDepList)!=0)) || catArgLV) {
415 TIterator* sIter2 =
function.serverIterator() ;
418 if (arg==otherArg) continue ;
426 if (!overlapOK) depOK=
kFALSE ;
440 oocxcoutI(&
function,
Integration) <<
function.GetName() <<
": Observable " << arg->
GetName() <<
" is suitable for analytical integration (if supported by p.d.f)" << endl ;
506 if (exclLVServers.
getSize()>0) {
508 intDepList.
remove(exclLVBranches) ;
509 intDepList.
add(exclLVServers) ;
524 if (dynamic_cast<RooAbsLValue*>(arg) && arg->
isDerived() && intDepList.
contains(*arg)) {
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 ;
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 " ;
virtual Double_t getMin(const char *name=0) const
virtual const char * GetName() const
Returns name of object.
TIterator * createIterator(Bool_t dir=kIterForward) const
Bool_t initNumIntegrator() const
(Re)Initialize numerical integration engine if necessary.
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, which is interpreted as an OR of 'enum ContentsOptions' values and in the style given by 'enum StyleOption'.
RooArgSet intVars() const
virtual ~RooRealIntegral()
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
virtual Double_t getMax(const char *name=0) const
RooRealProxy _function
Iterator over lvalue observables with Jacobian.
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...
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.
virtual Bool_t isValidReal(Double_t value, Bool_t printError=kFALSE) const
Check if current value is valid.
static RooNumIntFactory & instance()
Static method returning reference to singleton instance of factory.
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
void setAllowComponentSelection(Bool_t allow)
Set component selection to be allowed/forbidden.
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 Bool_t isParameterized() const
virtual void removeAll()
Remove all argument inset using remove(const RooAbsArg&).
Double_t getVal(const RooArgSet *set=0) const
static const char * str(const TNamed *ptr)
Return C++ string corresponding to given TNamed pointer.
Bool_t isValueOrShapeDirtyAndClear() const
Double_t traceEval(const RooArgSet *set) const
Calculate current value of object, with error tracing wrapper.
Bool_t _restartNumIntEngine
virtual void printMultiline(std::ostream &os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const
Structure printing.
Bool_t _respectCompSelect
virtual Double_t jacobianProduct() const
Return product of jacobian terms originating from analytical integration.
virtual Bool_t isLValue() 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.
Double_t calculate(const Double_t *yvec=0)
Calculate integral value with given array of parameter values.
TIterator * valueClientIterator() const
Double_t evaluate() const
Perform the integration and return the result.
virtual TObject * Clone(const char *newname=0) const
Make a clone of an object using the Streamer facility.
const RooArgSet & parameters() const
TIterator * _jacListIter
Iterator over factorizing observables.
Bool_t inhibitDirty() const
Delete watch flag.
virtual Double_t jacobian() const
RooDouble is a minimal implementation of a TObject holding a Double_t value.
const TObject * retrieveObject(const char *name, TClass *tclass, const RooArgSet ¶ms)
Retrieve object from cache that was registered under given name with given parameters, if current parameter values match those that were stored in the registry for this object.
Iterator abstract base class.
friend class RooRealBinding
virtual const char * ClassName() const
Returns name of class to which the object belongs.
RooRealIntegral performs hybrid numerical/analytical integrals of RooAbsReal objects The class perfor...
Int_t numTypes(const char *=0) const
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...
RooAbsIntegrator * _numIntEngine
do not persist
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
RooNumIntConfig * _iconfig
do not persist
The TNamed class is the base class for all named ROOT classes.
virtual Bool_t checkLimits() const
static constexpr double liter
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
virtual RooAbsReal * highBoundFunc() const
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
RooCatType is an auxilary class for RooAbsCategory and defines a a single category state...
virtual RooAbsReal * lowBoundFunc() const
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
RooAbsCategoryLValue is the common abstract base class for objects that represent a discrete value th...
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 Double_t sum() const
Perform summation of list of category dependents to be integrated.
static Int_t getCacheAllNumeric()
Return minimum dimensions of numeric integration for which values are cached.
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...
virtual Bool_t isFundamental() const
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
RooArgSet _saveSum
do not persist
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 ...
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
RooExpensiveObjectCache & expensiveObjectCache() const
TIterator * typeIterator() const
Return iterator over all defined states.
RooAbsArg * first() const
Bool_t getAllowComponentSelection() const
Check if component selection is allowed.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void operModeHook()
Cache all integrals with given numeric dimension.
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 ...
char * Form(const char *fmt,...)
RooRefCountList _clientList
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 const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const =0
OperMode operMode() const
TIterator * _sumCatIter
do not persist
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...
TIterator * serverIterator() const
static void setDirtyInhibit(Bool_t flag)
Control global dirty inhibit mode.
virtual Bool_t forceAnalyticalInt(const RooAbsArg &) const
static Int_t _cacheAllNDim
static unsigned int total
Lightweight RooAbsFunc interface adaptor that binds an analytic integral of a RooAbsReal object (spec...
virtual void setExpensiveObjectCache(RooExpensiveObjectCache &cache)
void autoSelectDirtyMode()
Set appropriate cache operation mode for integral depending on cache operation mode of server objects...
virtual Bool_t isBinnedDistribution(const RooArgSet &) const
virtual Bool_t isJacobianOK(const RooArgSet &depList) const
RooAbsArg * find(const char *name) const
Find object with given name in list.
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...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual Double_t integrate() const
Perform hybrid numerical/analytical integration over all real-valued dependents.
virtual Bool_t addOwned(RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::addOwned()
Bool_t _cacheNum
cache for set of parameters
const char * GetName() const
Returns name of object.
static Bool_t _globalSelectComp
Component selection flag for RooAbsPdf::plotCompOn.
Bool_t dependsOnValue(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0) const
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
static void setCacheAllNumeric(Int_t ndim)
Global switch to cache all integral values that integrate at least ndim dimensions numerically...
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
Bool_t isShapeServer(const RooAbsArg &arg) const
virtual Bool_t redirectServersHook(const RooAbsCollection &newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive)
Intercept server redirects and reconfigure internal object accordingly.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
Bool_t isValueServer(const RooAbsArg &arg) const
virtual Bool_t isDerived() const
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 ...
const RooNumIntConfig * getIntegratorConfig() const
Return the numeric integration configuration used for this object.
RooNameReg is a registry for 'const char*' name.
virtual TObject * Next()=0
RooAbsFunc * _numIntegrand
do not persist
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
RooSuperCategory consolidates several RooAbsCategoryLValue objects into a single category.
Bool_t contains(const RooAbsArg &var) const
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
const RooAbsReal & arg() const
void printMetaArgs(std::ostream &os) const
Customized printing of arguments of a RooRealIntegral to more intuitively reflect the contents of the...
virtual const char * GetName() const
Returns name of object.
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.
TNamed * _rangeName
do not persist
virtual Bool_t inRange(const char *rangeName) const
Return true of all of the input category states are in the given range.
virtual Double_t getValV(const RooArgSet *set=0) const
Return value of object.
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...
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 Double_t analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral. ...