110 const RooArgSet& projDeps,
const char* rangeName,
const char* addCoefRangeName,
112 RooAbsTestStatistic(name,title,real,indata,projDeps,rangeName, addCoefRangeName, nCPU, interleave, verbose, splitCutRange),
136 initSlave(real,indata,projDeps,rangeName,addCoefRangeName) ;
172 const char* addCoefRangeName)
201 delete projDataDeps ;
231 while((realDep=iter.
next())) {
233 if (realDepRLV && realDepRLV->
isDerived()) {
250 while((arg=iter.
next())) {
254 if (!realReal) continue ;
256 if (!datReal) continue ;
262 <<
"(" << realReal->
getMin() <<
") is smaller than that of " 263 << arg->
GetName() <<
" in the dataset (" << datReal->
getMin() <<
")" << endl ;
270 <<
" is larger than that of " << arg->
GetName() <<
" in the dataset" << endl ;
278 if (rangeName && strlen(rangeName)) {
293 if (rangeName && strlen(rangeName)) {
294 cxcoutI(
Fitting) <<
"RooAbsOptTestStatistic::ctor(" <<
GetName() <<
") constructing test statistic for sub-range named " << rangeName << endl ;
299 while((arg=iter.
next())) {
305 if (!(addCoefRangeName && strlen(addCoefRangeName))) {
347 if (rangeName && strlen(rangeName)) {
352 if (addCoefRangeName && strlen(addCoefRangeName)) {
354 <<
") fixing interpretation of coefficients of any RooAddPdf component to range " << addCoefRangeName << endl ;
358 <<
") fixing interpretation of coefficients of any RooAddPdf to full domain of observables " << endl ;
395 delete projDataDeps ;
399 coutI(
Optimization) <<
"RooAbsOptTestStatistic::ctor(" <<
GetName() <<
") optimizing internal clone of p.d.f for likelihood evaluation." 400 <<
"Lazy evaluation and associated change tracking will disabled for all nodes that depend on observables" << endl ;
457 for (
Int_t i = 0; i <
n; ++i) {
462 carry = (t -
sum) - y;
491 TString indent2(indent) ;
492 indent2 +=
"opt >>" ;
517 <<
") dataset cache is owned by another object, no constant term optimization can be applied" << endl ;
525 <<
") function caching prohibited by test statistic, no constant term optimization is applied" << endl ;
537 <<
") optimizing evaluation of test statistic by finding all nodes in p.d.f that depend exclusively" 538 <<
" on observables and constant parameters and precalculating their values" << endl ;
544 <<
") deactivating optimization of constant terms in test statistic" << endl ;
550 <<
") one ore more parameter were changed from constant to floating or vice versa, " 551 <<
"re-evaluating constant term optimization" << endl ;
558 <<
") the value of one ore more constant parameter were changed re-evaluating constant term optimization" << endl ;
630 if (applyTrackingOpt) {
633 <<
") WARNING Cache-and-track optimization (Optimize level 2) is only available for datasets" 634 <<
" implement in terms of RooVectorDataStore - ignoring this option for current dataset" << endl ;
635 applyTrackingOpt =
kFALSE ;
639 if (applyTrackingOpt) {
644 while((arg=iter.
next())) {
649 trackNodes.
remove(*constNodes) ;
690 actualTrackNodes.
remove(*constNodes) ;
692 if (constNodes->
getSize()<20) {
693 coutI(
Minimization) <<
" The following expressions have been identified as constant and will be precalculated and cached: " << *constNodes << endl ;
695 coutI(
Minimization) <<
" A total of " << constNodes->
getSize() <<
" expressions have been identified as constant and will be precalculated and cached." << endl ;
703 if (actualTrackNodes.
getSize()>0) {
704 if (actualTrackNodes.
getSize()<20) {
705 coutI(
Minimization) <<
" The following expressions will be evaluated in cache-and-track mode: " << actualTrackNodes << endl ;
712 coutI(
Minimization) <<
" A total of " << constNodes->
getSize() <<
" expressions will be evaluated in cache-and-track-mode." << endl ;
771 coutW(
InputArguments) <<
"RooAbsOptTestStatistic::setData(" <<
GetName() <<
") WARNING: test statistic was constructed with range selection on data, " 772 <<
"ignoring request to _not_ clone the input dataset" << endl ;
823 <<
") WARNING: object sealed by creator - access to data is not permitted: " 824 << (notice?
sealNotice():
"<no user notice>") << endl ;
839 <<
") WARNING: object sealed by creator - access to data is not permitted: " 840 << (notice?
sealNotice():
"<no user notice>") << endl ;
virtual Double_t getMin(const char *name=0) const
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
virtual const char * GetName() const
Returns name of object.
virtual Bool_t allowFunctionCache()
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
TIterator * createIterator(Bool_t dir=kIterForward) const
static long int sum(long int i)
virtual Double_t getMax(const char *name=0) const
virtual void optimizeReadingWithCaching(RooAbsArg &arg, const RooArgSet &cacheList, const RooArgSet &keepObsList)
Prepare dataset for use with cached constant terms listed in 'cacheList' of expression 'arg'...
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 constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Forward constant term optimization management calls to component test statistics. ...
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
virtual void optimizeCacheMode(const RooArgSet &observables)
Activate cache mode optimization with given definition of observables.
virtual Bool_t redirectServersHook(const RooAbsCollection &newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive)
Catch server redirect calls and forward to internal clone of function.
virtual const RooArgSet * get() 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...
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
GOFOpMode operMode() const
RooProdPdf is an efficient implementation of a product of PDFs of the form.
virtual void removeAll()
Remove all argument inset using remove(const RooAbsArg&).
Double_t getVal(const RooArgSet *set=0) const
const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const
Return binning definition with name.
virtual ~RooAbsOptTestStatistic()
Destructor.
RooAbsReal * _origFunc
List of nodes that are cached as constant expressions.
void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Driver function to propagate constant term optimizations in test statistic.
void attachBuffers(const RooArgSet &extObs)
void optimizeConstantTerms(Bool_t, Bool_t=kTRUE)
Driver function to activate global constant term optimization.
RooAbsData * reduce(const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg(), const RooCmdArg &arg3=RooCmdArg(), const RooCmdArg &arg4=RooCmdArg(), const RooCmdArg &arg5=RooCmdArg(), const RooCmdArg &arg6=RooCmdArg(), const RooCmdArg &arg7=RooCmdArg(), const RooCmdArg &arg8=RooCmdArg())
Create a reduced copy of this dataset.
RooArgSet * _funcCloneSet
virtual void fixAddCoefRange(const char *rangeName=0, Bool_t force=kTRUE)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
virtual void printCompactTreeHook(std::ostream &os, const char *indent="")
Catch print hook function and forward to function clone.
virtual void resetCache()
Internal method – Remove cached function values.
Bool_t setDataSlave(RooAbsData &data, Bool_t cloneData=kTRUE, Bool_t ownNewDataAnyway=kFALSE)
cout << "RAOTS::setDataSlave(" << this << ") START" << endl ; Change dataset that is used to given on...
virtual Double_t combinedValue(RooAbsReal **gofArray, Int_t nVal) const
Method to combined test statistic results calculated into partitions into the global result...
Iterator abstract base class.
virtual const RooAbsArg * cacheOwner()=0
const char * sealNotice() const
void setValueDirty() const
Bool_t hasFilledCache() const
void setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
RooDataSet is a container class to hold N-dimensional binned data.
virtual Double_t getValV(const RooArgSet *set=0) const
Return value of object.
void printCompactTree(const char *indent="", const char *fileName=0, const char *namePat=0, RooAbsArg *client=0)
Print tree structure of expression tree on stdout, or to file if filename is specified.
void optimizeCaching()
This method changes the value caching logic for all nodes that depends on any of the observables as d...
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
Double_t _evalCarry
avoids loss of precision
RooAbsCollection * selectByAttrib(const char *name, Bool_t value) const
Create a subset of the current collection, consisting only of those elements with the specified attri...
virtual void forceCacheUpdate()
virtual RooAbsReal * highBoundFunc() const
virtual RooAbsReal * lowBoundFunc() const
virtual void printCompactTreeHook(std::ostream &os, const char *indent="")
Add extra information on component test statistics when printing itself as part of a tree structure...
virtual void setCacheAndTrackHints(RooArgSet &)
RooRealVar represents a fundamental (non-derived) real valued object.
virtual Bool_t redirectServersHook(const RooAbsCollection &newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive)
Forward server redirect calls to component test statistics.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
virtual Double_t getCarry() const
void setAttribAll(const Text_t *name, Bool_t value=kTRUE)
Set given attribute in each element of the collection by calling each elements setAttribute() functio...
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
RooCmdArg SelectVars(const RooArgSet &vars)
virtual void setArgStatus(const RooArgSet &set, Bool_t active)
RooAbsArg * first() const
void branchNodeServerList(RooAbsCollection *list, const RooAbsArg *arg=0, Bool_t recurseNonDerived=kFALSE) const
Fill supplied list with all branch nodes of the arg tree starting with ourself as top node...
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
char * Form(const char *fmt,...)
RooAbsData is the common abstract base class for binned and unbinned datasets.
RooCmdArg CutRange(const char *rangeName)
RooAbsDataStore * store()
RooDataSet is a container class to hold unbinned data.
virtual RooArgSet requiredExtraObservables() const
std::string _addCoefRangeName
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooFIter fwdIterator() const
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...
RooAbsTestStatistic is the abstract base class for all test statistics.
static RooMathCoreReg dummy
virtual void cacheArgs(const RooAbsArg *owner, RooArgSet &varSet, const RooArgSet *nset=0, Bool_t skipZeroWeights=kFALSE)
Internal method – Cache given set of functions with data.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
void setEventCount(Int_t nEvents)
Bool_t findConstantNodes(const RooArgSet &observables, RooArgSet &cacheList)
Find branch nodes with all-constant parameters, and add them to the list of nodes that can be cached ...
void cacheValidEntries()
Cache the datahist entries with bin centers that are inside/outside the current observable definitio...
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
void setRange(const char *name, Double_t min, Double_t max)
Set range named 'name to [min,max].
RooAbsCollection is an abstract container object that can hold multiple RooAbsArg objects...
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
virtual Bool_t isDerived() const
virtual TObject * Next()=0
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
RooArgSet * getConnectedParameters(const RooArgSet &observables) const
Return all parameter constraint p.d.f.s on parameters listed in constrainedParams The observables set...
virtual void fixAddCoefNormalization(const RooArgSet &addNormSet=RooArgSet(), Bool_t force=kTRUE)
Fix the interpretation of the coefficient of any RooAddPdf component in the expression tree headed by...
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
RooAbsOptTestStatistic()
Default Constructor.
void initSlave(RooAbsReal &real, RooAbsData &indata, const RooArgSet &projDeps, const char *rangeName, const char *addCoefRangeName)
virtual Int_t numEntries() 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...
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
void setDirtyProp(Bool_t flag)
Control propagation of dirty flags from observables in dataset.