File indexing completed on 2025-01-18 10:11:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ROOFUNCTOR1DBINDING
0014 #define ROOFUNCTOR1DBINDING
0015
0016 #include "RooAbsReal.h"
0017 #include "RooArgList.h"
0018 #include "RooListProxy.h"
0019 #include "RooAbsPdf.h"
0020 #include "RooRealProxy.h"
0021 #include "RooMsgService.h"
0022 #include "Math/IFunction.h"
0023
0024
0025 namespace RooFit {
0026
0027 RooAbsReal* bindFunction(const char* name, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& vars) ;
0028 RooAbsPdf* bindPdf(const char* name, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& vars) ;
0029
0030 }
0031
0032
0033 class RooFunctor1DBinding : public RooAbsReal {
0034 public:
0035 RooFunctor1DBinding() : func(nullptr) {
0036
0037 } ;
0038 RooFunctor1DBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& var);
0039 RooFunctor1DBinding(const RooFunctor1DBinding& other, const char* name=nullptr) ;
0040 TObject* clone(const char* newname) const override { return new RooFunctor1DBinding(*this,newname); }
0041 void printArgs(std::ostream& os) const override ;
0042
0043 protected:
0044
0045 double evaluate() const override ;
0046
0047 const ROOT::Math::IBaseFunctionOneDim* func ;
0048 RooRealProxy var ;
0049
0050
0051 private:
0052
0053 ClassDefOverride(RooFunctor1DBinding,1)
0054 };
0055
0056
0057
0058 class RooFunctor1DPdfBinding : public RooAbsPdf {
0059 public:
0060 RooFunctor1DPdfBinding() : func(nullptr) {
0061
0062 } ;
0063 RooFunctor1DPdfBinding(const char *name, const char *title, const ROOT::Math::IBaseFunctionOneDim& ftor, RooAbsReal& vars);
0064 RooFunctor1DPdfBinding(const RooFunctor1DPdfBinding& other, const char* name=nullptr) ;
0065 TObject* clone(const char* newname) const override { return new RooFunctor1DPdfBinding(*this,newname); }
0066 void printArgs(std::ostream& os) const override ;
0067
0068 protected:
0069
0070 double evaluate() const override ;
0071
0072 const ROOT::Math::IBaseFunctionOneDim* func ;
0073 RooRealProxy var ;
0074
0075
0076 private:
0077
0078 ClassDefOverride(RooFunctor1DPdfBinding,1)
0079 };
0080
0081
0082 #endif