54 func(
"func",
"func",this,_func),
56 _binningName(bname?bname:
"cache")
111 for (
int i=0 ; i<hist()->numEntries() ; i++) {
153 Int_t nbins = hist()->numEntries() ;
158 Int_t nInitRange=32 ;
159 for (
int i=1 ; i<=nInitRange ; i++) {
160 Int_t hi = (i*nbins)/nInitRange -1 ;
167 for (
int i=1 ; i<nbins ; i++) {
173 for (
int i=0 ; i<nbins ; i++) {
176 hist()->set(
_ay[i]/
_ay[nbins-1]) ;
178 hist()->set(
_ay[i]*binv) ;
220 Int_t ixmid = (ixlo+ixhi)/2 ;
231 for (
Int_t j=ixlo+1 ; j<ixmid ; j++) {
232 _ay[j] =
_ay[ixlo] + (
_ay[ixmid]-
_ay[ixlo])*(j-ixlo)/(ixmid-ixlo) ;
234 for (
Int_t j=ixmid+1 ; j<ixhi ; j++) {
235 _ay[j] =
_ay[ixmid] + (
_ay[ixhi]-
_ay[ixmid])*(j-ixmid)/(ixhi-ixmid) ;
297 return new RICacheElem(*const_cast<RooNumRunningInt*>(
this),nset) ;
306 cout <<
"RooNumRunningInt::evaluate(" <<
GetName() <<
")" << endl ;
virtual const char * GetName() const
Returns name of object.
void setInterpolationOrder(Int_t order)
Set interpolation order of RooHistFunct representing cache histogram.
RooNumRunningInt(const char *name, const char *title, RooAbsReal &_func, RooRealVar &_x, const char *binningName="cache")
Construct running integral of function '_func' over x_print from the lower bound on _x to the present...
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
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...
Double_t getVal(const RooArgSet *set=0) const
void addRange(Int_t ixlo, Int_t ixhi, Int_t nbins)
Fill all empty histogram bins in the range [ixlo,ixhi] where nbins is the total number of histogram b...
Class RooNumRunningInt is an implementation of RooAbsCachedReal that represents a running integral t...
virtual RooArgSet * actualObservables(const RooArgSet &nset) const
Return observable in nset to be cached by RooAbsCachedPdf this is always the x observable that is int...
~RICacheElem()
Destructor.
virtual const char * inputBaseName() const
Return unique name for RooAbsCachedPdf cache components constructed from input function name...
virtual FuncCacheElem * createCache(const RooArgSet *nset) const
Create custom cache element for running integral calculations.
virtual void fillCacheObject(FuncCacheElem &cacheFunc) const
Fill the cache object by calling its calculate() method.
RooRealVar represents a fundamental (non-derived) real valued object.
virtual ~RooNumRunningInt()
Destructor.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
RooAbsCachedReal is the abstract base class for functions that need or want to cache their evaluate()...
void addPoint(Int_t ix)
Sample function at bin ix.
virtual RooArgList containedArgs(Action)
Return list of contained RooAbsArg objects.
virtual RooArgSet * actualParameters(const RooArgSet &nset) const
Return the parameters of the cache created by RooAbsCachedPdf.
Double_t min(const char *rname=0) const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
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 calculate(Bool_t cdfmode)
Calculate the numeric running integral and store the result in the cache histogram provided by RooAbs...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
Double_t max(const char *rname=0) const
RICacheElem(const RooNumRunningInt &ri, const RooArgSet *nset)
Construct RunningIntegral CacheElement.
float type_of_call hi(const int &, const int &)
const RooAbsReal & arg() const
virtual RooArgList containedArgs(Action)
Return all RooAbsArg components contained in cache element.
virtual Double_t evaluate() const
Dummy function that is never called.