53 _coefIter = _coefList.createIterator() ;
54 _boundIter = _boundaryList.createIterator() ;
64 _x(
"x",
"Dependent", this, x),
65 _coefList(
"coefList",
"List of coefficients",this),
66 _boundaryList(
"boundaryList",
"List of boundaries",this),
67 _interpolate(interpolate)
73 if (!dynamic_cast<RooAbsReal*>(coef)) {
74 cout <<
"RooStepFunction::ctor(" <<
GetName() <<
") ERROR: coefficient " << coef->
GetName()
75 <<
" is not of type RooAbsReal" << endl ;
86 if (!dynamic_cast<RooAbsReal*>(boundary)) {
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),
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 ;
168 y[nc++] = coef->
getVal() ;
172 for (
Int_t i=0;i<nc-1;i++){
173 if (
_x>c[i]&&
_x<=c[i+1]) {
174 Double_t xx[2] ; xx[0]=c[i] ; xx[1]=c[i+1] ;
175 Double_t yy[2] ; yy[0]=y[i] ; yy[1]=y[i+1] ;
Double_t evaluate() const
Transfer contents to vector for use below.
static Double_t interpolate(Double_t yArr[], Int_t nOrder, Double_t x)
virtual const char * GetName() const
Returns name of object.
TIterator * createIterator(Bool_t dir=kIterForward) const
Double_t getVal(const RooArgSet *set=0) const
RooListProxy _boundaryList
Iterator abstract base class.
TIterator * _boundIter
do not persist
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Reimplementation of standard RooArgList::add()
RooAbsArg * at(Int_t idx) const
RooStepFunction()
Constructor.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
The Step Function is a binned function whose parameters are the heights of each bin.
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...