16 #ifndef ROO_PIECEWISEINTERPOLATION
17 #define ROO_PIECEWISEINTERPOLATION
28 class PiecewiseInterpolation :
public RooAbsReal {
31 PiecewiseInterpolation() ;
32 PiecewiseInterpolation(
const char *name,
const char *title,
const RooAbsReal& nominal,
const RooArgList& lowSet,
const RooArgList& highSet,
const RooArgList& paramSet, Bool_t takeOwnerShip=kFALSE) ;
33 virtual ~PiecewiseInterpolation() ;
35 PiecewiseInterpolation(
const PiecewiseInterpolation& other,
const char* name = 0);
36 virtual TObject* clone(
const char* newname)
const {
return new PiecewiseInterpolation(*
this, newname); }
42 const RooArgList& lowList()
const {
return _lowSet ; }
43 const RooArgList& highList()
const {
return _highSet ; }
44 const RooArgList& paramList()
const {
return _paramSet ; }
47 Bool_t setBinIntegrator(RooArgSet& allVars) ;
49 Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars,
const RooArgSet* normSet,
const char* rangeName=0)
const ;
50 Double_t analyticalIntegralWN(Int_t code,
const RooArgSet* normSet,
const char* rangeName=0)
const ;
52 void setPositiveDefinite(
bool flag=
true){_positiveDefinite=flag;}
54 void setInterpCode(RooAbsReal& param,
int code);
55 void setAllInterpCodes(
int code);
56 void printAllInterpCodes();
58 virtual std::list<Double_t>* binBoundaries(RooAbsRealLValue& , Double_t , Double_t )
const ;
59 virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Double_t xlo, Double_t xhi)
const ;
60 virtual Bool_t isBinnedDistribution(
const RooArgSet& obs)
const ;
64 class CacheElem :
public RooAbsCacheElement {
67 virtual ~CacheElem() {} ;
68 virtual RooArgList containedArgs(Action) {
69 RooArgList ret(_funcIntList) ;
71 ret.add(_highIntList);
74 RooArgList _funcIntList ;
75 RooArgList _lowIntList ;
76 RooArgList _highIntList ;
79 mutable RooObjCacheManager _normIntMgr ;
81 RooRealProxy _nominal;
82 RooArgList _ownedList ;
83 RooListProxy _lowSet ;
84 RooListProxy _highSet ;
85 RooListProxy _paramSet ;
86 RooListProxy _normSet ;
87 Bool_t _positiveDefinite;
89 std::vector<int> _interpCode;
91 Double_t evaluate()
const;
93 ClassDef(PiecewiseInterpolation,3)