yoda is hosted by Hepforge, IPPP Durham
YODA - Yet more Objects for Data Analysis 2.0.2
YODA::ZAxisMixin< Derived, EdgeT > Struct Template Reference

CRTP mixin introducing convenience aliases along Z axis. More...

#include <BinnedUtils.h>

Public Member Functions

Bin accessors
size_t numBinsZ (const bool includeOverflows=false) const
 Number of bins along the Z axis.
 
template<class T = EdgeT>
enable_if_CAxisT< T > zMin () const
 Low edge of second histo's axis.
 
template<class T = EdgeT>
enable_if_CAxisT< T > zMax () const
 High edge of second histo's axis.
 
std::vector< EdgeT > zEdges (const bool includeOverflows=false) const
 All bin edges on Z axis. +-inf edges are included.
 
template<class T = EdgeT>
std::enable_if_t< std::is_floating_point< T >::value, std::vector< T > > zWidths (const bool includeOverflows=false) const
 All widths on Z axis.
 
void rebinZBy (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 
void rebinZTo (const std::vector< double > &newedges)
 
void rebinZ (unsigned int n, size_t begin=1, size_t end=UINT_MAX)
 
void rebinZ (const std::vector< double > &newedges)
 

Detailed Description

template<class Derived, typename EdgeT = double>
struct YODA::ZAxisMixin< Derived, EdgeT >

CRTP mixin introducing convenience aliases along Z axis.

Definition at line 198 of file BinnedUtils.h.

Member Function Documentation

◆ numBinsZ()

template<class Derived , typename EdgeT = double>
size_t YODA::ZAxisMixin< Derived, EdgeT >::numBinsZ ( const bool  includeOverflows = false) const
inline

Number of bins along the Z axis.

Definition at line 204 of file BinnedUtils.h.

204 {
205 return static_cast<const Derived*>(this)->numBinsAt(2, includeOverflows);
206 }

◆ rebinZ() [1/2]

template<class Derived , typename EdgeT = double>
void YODA::ZAxisMixin< Derived, EdgeT >::rebinZ ( const std::vector< double > &  newedges)
inline

Definition at line 242 of file BinnedUtils.h.

242 {
243 static_cast<Derived*>(this)->template rebinTo<2>(newedges);
244 }

◆ rebinZ() [2/2]

template<class Derived , typename EdgeT = double>
void YODA::ZAxisMixin< Derived, EdgeT >::rebinZ ( unsigned int  n,
size_t  begin = 1,
size_t  end = UINT_MAX 
)
inline

Definition at line 238 of file BinnedUtils.h.

238 {
239 static_cast<Derived*>(this)->template rebinBy<2>(n, begin, end);
240 }

◆ rebinZBy()

template<class Derived , typename EdgeT = double>
void YODA::ZAxisMixin< Derived, EdgeT >::rebinZBy ( unsigned int  n,
size_t  begin = 1,
size_t  end = UINT_MAX 
)
inline

Definition at line 230 of file BinnedUtils.h.

230 {
231 static_cast<Derived*>(this)->template rebinBy<2>(n, begin, end);
232 }

◆ rebinZTo()

template<class Derived , typename EdgeT = double>
void YODA::ZAxisMixin< Derived, EdgeT >::rebinZTo ( const std::vector< double > &  newedges)
inline

Definition at line 234 of file BinnedUtils.h.

234 {
235 static_cast<Derived*>(this)->template rebinTo<2>(newedges);
236 }

◆ zEdges()

template<class Derived , typename EdgeT = double>
std::vector< EdgeT > YODA::ZAxisMixin< Derived, EdgeT >::zEdges ( const bool  includeOverflows = false) const
inline

All bin edges on Z axis. +-inf edges are included.

Definition at line 217 of file BinnedUtils.h.

217 {
218 return static_cast<const Derived*>(this)->template edges<2>(includeOverflows);
219 }

◆ zMax()

template<class Derived , typename EdgeT = double>
template<class T = EdgeT>
enable_if_CAxisT< T > YODA::ZAxisMixin< Derived, EdgeT >::zMax ( ) const
inline

High edge of second histo's axis.

Definition at line 214 of file BinnedUtils.h.

214{ return static_cast<const Derived*>(this)->template max<2>(); }

◆ zMin()

template<class Derived , typename EdgeT = double>
template<class T = EdgeT>
enable_if_CAxisT< T > YODA::ZAxisMixin< Derived, EdgeT >::zMin ( ) const
inline

Low edge of second histo's axis.

Definition at line 210 of file BinnedUtils.h.

210{ return static_cast<const Derived*>(this)->template min<2>(); }

◆ zWidths()

template<class Derived , typename EdgeT = double>
template<class T = EdgeT>
std::enable_if_t< std::is_floating_point< T >::value, std::vector< T > > YODA::ZAxisMixin< Derived, EdgeT >::zWidths ( const bool  includeOverflows = false) const
inline

All widths on Z axis.

Note
Only supported for continuous axes

Definition at line 226 of file BinnedUtils.h.

226 {
227 return static_cast<const Derived*>(this)->template widths<2>(includeOverflows);
228 }

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