Warning, file /include/root/RooParamBinning.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_PARAM_BINNING
0017 #define ROO_PARAM_BINNING
0018
0019 #include "Rtypes.h"
0020 #include "RooAbsBinning.h"
0021 #include "RooRealVar.h"
0022 #include "RooListProxy.h"
0023
0024 class RooParamBinning : public RooAbsBinning {
0025 public:
0026
0027 RooParamBinning(const char* name=nullptr) ;
0028 RooParamBinning(RooAbsReal& xlo, RooAbsReal& xhi, Int_t nBins, const char* name=nullptr) ;
0029 RooParamBinning(const RooParamBinning& other, const char* name=nullptr) ;
0030 RooAbsBinning* clone(const char* name=nullptr) const override { return new RooParamBinning(*this,name?name:GetName()) ; }
0031 ~RooParamBinning() override ;
0032
0033 void setRange(double xlo, double xhi) override ;
0034
0035 Int_t numBoundaries() const override { return _nbins + 1 ; }
0036 void binNumbers(double const * x, int * bins, std::size_t n, int coef) const override;
0037
0038 double lowBound() const override { return xlo()->getVal() ; }
0039 double highBound() const override { return xhi()->getVal() ; }
0040
0041 double binCenter(Int_t bin) const override ;
0042 double binWidth(Int_t bin) const override ;
0043 double binLow(Int_t bin) const override ;
0044 double binHigh(Int_t bin) const override ;
0045
0046 double averageBinWidth() const override { return _binw ; }
0047 double* array() const override ;
0048
0049 void printMultiline(std::ostream &os, Int_t content, bool verbose=false, TString indent="") const override ;
0050
0051 void insertHook(RooAbsRealLValue&) const override ;
0052 void removeHook(RooAbsRealLValue&) const override ;
0053
0054 bool isShareable() const override { return false ; }
0055 bool isParameterized() const override { return true ; }
0056 RooAbsReal* lowBoundFunc() const override { return xlo() ; }
0057 RooAbsReal* highBoundFunc() const override { return xhi() ; }
0058
0059 protected:
0060
0061 mutable double* _array = nullptr;
0062 mutable RooAbsReal* _xlo = nullptr;
0063 mutable RooAbsReal* _xhi = nullptr;
0064 Int_t _nbins = 100;
0065 double _binw = 0;
0066 mutable RooListProxy* _lp = nullptr;
0067 mutable RooAbsArg* _owner = nullptr;
0068
0069 RooAbsReal* xlo() const { return _lp ? ((RooAbsReal*)_lp->at(0)) : _xlo ; }
0070 RooAbsReal* xhi() const { return _lp ? ((RooAbsReal*)_lp->at(1)) : _xhi ; }
0071
0072 ClassDefOverride(RooParamBinning,3)
0073 };
0074
0075 #endif