File indexing completed on 2025-01-18 10:11:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROO_PARAM_HIST_FUNC
0012 #define ROO_PARAM_HIST_FUNC
0013
0014 #include "RooAbsPdf.h"
0015 #include "RooRealProxy.h"
0016 #include "RooCategoryProxy.h"
0017 #include "RooAbsReal.h"
0018 #include "RooAbsCategory.h"
0019 #include "RooListProxy.h"
0020 #include "RooSetProxy.h"
0021 #include "RooDataHist.h"
0022 #include <list>
0023
0024 class RooParamHistFunc : public RooAbsReal {
0025 public:
0026 RooParamHistFunc() {} ;
0027 RooParamHistFunc(const char *name, const char *title, RooDataHist &dh, const RooAbsArg &x,
0028 const RooParamHistFunc *paramSource = nullptr, bool paramRelative = true);
0029 RooParamHistFunc(const RooParamHistFunc& other, const char* name=nullptr) ;
0030 TObject* clone(const char* newname) const override { return new RooParamHistFunc(*this,newname); }
0031
0032 std::list<double>* binBoundaries(RooAbsRealLValue& , double , double ) const override ;
0033 std::list<double>* plotSamplingHint(RooAbsRealLValue& obs, double xlo, double xhi) const override ;
0034 bool isBinnedDistribution(const RooArgSet&) const override { return true ; }
0035
0036
0037 bool forceAnalyticalInt(const RooAbsArg&) const override { return true ; }
0038 Int_t getAnalyticalIntegralWN(RooArgSet& allVars, RooArgSet& analVars, const RooArgSet* normSet,const char* rangeName=nullptr) const override ;
0039 double analyticalIntegralWN(Int_t code, const RooArgSet* normSet, const char* rangeName=nullptr) const override ;
0040
0041 double getActual(Int_t ibin) ;
0042 void setActual(Int_t ibin, double newVal) ;
0043 double getNominal(Int_t ibin) const ;
0044 double getNominalError(Int_t ibin) const ;
0045
0046 const RooArgList& paramList() const { return _p ; }
0047
0048 void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
0049
0050 protected:
0051
0052 friend class RooHistConstraint ;
0053
0054 RooListProxy _x ;
0055 RooListProxy _p ;
0056 RooDataHist _dh ;
0057 bool _relParam ;
0058
0059 double evaluate() const override ;
0060
0061 private:
0062
0063 ClassDefOverride(RooParamHistFunc,1);
0064 };
0065
0066 #endif