00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ROOFUNCTOR1DBINDING
00014 #define ROOFUNCTOR1DBINDING
00015
00016 #include "TString.h"
00017 #include "RooAbsReal.h"
00018 #include "RooArgList.h"
00019 #include "RooListProxy.h"
00020 #include "RooAbsPdf.h"
00021 #include "RooRealProxy.h"
00022 #include "RooMsgService.h"
00023 #include <string>
00024 #include <map>
00025 #include <vector>
00026 #include "Math/IFunction.h"
00027
00028
00029 namespace RooFit {
00030
00031 RooAbsReal* bindFunction(const char* name, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& vars) ;
00032 RooAbsPdf* bindPdf(const char* name, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& vars) ;
00033
00034 }
00035
00036
00037 class RooFunctor1DBinding : public RooAbsReal {
00038 public:
00039 RooFunctor1DBinding() {
00040
00041 } ;
00042 RooFunctor1DBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& var);
00043 RooFunctor1DBinding(const RooFunctor1DBinding& other, const char* name=0) ;
00044 virtual TObject* clone(const char* newname) const { return new RooFunctor1DBinding(*this,newname); }
00045 inline virtual ~RooFunctor1DBinding() {}
00046 void printArgs(ostream& os) const ;
00047
00048 protected:
00049
00050 Double_t evaluate() const ;
00051
00052 const ROOT::Math::IBaseFunctionOneDim* func ;
00053 RooRealProxy var ;
00054
00055
00056 private:
00057
00058 ClassDef(RooFunctor1DBinding,1)
00059 };
00060
00061
00062
00063 class RooFunctor1DPdfBinding : public RooAbsPdf {
00064 public:
00065 RooFunctor1DPdfBinding() {
00066
00067 } ;
00068 RooFunctor1DPdfBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& vars);
00069 RooFunctor1DPdfBinding(const RooFunctor1DPdfBinding& other, const char* name=0) ;
00070 virtual TObject* clone(const char* newname) const { return new RooFunctor1DPdfBinding(*this,newname); }
00071 inline virtual ~RooFunctor1DPdfBinding() {}
00072 void printArgs(ostream& os) const ;
00073
00074 protected:
00075
00076 Double_t evaluate() const ;
00077
00078 const ROOT::Math::IBaseFunctionOneDim* func ;
00079 RooRealProxy var ;
00080
00081
00082 private:
00083
00084 ClassDef(RooFunctor1DPdfBinding,1)
00085 };
00086
00087
00088 #endif