00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef ROO_HIST_FUNC
00017 #define ROO_HIST_FUNC
00018
00019 #include "RooAbsReal.h"
00020 #include "RooRealProxy.h"
00021 #include "RooSetProxy.h"
00022 #include "RooAICRegistry.h"
00023
00024 class RooRealVar;
00025 class RooAbsReal;
00026 class RooDataHist ;
00027
00028 class RooHistFunc : public RooAbsReal {
00029 public:
00030 RooHistFunc() ;
00031 RooHistFunc(const char *name, const char *title, const RooArgSet& vars, const RooDataHist& dhist, Int_t intOrder=0);
00032 RooHistFunc(const RooHistFunc& other, const char* name=0);
00033 virtual TObject* clone(const char* newname) const { return new RooHistFunc(*this,newname); }
00034 inline virtual ~RooHistFunc() { }
00035
00036 RooDataHist& dataHist() {
00037
00038 return *_dataHist ;
00039 }
00040 const RooDataHist& dataHist() const {
00041
00042 return *_dataHist ;
00043 }
00044
00045 void setInterpolationOrder(Int_t order) {
00046
00047 _intOrder = order ;
00048 }
00049
00050 Int_t getInterpolationOrder() const {
00051
00052 return _intOrder ;
00053 }
00054
00055 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
00056 Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
00057
00058 void setCdfBoundaries(Bool_t flag) {
00059
00060 _cdfBoundaries = flag ;
00061 }
00062
00063 Bool_t getCdfBoundaries() const {
00064
00065 return _cdfBoundaries ;
00066 }
00067
00068 virtual std::list<Double_t>* plotSamplingHint(RooAbsRealLValue& obs, Double_t xlo, Double_t xhi) const ;
00069
00070 protected:
00071
00072 Double_t evaluate() const;
00073 Double_t totalVolume() const ;
00074 friend class RooAbsCachedReal ;
00075 Double_t totVolume() const ;
00076
00077 RooSetProxy _depList ;
00078 RooDataHist* _dataHist ;
00079 mutable RooAICRegistry _codeReg ;
00080 Int_t _intOrder ;
00081 Bool_t _cdfBoundaries ;
00082 mutable Double_t _totVolume ;
00083 Bool_t _unitNorm ;
00084
00085 ClassDef(RooHistFunc,1)
00086 };
00087
00088 #endif