#ifndef ROOLINEARMORPH
#define ROOLINEARMORPH
#include "RooAbsCachedPdf.h"
#include "RooRealProxy.h"
#include "RooCategoryProxy.h"
#include "RooAbsReal.h"
#include "RooAbsCategory.h"
class RooBrentRootFinder ;
class TH1D ;
class RooLinearMorph : public RooAbsCachedPdf {
public:
RooLinearMorph() {} ;
RooLinearMorph(const char *name, const char *title,
RooAbsReal& _pdf1,
RooAbsReal& _pdf2,
RooAbsReal& _x,
RooAbsReal& _alpha, Bool_t cacheAlpha=kFALSE);
RooLinearMorph(const RooLinearMorph& other, const char* name=0) ;
virtual TObject* clone(const char* newname) const { return new RooLinearMorph(*this,newname); }
inline virtual ~RooLinearMorph() { }
Bool_t selfNormalized() const {
return kTRUE ;
}
void setCacheAlpha(Bool_t flag) {
_cacheMgr.sterilize() ; _cacheAlpha = flag ;
}
Bool_t cacheAlpha() const {
return _cacheAlpha ;
}
virtual void preferredObservableScanOrder(const RooArgSet& obs, RooArgSet& orderedObs) const ;
class MorphCacheElem : public PdfCacheElem {
public:
MorphCacheElem(RooLinearMorph& self, const RooArgSet* nset) ;
~MorphCacheElem() ;
void calculate(TIterator* iter) ;
virtual RooArgList containedArgs(Action) ;
protected:
void findRange() ;
Double_t calcX(Double_t y, Bool_t& ok) ;
Int_t binX(Double_t x) ;
void fillGap(Int_t ixlo, Int_t ixhi,Double_t splitPoint=0.5) ;
void interpolateGap(Int_t ixlo, Int_t ixhi) ;
RooLinearMorph* _self ;
RooArgSet* _nset ;
RooAbsPdf* _pdf1 ;
RooAbsPdf* _pdf2 ;
RooRealVar* _x ;
RooAbsReal* _alpha ;
RooAbsReal* _c1 ;
RooAbsReal* _c2 ;
RooAbsFunc* _cb1 ;
RooAbsFunc* _cb2 ;
RooBrentRootFinder* _rf1 ;
RooBrentRootFinder* _rf2 ;
Double_t* _yatX ;
Double_t* _calcX;
Int_t _yatXmin, _yatXmax ;
Int_t _ccounter ;
Double_t _ycutoff ;
} ;
protected:
friend class MorphCacheElem ;
virtual PdfCacheElem* createCache(const RooArgSet* nset) const ;
virtual const char* inputBaseName() const ;
virtual RooArgSet* actualObservables(const RooArgSet& nset) const ;
virtual RooArgSet* actualParameters(const RooArgSet& nset) const ;
virtual void fillCacheObject(PdfCacheElem& cache) const ;
RooRealProxy pdf1 ;
RooRealProxy pdf2 ;
RooRealProxy x ;
RooRealProxy alpha ;
Bool_t _cacheAlpha ;
mutable MorphCacheElem* _cache ;
Double_t evaluate() const ;
private:
ClassDef(RooLinearMorph,1)
};
#endif
Last change: Wed Jun 25 08:33:19 2008
Last generated: 2008-06-25 08:33
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.