109 pdf1("pdf1","pdf1",this,_pdf1),
110 pdf2("pdf2","pdf2",this,_pdf2),
112 alpha("alpha","alpha",this,_alpha),
113 _cacheAlpha(doCacheAlpha),
123 pdf1(
"pdf1",this,other.pdf1),
124 pdf2(
"pdf2",this,other.pdf2),
126 alpha(
"alpha",this,other.alpha),
127 _cacheAlpha(other._cacheAlpha),
170 static TString
name ;
173 name.Append(
"_MORPH_") ;
198 coutP(
Eval) <<
"RooIntegralMorph::fillCacheObject(" <<
GetName() <<
") filling multi-dimensional cache" ;
199 while(slIter->
Next()) {
200 alphaSet = (*cache.
hist()->
get()) ;
218 return new MorphCacheElem(const_cast<RooIntegralMorph&>(*
this),nset) ;
295 oocoutW(
_self,
Eval) <<
"RooIntegralMorph::MorphCacheElem::calcX() WARNING: requested root finding for unphysical CDF value " << y << endl ;
344 for (
int i=0 ; i<
nbins ; i++) {
353 for (
int i=0 ; i<10 ; i++) {
374 Int_t igapHigh = igapLow+1 ;
382 igapLow = igapHigh+1 ;
392 Double_t xBinC = xmin + (i+0.5)*binw ;
394 if (
fabs(xOffset/binw)>1
e-3) {
409 for (
int i=_yatXmin ; i<
_yatXmax ; i++) {
429 for (
int i=_yatXmax+1 ; i<
nbins ; i++) {
453 oocoutE(
_self,
Eval) <<
"RooIntegralMorph::MorphCacheElme::fillGap(" <<
_self->
GetName() <<
"): ERROR in fillgap " << ixlo <<
" = " << ixhi
454 <<
" splitPoint= " << splitPoint <<
" _yatX[ixlo] = " <<
_yatX[ixlo] << endl ;
457 oocoutE(
_self,
Eval) <<
"RooIntegralMorph::MorphCacheElme::fillGap(" <<
_self->
GetName() <<
"): ERROR in fillgap " << ixlo <<
" = " << ixhi
458 <<
" splitPoint " << splitPoint <<
" _yatX[ixhi] = " <<
_yatX[ixhi] << endl ;
467 << ixlo <<
"," << ixhi <<
"], resorting to interpolation" << endl ;
494 if (splitPoint<0.95) {
496 Double_t newSplit = splitPoint + 0.5*(1-splitPoint) ;
503 }
else if (iX==ixhi) {
506 if (splitPoint>0.05) {
543 Double_t xBinC = xmin + (ixlo+0.5)*binw ;
546 for (
int j=ixlo+1 ; j<ixhi ; j++) {
547 _yatX[j] =
_yatX[ixlo]+(xOffset+(j-ixlo))*deltaY ;
548 _calcX[j] = xmin + (j+0.5)*binw ;
576 oocxcoutD(
_self,
Eval) <<
"RooIntegralMorph::MorphCacheElem::findRange(" <<
_self->
GetName() <<
") findMin: x1 = " << x1 <<
" x2 = " << x2 <<
" ok = " << (ok?
"T":
"F") << endl ;
583 if (
fabs(X-Xlast)/(xmax-
xmin)<0.0001) {
607 Double_t deltaymax=0.1, deltaymaxSave(-1) ;
613 oocxcoutD(
_self,
Eval) <<
"RooIntegralMorph::MorphCacheElem::findRange(" <<
_self->
GetName() <<
") findMax: x1 = " << x1 <<
" x2 = " << x2 <<
" ok = " << (ok?
"T":
"F") << endl ;
620 if (
fabs(X-Xlast)/(xmax-
xmin)<0.0001) {
629 deltaymaxSave = deltaymax ;
633 deltaymax /=
sqrt(10.) ;
668 orderedObs.
add(obs) ;
671 orderedObs.
remove(*obsX) ;
672 orderedObs.
add(*obsX) ;
virtual Double_t getMin(const char *name=0) const
virtual const char * GetName() const
Returns name of object.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
virtual Double_t getMax(const char *name=0) const
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 const RooArgSet * get() const
std::vector< Double_t > _calcX
std::vector< Double_t > _yatX
virtual RooArgSet * actualObservables(const RooArgSet &nset) const
Observable to be cached for given choice of normalization.
virtual Int_t numBins(const char *rangeName=0) const
Double_t getVal(const RooArgSet *set=0) const
void set(Double_t weight, Double_t wgtErr=-1)
Increment the weight of the bin enclosing the coordinates given by 'row' by the specified amount...
virtual RooArgList containedArgs(Action)
Returns all RooAbsArg objects contained in the cache element.
MorphCacheElem(RooIntegralMorph &self, const RooArgSet *nset)
Construct of cache element, copy relevant input from RooIntegralMorph, create the cdfs from the input...
Iterator abstract base class.
RooBrentRootFinder * _rf2
virtual RooArgSet * actualParameters(const RooArgSet &nset) const
Parameters of the cache.
RooAbsReal * createCdf(const RooArgSet &iset, const RooArgSet &nset=RooArgSet())
Create a cumulative distribution function of this p.d.f in terms of the observables listed in iset...
static const double x2[5]
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
Int_t binX(Double_t x)
Return the bin number enclosing the given x value.
Class RooIntegralMorph is an implementation of the histogram interpolation technique described by Ale...
RooRealVar represents a fundamental (non-derived) real valued object.
virtual Double_t offset() const
virtual void setVal(Double_t value)
Set value of variable to 'value'.
virtual Bool_t findRoot(Double_t &result, Double_t xlo, Double_t xhi, Double_t value=0) const
Do the root finding using the Brent-Decker method.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
Double_t calcX(Double_t y, Bool_t &ok)
Calculate the x value of the output p.d.f at the given cdf value y.
virtual const char * inputBaseName() const
Return base name component for cache components in this case a string encoding the names of both end ...
void findRange()
Determine which range of y values can be mapped to x values from the numeric inversion of the input c...
Implement the abstract 1-dimensional root finding interface using the Brent-Decker method...
RooAbsArg * absArg() const
void setTol(Double_t tol)
virtual void fillCacheObject(PdfCacheElem &cache) const
Fill the cache with the interpolated shape.
void fillGap(Int_t ixlo, Int_t ixhi, Double_t splitPoint=0.5)
Fill all empty histogram bins between bins ixlo and ixhi.
static const double x1[5]
RooAbsCachedPdf is the abstract base class for p.d.f.s that need or want to cache their evaluate() ou...
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...
RooAbsFunc * bindVars(const RooArgSet &vars, const RooArgSet *nset=0, Bool_t clipInvalid=kFALSE) const
Create an interface adaptor f(vars) that binds us to the specified variables (in arbitrary order)...
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...
virtual void preferredObservableScanOrder(const RooArgSet &obs, RooArgSet &orderedObs) const
Indicate to the RooAbsCachedPdf base class that for the filling of the cache the traversal of the x s...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
TIterator * sliceIterator(RooAbsArg &sliceArg, const RooArgSet &otherArgs)
Create an iterator over all bins in a slice defined by the subset of observables listed in sliceArg...
virtual RooArgList containedArgs(Action)
Return all RooAbsArg components contained in this cache.
Double_t evaluate() const
Dummy.
virtual Bool_t remove(const RooAbsArg &var, Bool_t silent=kFALSE, Bool_t matchByNameOnly=kFALSE)
Remove the specified argument from our list.
void setUnitNorm(Bool_t flag)
void interpolateGap(Int_t ixlo, Int_t ixhi)
Fill empty histogram bins between ixlo and ixhi with values obtained from linear interpolation of ixl...
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual TObject * Next()=0
~MorphCacheElem()
Destructor.
RooBrentRootFinder * _rf1
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
const RooAbsReal & arg() const
friend class MorphCacheElem
virtual PdfCacheElem * createCache(const RooArgSet *nset) const
Create and return a derived MorphCacheElem.
void calculate(TIterator *iter)
Calculate shape of p.d.f for x,alpha values defined by dIter iterator over cache histogram.