ROOT   Reference Guide
RooRealBinding Class Reference

Lightweight interface adaptor that binds a RooAbsReal object to a subset of its servers and present it as a simple array oriented interface.

Definition at line 29 of file RooRealBinding.h.

## Public Member Functions

RooRealBinding (const RooAbsReal &func, const RooArgSet &vars, const RooArgSet *nset=0, Bool_t clipInvalid=kFALSE, const TNamed *rangeName=0)
Construct a lightweight function binding of RooAbsReal func to variables 'vars'. More...

RooRealBinding (const RooRealBinding &other, const RooArgSet *nset=0)
Construct a lightweight function binding of RooAbsReal func to variables 'vars'. More...

virtual ~RooRealBinding ()
Destructor. More...

virtual std::list< Double_t > * binBoundaries (Int_t) const

virtual Double_t getMaxLimit (UInt_t dimension) const
Return upper limit on i-th variable. More...

virtual Double_t getMinLimit (UInt_t dimension) const
Return lower limit on i-th variable. More...

virtual const char * getName () const
Return name of function. More...

virtual RooSpan< const doublegetValues (std::vector< RooSpan< const double > > coordinates) const
Evaluate the bound object at all locations indicated by the data in coordinates. More...

RooSpan< const doublegetValuesOfBoundFunction (RooBatchCompute::RunContext &evalData) const
Evaluate the bound object at all locations indicated by the data in evalData. More...

RooAbsRealLValueobservable (unsigned int i) const
Return a pointer to the observable that defines the i-th dimension of the function. More...

virtual Double_t operator() (const Double_t xvector[]) const
Evaluate the bound RooAbsReal at the variable values provided in xvector. More...

virtual std::list< Double_t > * plotSamplingHint (RooAbsRealLValue &, Double_t, Double_t) const
Interface for returning an optional hint for initial sampling points when constructing a curve projected on observable. More...

virtual void restoreXVec () const
Restore value of all variables to previously saved values by saveXVec() More...

virtual void saveXVec () const
Save value of all variables. More...

Public Member Functions inherited from RooAbsFunc
RooAbsFunc (const RooAbsFunc &other)

RooAbsFunc (UInt_t dimension)

virtual ~RooAbsFunc ()

virtual std::list< Double_t > * binBoundaries (Int_t) const

UInt_t getDimension () const

virtual Double_t getMaxLimit (UInt_t dimension) const =0

virtual Double_t getMinLimit (UInt_t dimension) const =0

virtual const char * getName () const

Bool_t isValid () const

Int_t numCall () const

virtual Double_t operator() (const Double_t xvector[]) const =0

virtual std::list< Double_t > * plotSamplingHint (RooAbsRealLValue &, Double_t, Double_t) const
Interface for returning an optional hint for initial sampling points when constructing a curve projected on observable. More...

void resetNumCall () const

virtual void restoreXVec () const

virtual void saveXVec () const

## Protected Member Functions

void loadValues (const Double_t xvector[]) const
Load the vector of variable values into the RooRealVars associated as variables with the bound RooAbsReal function. More...

## Protected Attributes

Bool_t _clipInvalid

std::vector< RooAbsReal * > _compList

std::vector< Double_t_compSave

std::unique_ptr< RooBatchCompute::RunContext_evalData

const RooAbsReal_func

Double_t _funcSave

const RooArgSet_nset

const TNamed_rangeName

std::vector< RooAbsRealLValue * > _vars

Double_t_xsave

Bool_t _xvecValid

Protected Attributes inherited from RooAbsFunc
UInt_t _dimension

Int_t _ncall

Bool_t _valid

#include <RooRealBinding.h>

Inheritance diagram for RooRealBinding:
[legend]

## ◆ RooRealBinding() [1/2]

 RooRealBinding::RooRealBinding ( const RooAbsReal & func, const RooArgSet & vars, const RooArgSet * nset = 0, Bool_t clipInvalid = kFALSE, const TNamed * rangeName = 0 )

Construct a lightweight function binding of RooAbsReal func to variables 'vars'.

Use the provided nset as normalization set to be passed to RooAbsReal::getVal() If rangeName is not null, use the range of with that name as range associated with the variables of this function binding. If clipInvalid is true, values requested to the function binding that are outside the defined range of the variables are clipped to fit in the defined range.

Definition at line 55 of file RooRealBinding.cxx.

## ◆ RooRealBinding() [2/2]

 RooRealBinding::RooRealBinding ( const RooRealBinding & other, const RooArgSet * nset = 0 )

Construct a lightweight function binding of RooAbsReal func to variables 'vars'.

Use the provided nset as normalization set to be passed to RooAbsReal::getVal() If rangeName is not null, use the range of with that name as range associated with the variables of this function binding. If clipInvalid is true, values requested to the function binding that are outside the defined range of the variables are clipped to fit in the defined range.

Definition at line 87 of file RooRealBinding.cxx.

## ◆ ~RooRealBinding()

 RooRealBinding::~RooRealBinding ( )
virtual

Destructor.

Definition at line 98 of file RooRealBinding.cxx.

## ◆ binBoundaries()

 std::list< Double_t > * RooRealBinding::binBoundaries ( Int_t index ) const
virtual

Reimplemented from RooAbsFunc.

Definition at line 313 of file RooRealBinding.cxx.

## ◆ getMaxLimit()

 Double_t RooRealBinding::getMaxLimit ( UInt_t dimension ) const
virtual

Return upper limit on i-th variable.

Implements RooAbsFunc.

Definition at line 287 of file RooRealBinding.cxx.

## ◆ getMinLimit()

 Double_t RooRealBinding::getMinLimit ( UInt_t dimension ) const
virtual

Return lower limit on i-th variable.

Implements RooAbsFunc.

Definition at line 276 of file RooRealBinding.cxx.

## ◆ getName()

 const char * RooRealBinding::getName ( ) const
virtual

Return name of function.

Reimplemented from RooAbsFunc.

Definition at line 297 of file RooRealBinding.cxx.

## ◆ getValues()

 RooSpan< const double > RooRealBinding::getValues ( std::vector< RooSpan< const double > > coordinates ) const
virtual

Evaluate the bound object at all locations indicated by the data in coordinates.

If _clipInvalid is set, the function is set to zero at all points in the arguments that are not within the range of the observables.

Parameters
 coordinates Vector of spans that contain the points where the function should be evaluated. The ordinal position in the vector corresponds to the ordinal position in the set of {observables, parameters} that were passed to the constructor. The spans can either have a size of n, in which case a batch of n results is returned, or they can have a size of 1. In the latter case, the value in the span is broadcast to all n events.
Returns
Batch of function values for each coordinate given in the input spans. If a parameter is invalid, i.e., out of its range, an empty span is returned. If an observable is invalid, the function value is 0.

Reimplemented in RooDataProjBinding, and RooRealAnalytic.

Definition at line 209 of file RooRealBinding.cxx.

## ◆ getValuesOfBoundFunction()

 RooSpan< const double > RooRealBinding::getValuesOfBoundFunction ( RooBatchCompute::RunContext & evalData ) const

Evaluate the bound object at all locations indicated by the data in evalData.

RooAbsReal::getValues().
Parameters
 [in/out] evalData Struct with spans pointing to the data to be used for evaluation. The spans can either have a size of n, in which case a batch of n results is returned, or they can have a size of 1. In the latter case, the value in the span is broadcast to all n events.
Returns
Batch of function values for each coordinate given in the input spans.

Definition at line 268 of file RooRealBinding.cxx.

 void RooRealBinding::loadValues ( const Double_t xvector[] ) const
protected

Load the vector of variable values into the RooRealVars associated as variables with the bound RooAbsReal function.

Warning
This will load as many values as the dimensionality of the function requires. The size of xvector is not checked.

Definition at line 171 of file RooRealBinding.cxx.

## ◆ observable()

 RooAbsRealLValue * RooRealBinding::observable ( unsigned int i ) const
inline

Return a pointer to the observable that defines the i-th dimension of the function.

Definition at line 48 of file RooRealBinding.h.

## ◆ operator()()

 Double_t RooRealBinding::operator() ( const Double_t xvector[] ) const
virtual

Evaluate the bound RooAbsReal at the variable values provided in xvector.

Implements RooAbsFunc.

Reimplemented in RooDataProjBinding, and RooRealAnalytic.

Definition at line 189 of file RooRealBinding.cxx.

## ◆ plotSamplingHint()

 std::list< Double_t > * RooRealBinding::plotSamplingHint ( RooAbsRealLValue & , Double_t , Double_t ) const
virtual

Interface for returning an optional hint for initial sampling points when constructing a curve projected on observable.

Reimplemented from RooAbsFunc.

Definition at line 305 of file RooRealBinding.cxx.

## ◆ restoreXVec()

 void RooRealBinding::restoreXVec ( ) const
virtual

Restore value of all variables to previously saved values by saveXVec()

Reimplemented from RooAbsFunc.

Definition at line 143 of file RooRealBinding.cxx.

## ◆ saveXVec()

 void RooRealBinding::saveXVec ( ) const
virtual

Save value of all variables.

Reimplemented from RooAbsFunc.

Definition at line 108 of file RooRealBinding.cxx.

## ◆ _clipInvalid

 Bool_t RooRealBinding::_clipInvalid
protected

Definition at line 58 of file RooRealBinding.h.

## ◆ _compList

 std::vector RooRealBinding::_compList
mutableprotected

Definition at line 62 of file RooRealBinding.h.

## ◆ _compSave

 std::vector RooRealBinding::_compSave
mutableprotected

Definition at line 63 of file RooRealBinding.h.

## ◆ _evalData

 std::unique_ptr RooRealBinding::_evalData
mutableprotected

Definition at line 65 of file RooRealBinding.h.

## ◆ _func

 const RooAbsReal* RooRealBinding::_func
protected

Definition at line 54 of file RooRealBinding.h.

## ◆ _funcSave

 Double_t RooRealBinding::_funcSave
mutableprotected

Definition at line 64 of file RooRealBinding.h.

## ◆ _nset

 const RooArgSet* RooRealBinding::_nset
protected

Definition at line 56 of file RooRealBinding.h.

## ◆ _rangeName

 const TNamed* RooRealBinding::_rangeName
protected

Definition at line 60 of file RooRealBinding.h.

## ◆ _vars

 std::vector RooRealBinding::_vars
protected

Definition at line 55 of file RooRealBinding.h.

## ◆ _xsave

 Double_t* RooRealBinding::_xsave
mutableprotected

Definition at line 59 of file RooRealBinding.h.

## ◆ _xvecValid

 Bool_t RooRealBinding::_xvecValid
mutableprotected

Definition at line 57 of file RooRealBinding.h.

Libraries for RooRealBinding:
[legend]

The documentation for this class was generated from the following files: