64 _x(
"x",
"Dependent", this,
x),
65 _coefList(
"coefList",
"List of coefficients",this),
66 _boundaryList(
"boundaryList",
"List of boundaries",this),
67 _interpolate(interpolate)
74 cout <<
"RooStepFunction::ctor(" <<
GetName() <<
") ERROR: coefficient " << coef->
GetName()
75 <<
" is not of type RooAbsReal" << endl ;
87 cout <<
"RooStepFunction::ctor(" <<
GetName() <<
") ERROR: boundary " << boundary->
GetName()
88 <<
" is not of type RooAbsReal" << endl ;
95 coutE(InputArguments) <<
"RooStepFunction::ctor(" <<
GetName() <<
") ERROR: Number of boundaries must be number of coefficients plus 1" << endl ;
96 throw string(
"RooStepFunction::ctor() ERROR: Number of boundaries must be number of coefficients plus 1") ;
106 _x(
"x", this, other._x),
107 _coefList(
"coefList",this,other._coefList),
108 _boundaryList(
"boundaryList",this,other._boundaryList),
109 _interpolate(other._interpolate)
139 if ((
_x<
b[0]) || (
_x>
b[nb-1]))
return 0 ;
144 for (
Int_t i=0;i<nb-1;i++){
145 if (
_x>
b[i]&&
_x<=
b[i+1]) {
156 c[0] =
b[0] ;
c[nb] =
b[nb-1] ;
157 for (
Int_t i=0 ; i<nb-1 ; i++) {
158 c[i+1] = (
b[i]+
b[i+1])/2 ;
172 for (
Int_t i=0;i<nc-1;i++){
173 if (
_x>
c[i]&&
_x<=
c[i+1]) {
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooAbsArg * at(Int_t idx) const
Return object at given index, or nullptr if index is out of range.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Reimplementation of standard RooArgList::add()
static Double_t interpolate(Double_t yArr[], Int_t nOrder, Double_t x)
The Step Function is a binned function whose parameters are the heights of each bin.
virtual ~RooStepFunction()
Destructor.
TIterator * _boundIter
do not persist
RooStepFunction()
Constructor.
Double_t evaluate() const
Transfer contents to vector for use below.
RooListProxy _boundaryList
Iterator abstract base class.
virtual TObject * Next()=0
virtual const char * GetName() const
Returns name of object.