CFEL - ASG Software Suite  2.5.0
CASS
Functions
cass::histogramming Namespace Reference

Functions

template<typename AxisPrecessionType , typename ResultValueType >
size_t bin (const Axis< AxisPrecessionType > &xaxis, const ResultValueType &value)
 calculate the index of the lineared array More...
 
template<typename AxisPrecessionType , typename coordinate_t >
size_t bin (const Axis< AxisPrecessionType > &xAxis, const Axis< AxisPrecessionType > &yAxis, const coordinate_t &coordinate)
 calculate the corresponding index in the linearized array of a coordinate More...
 

Function Documentation

template<typename AxisPrecessionType , typename ResultValueType >
size_t cass::histogramming::bin ( const Axis< AxisPrecessionType > &  xaxis,
const ResultValueType &  value 
)

calculate the index of the lineared array

calculates the bin Index of the linearized array that the provided position corresponds to

Template Parameters
AxisPrecessionTypethe precision of the axis values
ResultValueTypethe type within the result container
Returns
correct bin index of 1d histogram or overflow / underflow
Parameters
xAxisThe axis used to determin the bin for the value
valueThe value whos corresponding bin should be found

Definition at line 143 of file result.hpp.

References cass::Axis< T >::bin(), cass::Axis< T >::isOverflow(), cass::Axis< T >::isUnderflow(), and cass::Axis< T >::nBins.

Referenced by cass::Result< float >::histogram(), cass::pp65::histogramAndBinCountWithConstant(), cass::pp65::histogramAndBinCountWithWeightFrom0DInput(), cass::pp65::histogramAndBinCountWithWeights(), cass::pp240::loadSettings(), cass::pp334::process(), cass::pp244::process(), cass::pp81::process(), cass::pp90::Q(), cass::pp90::R(), and cass::pp90::Rad().

template<typename AxisPrecessionType , typename coordinate_t >
size_t cass::histogramming::bin ( const Axis< AxisPrecessionType > &  xAxis,
const Axis< AxisPrecessionType > &  yAxis,
const coordinate_t &  coordinate 
)

calculate the corresponding index in the linearized array of a coordinate

calculates the bin index of the linearized array that the provided coordinate corresponds to. It uses the two provided axis object to do so.

Template Parameters
AxisPrecessionTypethe precision of the axis values
coordinate_tthe coordinate type. Expected to be std::pair
Returns
correct bin index of 1d histogram or overflow / underflow
Parameters
xAxisThe x-axis used to determin the bin for the coordinate
yAxisThe y-axis used to determin the bin for the coordinate
coordinateThe coordinate whos corresponding bin should be found

Definition at line 167 of file result.hpp.

References cass::Axis< T >::bin(), cass::Axis< T >::isOverflow(), cass::Axis< T >::isUnderflow(), and cass::Axis< T >::nBins.

Referenced by cass::Result< float >::histogram().