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=nullptr, bool clipInvalid=false, const TNamed *rangeName=nullptr) | |
Construct a lightweight function binding of RooAbsReal func to variables 'vars'. | |
RooRealBinding (const RooRealBinding &other, const RooArgSet *nset=nullptr) | |
Construct a lightweight function binding of RooAbsReal func to variables 'vars'. | |
~RooRealBinding () override | |
std::list< double > * | binBoundaries (Int_t) const override |
double | getMaxLimit (UInt_t dimension) const override |
Return upper limit on i-th variable. | |
double | getMinLimit (UInt_t dimension) const override |
Return lower limit on i-th variable. | |
const char * | getName () const override |
Return name of function. | |
virtual RooSpan< const double > | getValues (std::vector< RooSpan< const double > > coordinates) const |
Evaluate the bound object at all locations indicated by the data in coordinates . | |
RooSpan< const double > | getValuesOfBoundFunction (RooBatchCompute::RunContext &evalData) const |
Evaluate the bound object at all locations indicated by the data in evalData . | |
TClass * | IsA () const override |
RooAbsRealLValue * | observable (unsigned int i) const |
Return a pointer to the observable that defines the i -th dimension of the function. | |
double | operator() (const double xvector[]) const override |
Evaluate the bound RooAbsReal at the variable values provided in xvector. | |
std::list< double > * | plotSamplingHint (RooAbsRealLValue &, double, double) const override |
Interface for returning an optional hint for initial sampling points when constructing a curve projected on observable. | |
void | restoreXVec () const override |
Restore value of all variables to previously saved values by saveXVec() | |
void | saveXVec () const override |
Save value of all variables. | |
void | Streamer (TBuffer &) override |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from RooAbsFunc | |
RooAbsFunc (const RooAbsFunc &other) | |
RooAbsFunc (UInt_t dimension) | |
virtual | ~RooAbsFunc () |
UInt_t | getDimension () const |
bool | isValid () const |
Int_t | numCall () const |
Return number of function calls since last reset. | |
void | resetNumCall () const |
Reset function call counter. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Static Public Member Functions | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from RooAbsFunc | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Protected Member Functions | |
void | loadValues (const double xvector[]) const |
Load the vector of variable values into the RooRealVars associated as variables with the bound RooAbsReal function. | |
Protected Attributes | |
bool | _clipInvalid |
std::vector< RooAbsReal * > | _compList |
! | |
std::vector< double > | _compSave |
! | |
std::unique_ptr< RooBatchCompute::RunContext > | _evalData |
Memory for batch evaluations. | |
const RooAbsReal * | _func |
double | _funcSave |
! | |
const RooArgSet * | _nset |
const TNamed * | _rangeName |
! | |
std::vector< RooAbsRealLValue * > | _vars |
Non-owned pointers to variables. | |
std::vector< double > | _xsave |
bool | _xvecValid |
Protected Attributes inherited from RooAbsFunc | |
UInt_t | _dimension |
Number of observables. | |
Int_t | _ncall |
Function call counter. | |
bool | _valid |
Is binding in valid state? | |
#include <RooRealBinding.h>
RooRealBinding::RooRealBinding | ( | const RooAbsReal & | func, |
const RooArgSet & | vars, | ||
const RooArgSet * | nset = nullptr , |
||
bool | clipInvalid = false , |
||
const TNamed * | rangeName = nullptr |
||
) |
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::RooRealBinding | ( | const RooRealBinding & | other, |
const RooArgSet * | nset = nullptr |
||
) |
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.
|
overridedefault |
Reimplemented from RooAbsFunc.
Definition at line 303 of file RooRealBinding.cxx.
|
static |
|
inlinestaticconstexpr |
Definition at line 67 of file RooRealBinding.h.
|
inlinestatic |
Definition at line 67 of file RooRealBinding.h.
Return upper limit on i-th variable.
Implements RooAbsFunc.
Definition at line 277 of file RooRealBinding.cxx.
Return lower limit on i-th variable.
Implements RooAbsFunc.
Definition at line 266 of file RooRealBinding.cxx.
|
overridevirtual |
Return name of function.
Reimplemented from RooAbsFunc.
Definition at line 287 of file RooRealBinding.cxx.
|
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.
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. |
Reimplemented in RooDataProjBinding, and RooRealAnalytic.
Definition at line 199 of file RooRealBinding.cxx.
RooSpan< const double > RooRealBinding::getValuesOfBoundFunction | ( | RooBatchCompute::RunContext & | evalData | ) | const |
Evaluate the bound object at all locations indicated by the data in evalData
.
[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. |
Definition at line 258 of file RooRealBinding.cxx.
|
inlineoverridevirtual |
Reimplemented from RooAbsFunc.
Definition at line 67 of file RooRealBinding.h.
|
protected |
Load the vector of variable values into the RooRealVars associated as variables with the bound RooAbsReal function.
xvector
is not checked. Definition at line 161 of file RooRealBinding.cxx.
|
inline |
Return a pointer to the observable that defines the i
-th dimension of the function.
Definition at line 48 of file RooRealBinding.h.
Evaluate the bound RooAbsReal at the variable values provided in xvector.
Implements RooAbsFunc.
Definition at line 179 of file RooRealBinding.cxx.
|
overridevirtual |
Interface for returning an optional hint for initial sampling points when constructing a curve projected on observable.
Reimplemented from RooAbsFunc.
Definition at line 295 of file RooRealBinding.cxx.
|
overridevirtual |
Restore value of all variables to previously saved values by saveXVec()
Reimplemented from RooAbsFunc.
Definition at line 133 of file RooRealBinding.cxx.
|
overridevirtual |
Save value of all variables.
Reimplemented from RooAbsFunc.
Definition at line 101 of file RooRealBinding.cxx.
|
overridevirtual |
Reimplemented from RooAbsFunc.
|
inline |
Definition at line 67 of file RooRealBinding.h.
|
protected |
Definition at line 58 of file RooRealBinding.h.
|
mutableprotected |
!
Definition at line 62 of file RooRealBinding.h.
|
mutableprotected |
!
Definition at line 63 of file RooRealBinding.h.
|
mutableprotected |
Memory for batch evaluations.
Definition at line 65 of file RooRealBinding.h.
|
protected |
Definition at line 54 of file RooRealBinding.h.
|
mutableprotected |
!
Definition at line 64 of file RooRealBinding.h.
|
protected |
Definition at line 56 of file RooRealBinding.h.
|
protected |
!
Definition at line 60 of file RooRealBinding.h.
|
protected |
Non-owned pointers to variables.
Definition at line 55 of file RooRealBinding.h.
|
mutableprotected |
Definition at line 59 of file RooRealBinding.h.
|
mutableprotected |
Definition at line 57 of file RooRealBinding.h.