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 ;
static RooMathCoreReg dummy
char * Form(const char *fmt,...)
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual RooAbsArg * cloneTree(const char *newname=0) const
Clone tree expression of objects.
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
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 setStringAttribute(const Text_t *key, const Text_t *value)
Associate string 'value' to this object under key 'key'.
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.
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 ...
const Text_t * getStringAttribute(const Text_t *key) const
Get string attribute mapped under key 'key'.
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...
void setAttribute(const Text_t *name, Bool_t value=kTRUE)
Set (default) or clear a named boolean attribute of this object.
virtual void setCacheAndTrackHints(RooArgSet &)
virtual Bool_t isDerived() const
void setOperMode(OperMode mode, Bool_t recurseADirty=kTRUE)
Change cache operation mode to given mode.
virtual void optimizeCacheMode(const RooArgSet &observables)
Activate cache mode optimization with given definition of observables.
Bool_t getAttribute(const Text_t *name) const
Check if a named attribute is set. By default, all attributes are unset.
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.
void setValueDirty() const
Bool_t recursiveRedirectServers(const RooAbsCollection &newServerList, Bool_t mustReplaceAll=kFALSE, Bool_t nameChange=kFALSE, Bool_t recurseInNewSet=kTRUE)
virtual RooAbsReal * highBoundFunc() const
virtual RooAbsReal * lowBoundFunc() 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.
RooAbsCollection * selectCommon(const RooAbsCollection &refColl) const
Create a subset of the current collection, consisting only of those elements that are contained as we...
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
RooFIter fwdIterator() const
RooAbsArg * first() 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 * 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 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.
virtual const RooAbsArg * cacheOwner()=0
virtual void forceCacheUpdate()
RooAbsData is the common abstract base class for binned and unbinned datasets.
virtual const RooArgSet * get() const
RooAbsDataStore * store()
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'.
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.
virtual Int_t numEntries() const
virtual void resetCache()
Internal method – Remove cached function values.
Bool_t hasFilledCache() const
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.
void attachBuffers(const RooArgSet &extObs)
virtual void setArgStatus(const RooArgSet &set, Bool_t active)
void setDirtyProp(Bool_t flag)
Control propagation of dirty flags from observables in dataset.
RooAbsOptTestStatistic is the abstract base class for test statistics objects that evaluate a functio...
virtual ~RooAbsOptTestStatistic()
Destructor.
RooAbsReal * _origFunc
List of nodes that are cached as constant expressions.
void optimizeCaching()
This method changes the value caching logic for all nodes that depends on any of the observables as d...
const char * sealNotice() const
void optimizeConstantTerms(Bool_t, Bool_t=kTRUE)
Driver function to activate global constant term optimization.
virtual Bool_t allowFunctionCache()
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 void printCompactTreeHook(std::ostream &os, const char *indent="")
Catch print hook function and forward to function clone.
void initSlave(RooAbsReal &real, RooAbsData &indata, const RooArgSet &projDeps, const char *rangeName, const char *addCoefRangeName)
virtual Double_t combinedValue(RooAbsReal **gofArray, Int_t nVal) const
Method to combined test statistic results calculated into partitions into the global result.
RooArgSet * _funcCloneSet
virtual RooArgSet requiredExtraObservables() const
RooAbsOptTestStatistic()
Default Constructor.
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...
void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Driver function to propagate constant term optimizations in test statistic.
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 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 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...
Double_t getVal(const RooArgSet *set=0) const
Evaluate object. Returns either cached value or triggers a recalculation.
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...
RooAbsTestStatistic is the abstract base class for all test statistics.
std::string _addCoefRangeName
GOFOpMode operMode() const
virtual void constOptimizeTestStatistic(ConstOpCode opcode, Bool_t doAlsoTrackingOpt=kTRUE)
Forward constant term optimization management calls to component test statistics.
virtual Bool_t redirectServersHook(const RooAbsCollection &newServerList, Bool_t mustReplaceAll, Bool_t nameChange, Bool_t isRecursive)
Forward server redirect calls to component test statistics.
void setEventCount(Int_t nEvents)
virtual Double_t getCarry() const
Double_t _evalCarry
avoids loss of precision
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.
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...
RooDataSet is a container class to hold N-dimensional binned data.
void cacheValidEntries()
Cache the datahist entries with bin centers that are inside/outside the current observable definitio.
RooDataSet is a container class to hold unbinned data.
RooProdPdf is an efficient implementation of a product of PDFs of the form.
RooArgSet * getConnectedParameters(const RooArgSet &observables) const
Return all parameter constraint p.d.f.s on parameters listed in constrainedParams The observables set...
RooRealVar represents a fundamental (non-derived) real valued object.
void setRange(const char *name, Double_t min, Double_t max)
Set range named 'name to [min,max].
const RooAbsBinning & getBinning(const char *name=0, Bool_t verbose=kTRUE, Bool_t createOnTheFly=kFALSE) const
Return binning definition with name.
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&).
RooVectorDataStore is the abstract base class for data collection that use a TTree as internal storag...
Iterator abstract base class.
virtual TObject * Next()=0
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual const char * GetName() const
Returns name of object.
RooCmdArg SelectVars(const RooArgSet &vars)
RooCmdArg CutRange(const char *rangeName)
static long int sum(long int i)