File indexing completed on 2025-01-18 10:11:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_CONSTRAINT_SUM
0017 #define ROO_CONSTRAINT_SUM
0018
0019 #include "RooAbsReal.h"
0020 #include "RooListProxy.h"
0021 #include "RooSetProxy.h"
0022
0023 class RooRealVar;
0024 class RooArgList ;
0025 class RooWorkspace ;
0026
0027 class RooConstraintSum : public RooAbsReal {
0028 public:
0029
0030 RooConstraintSum() {}
0031 RooConstraintSum(const char *name, const char *title, const RooArgSet& constraintSet, const RooArgSet& paramSet, bool takeGlobalObservablesFromData=false) ;
0032
0033 RooConstraintSum(const RooConstraintSum& other, const char* name = nullptr);
0034 TObject* clone(const char* newname) const override { return new RooConstraintSum(*this, newname); }
0035
0036 const RooArgList& list() { return _set1 ; }
0037
0038 bool setData(RooAbsData const& data, bool cloneData=true);
0039
0040 bool setData(RooAbsData& data, bool cloneData=true) override {
0041 return setData(static_cast<RooAbsData const&>(data), cloneData);
0042 }
0043
0044 void doEval(RooFit::EvalContext &) const override;
0045
0046 std::unique_ptr<RooAbsArg> compileForNormSet(RooArgSet const &normSet, RooFit::Detail::CompileContext & ctx) const override;
0047
0048 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
0049 protected:
0050
0051 RooListProxy _set1 ;
0052 RooArgSet _paramSet ;
0053 const bool _takeGlobalObservablesFromData = false;
0054
0055 double evaluate() const override;
0056
0057 ClassDefOverride(RooConstraintSum,4)
0058 };
0059
0060 #endif