Logo ROOT  
Reference Guide
RooDataProjBinding Class Reference

adaptor that projects a real function via summation of states provided in a dataset.

The real function must be attached to the dataset before creating this binding object.

If the dataset only contains category variables, the summation is optimized performing a weighted sum over the states of a RooSuperCategory that is constructed from all the categories in the dataset

Definition at line 25 of file RooDataProjBinding.h.

Public Member Functions

 RooDataProjBinding (const RooAbsReal &real, const RooAbsData &data, const RooArgSet &vars, const RooArgSet *normSet=0)
 Constructor of a data weighted average function binding with variables 'vars' for function 'real' and dataset 'data' with weights. More...
 
 ~RooDataProjBinding () override
 Destructor, delete owned objects. More...
 
RooSpan< const doublegetValues (std::vector< RooSpan< const double > > coordinates) const override
 Evaluate the function at the specified values of the dependents. More...
 
TClassIsA () const override
 
double operator() (const double xvector[]) const override
 Evaluate data-projected values of the bound real function. More...
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from RooRealBinding
 RooRealBinding (const RooAbsReal &func, const RooArgSet &vars, const RooArgSet *nset=0, bool clipInvalid=false, 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...
 
 ~RooRealBinding () override
 Destructor. More...
 
std::list< double > * binBoundaries (Int_t) const override
 
double getMaxLimit (UInt_t dimension) const override
 Return upper limit on i-th variable. More...
 
double getMinLimit (UInt_t dimension) const override
 Return lower limit on i-th variable. More...
 
const char * getName () const override
 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...
 
TClassIsA () const override
 
RooAbsRealLValueobservable (unsigned int i) const
 Return a pointer to the observable that defines the i-th dimension of the function. More...
 
double operator() (const double xvector[]) const override
 Evaluate the bound RooAbsReal at the variable values provided in xvector. More...
 
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. More...
 
void restoreXVec () const override
 Restore value of all variables to previously saved values by saveXVec() More...
 
void saveXVec () const override
 Save value of all variables. More...
 
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 ()
 
virtual std::list< double > * binBoundaries (Int_t) const
 
UInt_t getDimension () const
 
virtual double getMaxLimit (UInt_t dimension) const =0
 
virtual double getMinLimit (UInt_t dimension) const =0
 
virtual const char * getName () const
 Name of function binding. More...
 
virtual TClassIsA () const
 
bool isValid () const
 
Int_t numCall () const
 Return number of function calls since last reset. More...
 
virtual double operator() (const double xvector[]) const =0
 
virtual std::list< double > * plotSamplingHint (RooAbsRealLValue &, double, double) const
 Interface for returning an optional hint for initial sampling points when constructing a curve projected on observable. More...
 
void resetNumCall () const
 Reset function call counter. More...
 
virtual void restoreXVec () const
 
virtual void saveXVec () const
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from RooRealBinding
static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from RooAbsFunc
static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Attributes

std::unique_ptr< std::vector< double > > _batchBuffer
 ! Storage for handing out spans. More...
 
Roo1DTable_catTable
 Supercategory table generated from _data. More...
 
const RooAbsData_data
 Dataset used for projection. More...
 
bool _first
 Bit indicating if operator() has been called yet. More...
 
const RooArgSet_nset
 Normalization set for real function. More...
 
const RooAbsReal_real
 Real function to be projected. More...
 
RooSuperCategory_superCat
 Supercategory constructed from _data's category variables. More...
 
- Protected Attributes inherited from RooRealBinding
bool _clipInvalid
 
std::vector< RooAbsReal * > _compList
 ! More...
 
std::vector< double_compSave
 ! More...
 
std::unique_ptr< RooBatchCompute::RunContext_evalData
 Memory for batch evaluations. More...
 
const RooAbsReal_func
 
double _funcSave
 ! More...
 
const RooArgSet_nset
 
const TNamed_rangeName
 ! More...
 
std::vector< RooAbsRealLValue * > _vars
 Non-owned pointers to variables. More...
 
double_xsave
 
bool _xvecValid
 
- Protected Attributes inherited from RooAbsFunc
UInt_t _dimension
 Number of observables. More...
 
Int_t _ncall
 Function call counter. More...
 
bool _valid
 Is binding in valid state? More...
 

Additional Inherited Members

- Protected Member Functions inherited from RooRealBinding
void loadValues (const double xvector[]) const
 Load the vector of variable values into the RooRealVars associated as variables with the bound RooAbsReal function. More...
 

#include <RooDataProjBinding.h>

Inheritance diagram for RooDataProjBinding:
[legend]

Constructor & Destructor Documentation

◆ RooDataProjBinding()

RooDataProjBinding::RooDataProjBinding ( const RooAbsReal real,
const RooAbsData data,
const RooArgSet vars,
const RooArgSet normSet = 0 
)

Constructor of a data weighted average function binding with variables 'vars' for function 'real' and dataset 'data' with weights.

Definition at line 55 of file RooDataProjBinding.cxx.

◆ ~RooDataProjBinding()

RooDataProjBinding::~RooDataProjBinding ( )
override

Destructor, delete owned objects.

Definition at line 78 of file RooDataProjBinding.cxx.

Member Function Documentation

◆ Class()

static TClass * RooDataProjBinding::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * RooDataProjBinding::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static Version_t RooDataProjBinding::Class_Version ( )
inlinestatic
Returns
Version of this class

Definition at line 45 of file RooDataProjBinding.h.

◆ DeclFileName()

static const char * RooDataProjBinding::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 45 of file RooDataProjBinding.h.

◆ getValues()

RooSpan< const double > RooDataProjBinding::getValues ( std::vector< RooSpan< const double > >  coordinates) const
overridevirtual

Evaluate the function at the specified values of the dependents.

Reimplemented from RooRealBinding.

Definition at line 160 of file RooDataProjBinding.cxx.

◆ IsA()

TClass * RooDataProjBinding::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from RooAbsFunc.

Definition at line 45 of file RooDataProjBinding.h.

◆ operator()()

double RooDataProjBinding::operator() ( const double  xvector[]) const
overridevirtual

Evaluate data-projected values of the bound real function.

Implements RooAbsFunc.

Definition at line 89 of file RooDataProjBinding.cxx.

◆ Streamer()

void RooDataProjBinding::Streamer ( TBuffer )
overridevirtual

Reimplemented from RooAbsFunc.

◆ StreamerNVirtual()

void RooDataProjBinding::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 45 of file RooDataProjBinding.h.

Member Data Documentation

◆ _batchBuffer

std::unique_ptr<std::vector<double> > RooDataProjBinding::_batchBuffer
mutableprotected

! Storage for handing out spans.

Definition at line 43 of file RooDataProjBinding.h.

◆ _catTable

Roo1DTable* RooDataProjBinding::_catTable
protected

Supercategory table generated from _data.

Definition at line 42 of file RooDataProjBinding.h.

◆ _data

const RooAbsData* RooDataProjBinding::_data
protected

Dataset used for projection.

Definition at line 38 of file RooDataProjBinding.h.

◆ _first

bool RooDataProjBinding::_first
mutableprotected

Bit indicating if operator() has been called yet.

Definition at line 36 of file RooDataProjBinding.h.

◆ _nset

const RooArgSet* RooDataProjBinding::_nset
protected

Normalization set for real function.

Definition at line 39 of file RooDataProjBinding.h.

◆ _real

const RooAbsReal* RooDataProjBinding::_real
protected

Real function to be projected.

Definition at line 37 of file RooDataProjBinding.h.

◆ _superCat

RooSuperCategory* RooDataProjBinding::_superCat
protected

Supercategory constructed from _data's category variables.

Definition at line 41 of file RooDataProjBinding.h.

Libraries for RooDataProjBinding:
[legend]

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