File indexing completed on 2025-10-25 08:59:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef ROO_STEP_FUNCTION
0018 #define ROO_STEP_FUNCTION
0019
0020 #include <RooAbsReal.h>
0021 #include <RooListProxy.h>
0022 #include <RooRealProxy.h>
0023
0024 class RooArgList ;
0025
0026 class RooStepFunction : public RooAbsReal {
0027 public:
0028
0029 RooStepFunction() {}
0030 RooStepFunction(const char *name, const char *title,
0031 RooAbsReal& x, const RooArgList& coefList, const RooArgList& limits, bool interpolate=false) ;
0032
0033 RooStepFunction(const RooStepFunction& other, const char *name = nullptr);
0034 TObject* clone(const char* newname=nullptr) const override { return new RooStepFunction(*this, newname); }
0035
0036 const RooArgList& coefficients() { return _coefList; }
0037 const RooArgList& boundaries() { return _boundaryList; }
0038
0039 std::list<double>* plotSamplingHint(RooAbsRealLValue& obs, double xlo, double xhi) const override ;
0040
0041 int getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override;
0042 double analyticalIntegral(int code, const char* rangeName=nullptr) const override;
0043
0044 protected:
0045
0046 double evaluate() const override;
0047
0048 private:
0049
0050 RooRealProxy _x;
0051 RooListProxy _coefList ;
0052 RooListProxy _boundaryList ;
0053 bool _interpolate = false;
0054 mutable std::vector<double> _coefCache;
0055 mutable std::vector<double> _boundaryCache;
0056
0057 ClassDefOverride(RooStepFunction,1)
0058 };
0059
0060 #endif