File indexing completed on 2025-01-18 10:11:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_REAL_BINDING
0017 #define ROO_REAL_BINDING
0018
0019 #include "RooAbsFunc.h"
0020
0021 #include <ROOT/RSpan.hxx>
0022
0023 #include <vector>
0024 #include <memory>
0025
0026 class RooAbsRealLValue;
0027 class RooAbsReal;
0028 class RooArgSet;
0029
0030 class RooRealBinding : public RooAbsFunc {
0031 public:
0032 RooRealBinding(const RooAbsReal& func, const RooArgSet &vars, const RooArgSet* nset=nullptr, bool clipInvalid=false, const TNamed* rangeName=nullptr);
0033 RooRealBinding(const RooRealBinding& other, const RooArgSet* nset=nullptr) ;
0034 ~RooRealBinding() override;
0035
0036 double operator()(const double xvector[]) const override;
0037 double getMinLimit(UInt_t dimension) const override;
0038 double getMaxLimit(UInt_t dimension) const override;
0039
0040 void saveXVec() const override ;
0041 void restoreXVec() const override ;
0042
0043 const char* getName() const override ;
0044
0045 std::list<double>* binBoundaries(Int_t) const override ;
0046
0047 RooAbsRealLValue* observable(unsigned int i) const { return i < _vars.size() ? _vars[i] : nullptr; }
0048 std::list<double>* plotSamplingHint(RooAbsRealLValue& , double , double ) const override ;
0049
0050 protected:
0051
0052 void loadValues(const double xvector[]) const;
0053 const RooAbsReal *_func;
0054 std::vector<RooAbsRealLValue*> _vars;
0055 const RooArgSet *_nset;
0056 mutable bool _xvecValid;
0057 bool _clipInvalid ;
0058 mutable std::vector<double> _xsave ;
0059 const TNamed* _rangeName ;
0060
0061 mutable std::vector<RooAbsReal*> _compList ;
0062 mutable std::vector<double> _compSave ;
0063 mutable double _funcSave ;
0064
0065 ClassDefOverride(RooRealBinding,0)
0066 };
0067
0068 #endif
0069