54 _coefIter = _coefList.createIterator() ;
55 _boundIter = _boundaryList.createIterator() ;
67 _x(
"x",
"Dependent", this, x),
68 _coefList(
"coefList",
"List of coefficients",this),
69 _boundaryList(
"boundaryList",
"List of boundaries",this),
70 _interpolate(interpolate)
76 if (!dynamic_cast<RooAbsReal*>(coef)) {
77 cout <<
"RooStepFunction::ctor(" <<
GetName() <<
") ERROR: coefficient " << coef->
GetName()
78 <<
" is not of type RooAbsReal" << endl ;
89 if (!dynamic_cast<RooAbsReal*>(boundary)) {
90 cout <<
"RooStepFunction::ctor(" <<
GetName() <<
") ERROR: boundary " << boundary->
GetName()
91 <<
" is not of type RooAbsReal" << endl ;
98 coutE(
InputArguments) <<
"RooStepFunction::ctor(" <<
GetName() <<
") ERROR: Number of boundaries must be number of coefficients plus 1" << endl ;
99 throw string(
"RooStepFunction::ctor() ERROR: Number of boundaries must be number of coefficients plus 1") ;
111 _x(
"x", this, other.
_x),
148 if ((
_x<
b[0]) || (
_x>
b[nb-1]))
return 0 ;
153 for (
Int_t i=0;i<nb-1;i++){
154 if (
_x>
b[i]&&
_x<=
b[i+1]) {
165 c[0] =
b[0] ;
c[nb] =
b[nb-1] ;
166 for (
Int_t i=0 ; i<nb-1 ; i++) {
167 c[i+1] = (
b[i]+
b[i+1])/2 ;
177 y[nc++] = coef->
getVal() ;
181 for (
Int_t i=0;i<nc-1;i++){
182 if (
_x>
c[i]&&
_x<=
c[i+1]) {
184 Double_t yy[2] ; yy[0]=y[i] ; yy[1]=y[i+1] ;
static Double_t interpolate(Double_t yArr[], Int_t nOrder, Double_t x)
RooListProxy _boundaryList
Double_t evaluate() const
Transfer contents to vector for use below.
Iterator abstract base class.
TIterator * _boundIter
do not persist
TIterator * createIterator(Bool_t dir=kIterForward) const
Double_t getVal(const RooArgSet *set=0) const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::add()
void interpolate(const ROOT::Math::Interpolator &itp, bool drawSame=false)
virtual const char * GetName() const
Returns name of object.
RooStepFunction()
Constructor.
RooAbsArg * at(Int_t idx) const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual ~RooStepFunction()
Destructor.
virtual TObject * Next()=0
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...