Belle II Software development
BinnedVariable Class Reference

A variable with binning information. More...

#include <Types.h>

Inheritance diagram for BinnedVariable:
Variable

Public Member Functions

 BinnedVariable (const std::string &variableName, int _nBins, float _lowBin, float _highBin)
 Constructs a new BinnedVariable.
 
int getNbins () const
 Retrieves the number of bins.
 
float getLowBin () const
 Retrieves the lower bin edge.
 
float getHighBin () const
 Retrieves the upper bin edge.
 
virtual std::string getName () const
 Retrieves the name of the variable.
 

Private Attributes

int nBins
 The number of bins.
 
float lowBin
 The lower bin boundary.
 
float highBin
 The upper bin boundary.
 
std::string name
 The name of the variable.
 

Detailed Description

A variable with binning information.

Definition at line 83 of file Types.h.

Constructor & Destructor Documentation

◆ BinnedVariable()

BinnedVariable ( const std::string & variableName,
int _nBins,
float _lowBin,
float _highBin )
inline

Constructs a new BinnedVariable.

Parameters
variableNameThe name of the variable.
_nBinsThe number of bins.
_lowBinThe lower edge of the bin range.
_highBinThe upper edge of the bin range.

Definition at line 92 of file Types.h.

93 : Variable(variableName)
94 , nBins{_nBins}
95 , lowBin{_lowBin}
96 , highBin{_highBin}
97 {}

Member Function Documentation

◆ getHighBin()

float getHighBin ( ) const
inline

Retrieves the upper bin edge.

Returns
The upper bin edge.

Definition at line 115 of file Types.h.

115{ return highBin; }

◆ getLowBin()

float getLowBin ( ) const
inline

Retrieves the lower bin edge.

Returns
The lower bin edge.

Definition at line 109 of file Types.h.

109{ return lowBin; }

◆ getName()

virtual std::string getName ( ) const
inlinevirtualinherited

Retrieves the name of the variable.

Returns
The variable name as a std::string.

Definition at line 42 of file Types.h.

42{ return name; }

◆ getNbins()

int getNbins ( ) const
inline

Retrieves the number of bins.

Returns
The number of bins.

Definition at line 103 of file Types.h.

103{ return nBins; }

Member Data Documentation

◆ highBin

float highBin
private

The upper bin boundary.

Definition at line 120 of file Types.h.

◆ lowBin

float lowBin
private

The lower bin boundary.

Definition at line 119 of file Types.h.

◆ name

std::string name
privateinherited

The name of the variable.

Definition at line 50 of file Types.h.

◆ nBins

int nBins
private

The number of bins.

Definition at line 118 of file Types.h.


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