72 _restartNumIntEngine(
kFALSE),
98 const char* rangeName) :
108 _function(
"!func",
"Function to be integrated",this,
144 <<
function.GetName() <<
" over observables" << depList <<
" with normalization " 145 << (funcNormSet?*funcNormSet:
RooArgSet()) <<
" with range identifier " 146 << (rangeName?rangeName:
"<none>") << endl ;
210 RooArgSet exclLVBranches(
"exclLVBranches") ;
212 function.branchNodeServerList(&branchList) ;
219 if ((realArgLV && (realArgLV->
isJacobianOK(intDepList)!=0)) || catArgLV) {
220 exclLVBranches.
add(*branch) ;
225 branchListVD.
add(*branch) ;
235 RooArgSet exclLVServers(
"exclLVServers") ;
236 exclLVServers.
add(intDepList) ;
252 exclLVServers.
remove(*server) ;
289 if (exclLVServers.
getSize()>0 && !
function.isBinnedDistribution(exclLVBranches)) {
291 intDepList.
remove(exclLVServers) ;
292 intDepList.
add(exclLVBranches) ;
309 anIntOKDepList.
add(*arg) ;
314 if (anIntOKDepList.
getSize()>0) {
315 oocxcoutI(&
function,
Integration) <<
function.GetName() <<
": Observables that function forcibly requires to be integrated internally " << anIntOKDepList << endl ;
324 sIter =
function.serverIterator() ;
365 oocxcoutD(&
function,
Integration) <<
function.GetName() <<
" : Observable " << leaf->
GetName() <<
" has parameterized binning, add value dependence of boundary objects rather than shape of leaf" << endl ;
374 << arg->
GetName() <<
" as shape dependent" << endl ;
380 oocxcoutD(&
function,
Integration) <<
function.GetName() <<
": Adding parameter " << leaf->
GetName() <<
" of server " << arg->
GetName() <<
" as value dependent" << endl ;
383 oocxcoutD(&
function,
Integration) <<
function.GetName() <<
": Adding parameter " << leaf->
GetName() <<
" of server " << arg->
GetName() <<
" as shape dependent" << endl ;
403 if ((realArgLV && intDepList.
find(realArgLV->
GetName()) && (realArgLV->
isJacobianOK(intDepList)!=0)) || catArgLV) {
413 TIterator* sIter2 =
function.serverIterator() ;
424 if (!overlapOK) depOK=
kFALSE ;
438 oocxcoutI(&
function,
Integration) <<
function.GetName() <<
": Observable " << arg->
GetName() <<
" is suitable for analytical integration (if supported by p.d.f)" << endl ;
504 if (exclLVServers.
getSize()>0) {
506 intDepList.
remove(exclLVBranches) ;
507 intDepList.
add(exclLVServers) ;
522 if (dynamic_cast<RooAbsLValue*>(arg) && arg->
isDerived() && intDepList.
contains(*arg)) {
579 if (numIntDepList.
getSize()>0) {
670 if (!(exclLVBranches.
find(client->
GetName())==client)) {
690 return (numLVServ==1) ;
743 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 ;
914 <<
":evaluate: cannot initialize numerical integrator" << endl;
1017 return fabs(jacProd) ;
1188 os << indent <<
"--- RooRealIntegral ---" << endl;
1189 os << indent <<
" Integrates ";
1191 TString deeper(indent);
1193 os << indent <<
" operating mode is " 1195 os << indent <<
" Summed discrete args are " <<
_sumList << endl ;
1196 os << indent <<
" Numerically integrated args are " <<
_intList << endl;
1197 os << indent <<
" Analytically integrated args using mode " <<
_mode <<
" are " <<
_anaList << endl ;
1198 os << indent <<
" Arguments included in Jacobian are " <<
_jacList << endl ;
1199 os << indent <<
" Factorized arguments are " <<
_facList << endl ;
1200 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 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.
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
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
if on multiple lines(like in C++). **The " * configuration fragment. * * The "import myobject continue
Parses the configuration file.
virtual RooAbsReal * highBoundFunc() const
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
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...
static void indent(ostringstream &buf, int indent_level)
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.
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. ...