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

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

#include <DbnUtils.h>

Public Member Functions

Dbn axis scalings
void scaleZ (double factor)
 
void scaleXZ (double fx, double fz)
 
void scaleYZ (double fy, double fz)
 
void scaleXYZ (double fx, double fy, double fz)
 
Dbn statistics
double zMean () const
 
double zVariance () const
 
double zStdDev () const
 
double zStdErr () const
 
double zRMS () const
 
double sumWZ () const
 
double sumWZ2 () const
 
double sumWXZ () const
 
double sumWYZ () const
 

Detailed Description

template<class Derived>
struct YODA::ZDbnMixin< Derived >

CRTP mixin introducing convenience aliases along Z axis.

Definition at line 81 of file DbnUtils.h.

Member Function Documentation

◆ scaleXYZ()

template<class Derived >
void YODA::ZDbnMixin< Derived >::scaleXYZ ( double  fx,
double  fy,
double  fz 
)
inline

Definition at line 100 of file DbnUtils.h.

100 {
101 static_cast<Derived*>(this)->scale(1,fx);
102 static_cast<Derived*>(this)->scale(2,fy);
103 static_cast<Derived*>(this)->scale(3,fz);
104 }

◆ scaleXZ()

template<class Derived >
void YODA::ZDbnMixin< Derived >::scaleXZ ( double  fx,
double  fz 
)
inline

Definition at line 90 of file DbnUtils.h.

90 {
91 static_cast<Derived*>(this)->scale(1,fx);
92 static_cast<Derived*>(this)->scale(3,fz);
93 }

◆ scaleYZ()

template<class Derived >
void YODA::ZDbnMixin< Derived >::scaleYZ ( double  fy,
double  fz 
)
inline

Definition at line 95 of file DbnUtils.h.

95 {
96 static_cast<Derived*>(this)->scale(2,fy);
97 static_cast<Derived*>(this)->scale(3,fz);
98 }

◆ scaleZ()

template<class Derived >
void YODA::ZDbnMixin< Derived >::scaleZ ( double  factor)
inline

Definition at line 86 of file DbnUtils.h.

86 {
87 static_cast<Derived*>(this)->scale(3,factor);
88 }

◆ sumWXZ()

template<class Derived >
double YODA::ZDbnMixin< Derived >::sumWXZ ( ) const
inline

Definition at line 118 of file DbnUtils.h.

118{ return static_cast<const Derived*>(this)->crossTerm(0,2); }

◆ sumWYZ()

template<class Derived >
double YODA::ZDbnMixin< Derived >::sumWYZ ( ) const
inline

Definition at line 119 of file DbnUtils.h.

119{ return static_cast<const Derived*>(this)->crossTerm(1,2); }

◆ sumWZ()

template<class Derived >
double YODA::ZDbnMixin< Derived >::sumWZ ( ) const
inline

Definition at line 116 of file DbnUtils.h.

116{ return static_cast<const Derived*>(this)->sumW(3); }

◆ sumWZ2()

template<class Derived >
double YODA::ZDbnMixin< Derived >::sumWZ2 ( ) const
inline

Definition at line 117 of file DbnUtils.h.

117{ return static_cast<const Derived*>(this)->sumW2(3); }

◆ zMean()

template<class Derived >
double YODA::ZDbnMixin< Derived >::zMean ( ) const
inline

Definition at line 111 of file DbnUtils.h.

111{ return static_cast<const Derived*>(this)->mean(3); }
double mean(const std::vector< int > &sample)
Calculate the mean of a sample.
Definition MathUtils.h:391

References YODA::mean().

◆ zRMS()

template<class Derived >
double YODA::ZDbnMixin< Derived >::zRMS ( ) const
inline

Definition at line 115 of file DbnUtils.h.

115{ return static_cast<const Derived*>(this)->RMS(3); }
double RMS(const double sumWX2, const double sumW, const double sumW2)
Calculate the weighted RMS of a sample.
Definition MathUtils.h:489

References YODA::RMS().

◆ zStdDev()

template<class Derived >
double YODA::ZDbnMixin< Derived >::zStdDev ( ) const
inline

Definition at line 113 of file DbnUtils.h.

113{ return static_cast<const Derived*>(this)->stdDev(3); }
double stdDev(const double sumWX, const double sumW, const double sumWX2, const double sumW2)
Calculate the weighted standard deviation of a sample.
Definition MathUtils.h:458

References YODA::stdDev().

◆ zStdErr()

template<class Derived >
double YODA::ZDbnMixin< Derived >::zStdErr ( ) const
inline

Definition at line 114 of file DbnUtils.h.

114{ return static_cast<const Derived*>(this)->stdErr(3); }
double stdErr(const double sumWX, const double sumW, const double sumWX2, const double sumW2)
Calculate the weighted standard error of a sample.
Definition MathUtils.h:470

References YODA::stdErr().

◆ zVariance()

template<class Derived >
double YODA::ZDbnMixin< Derived >::zVariance ( ) const
inline

Definition at line 112 of file DbnUtils.h.

112{ return static_cast<const Derived*>(this)->variance(3); }
double variance(const double sumWX, const double sumW, const double sumWX2, const double sumW2)
Calculate the weighted variance of a sample.
Definition MathUtils.h:421

References YODA::variance().


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