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

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

#include <PointUtils.h>

Public Member Functions

Point accessors
double z () const
 Get z value.
 
void setZ (double z)
 Set the y value.
 
void setXYZ (double x, double y, double z)
 Set x and y values.
 
x error accessors
std::pair< double, double > zErrs () const
 Get y error pair.
 
double zErrMinus () const
 Get minus z error.
 
double zErrPlus () const
 Get plus z error.
 
double zErrAvg () const
 
void setZErrMinus (double err)
 Set the minus z errors.
 
void setZErrPlus (double err)
 Set the plus y errors.
 
void setZErr (double ez)
 Set symmetric z error.
 
void setZErrs (double ez)
 Set symmetric z error (alias)
 
void setZErrs (double errminus, double errplus)
 Set the z errors.
 
void setZErrs (std::pair< double, double > errs)
 Set the z errors.
 
double zMin () const
 Get value minus negative y-error.
 
double zMax () const
 Get value plus positive y-error.
 
Combined z value and error setters
void setZ (double z, double ez)
 Set z value and symmetric error.
 
void setZ (double z, double ezminus, double ezplus)
 Set y value and asymmetric error.
 
void setZ (double z, std::pair< double, double > &ez)
 Set z value and asymmetric error.
 
void scaleZ (double scalez)
 Scaling of z axis.
 

Detailed Description

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

CRTP mixin introducing convenience aliases along Z axis.

Definition at line 281 of file PointUtils.h.

Member Function Documentation

◆ scaleZ()

template<class Derived >
void YODA::ZDirectionMixin< Derived >::scaleZ ( double  scalez)
inline

Scaling of z axis.

Definition at line 398 of file PointUtils.h.

398 {
399 setZ(z()*scalez);
400 setZErrs(zErrMinus()*scalez, zErrPlus()*scalez);
401 }
double zErrPlus() const
Get plus z error.
Definition PointUtils.h:319
double zErrMinus() const
Get minus z error.
Definition PointUtils.h:314
void setZ(double z)
Set the y value.
Definition PointUtils.h:292
void setZErrs(double ez)
Set symmetric z error (alias)
Definition PointUtils.h:345
double z() const
Get z value.
Definition PointUtils.h:287

References YODA::ZDirectionMixin< Derived >::setZ(), YODA::ZDirectionMixin< Derived >::setZErrs(), YODA::ZDirectionMixin< Derived >::z(), YODA::ZDirectionMixin< Derived >::zErrMinus(), and YODA::ZDirectionMixin< Derived >::zErrPlus().

◆ setXYZ()

template<class Derived >
void YODA::ZDirectionMixin< Derived >::setXYZ ( double  x,
double  y,
double  z 
)
inline

Set x and y values.

Definition at line 297 of file PointUtils.h.

297 {
298 static_cast<Derived*>(this)->setVal(0, x);
299 static_cast<Derived*>(this)->setVal(1, y);
300 static_cast<Derived*>(this)->setVal(2, z);
301 }

References YODA::ZDirectionMixin< Derived >::z().

◆ setZ() [1/4]

template<class Derived >
void YODA::ZDirectionMixin< Derived >::setZ ( double  z)
inline

Set the y value.

Definition at line 292 of file PointUtils.h.

292 {
293 static_cast<Derived*>(this)->setVal(2, z);
294 }

References YODA::ZDirectionMixin< Derived >::z().

Referenced by YODA::ZDirectionMixin< Derived >::scaleZ(), YODA::ZDirectionMixin< Derived >::setZ(), YODA::ZDirectionMixin< Derived >::setZ(), and YODA::ZDirectionMixin< Derived >::setZ().

◆ setZ() [2/4]

template<class Derived >
void YODA::ZDirectionMixin< Derived >::setZ ( double  z,
double  ez 
)
inline

Set z value and symmetric error.

Definition at line 375 of file PointUtils.h.

375 {
376 setZ(z);
377 setZErr(ez);
378 }
void setZErr(double ez)
Set symmetric z error.
Definition PointUtils.h:339

References YODA::ZDirectionMixin< Derived >::setZ(), YODA::ZDirectionMixin< Derived >::setZErr(), and YODA::ZDirectionMixin< Derived >::z().

◆ setZ() [3/4]

template<class Derived >
void YODA::ZDirectionMixin< Derived >::setZ ( double  z,
double  ezminus,
double  ezplus 
)
inline

Set y value and asymmetric error.

Definition at line 381 of file PointUtils.h.

381 {
382 setZ(z);
383 setZErrs(ezminus, ezplus);
384 }

References YODA::ZDirectionMixin< Derived >::setZ(), YODA::ZDirectionMixin< Derived >::setZErrs(), and YODA::ZDirectionMixin< Derived >::z().

◆ setZ() [4/4]

template<class Derived >
void YODA::ZDirectionMixin< Derived >::setZ ( double  z,
std::pair< double, double > &  ez 
)
inline

Set z value and asymmetric error.

Definition at line 387 of file PointUtils.h.

387 {
388 setZ(z);
389 setZErrs(ez);
390 }

References YODA::ZDirectionMixin< Derived >::setZ(), YODA::ZDirectionMixin< Derived >::setZErrs(), and YODA::ZDirectionMixin< Derived >::z().

◆ setZErr()

template<class Derived >
void YODA::ZDirectionMixin< Derived >::setZErr ( double  ez)
inline

Set symmetric z error.

Definition at line 339 of file PointUtils.h.

339 {
340 setZErrMinus(ez);
341 setZErrPlus(ez);
342 }
void setZErrPlus(double err)
Set the plus y errors.
Definition PointUtils.h:334
void setZErrMinus(double err)
Set the minus z errors.
Definition PointUtils.h:329

References YODA::ZDirectionMixin< Derived >::setZErrMinus(), and YODA::ZDirectionMixin< Derived >::setZErrPlus().

Referenced by YODA::ZDirectionMixin< Derived >::setZ(), and YODA::ZDirectionMixin< Derived >::setZErrs().

◆ setZErrMinus()

template<class Derived >
void YODA::ZDirectionMixin< Derived >::setZErrMinus ( double  err)
inline

Set the minus z errors.

Definition at line 329 of file PointUtils.h.

329 {
330 static_cast<Derived*>(this)->setErrMinus(2, err);
331 }

Referenced by YODA::ZDirectionMixin< Derived >::setZErr().

◆ setZErrPlus()

template<class Derived >
void YODA::ZDirectionMixin< Derived >::setZErrPlus ( double  err)
inline

Set the plus y errors.

Definition at line 334 of file PointUtils.h.

334 {
335 static_cast<Derived*>(this)->setErrPlus(2, err);
336 }

Referenced by YODA::ZDirectionMixin< Derived >::setZErr().

◆ setZErrs() [1/3]

template<class Derived >
void YODA::ZDirectionMixin< Derived >::setZErrs ( double  errminus,
double  errplus 
)
inline

Set the z errors.

Definition at line 350 of file PointUtils.h.

350 {
351 static_cast<Derived*>(this)->setErrs(2, {errminus, errplus});
352 }

◆ setZErrs() [2/3]

template<class Derived >
void YODA::ZDirectionMixin< Derived >::setZErrs ( double  ez)
inline

◆ setZErrs() [3/3]

template<class Derived >
void YODA::ZDirectionMixin< Derived >::setZErrs ( std::pair< double, double >  errs)
inline

Set the z errors.

Definition at line 355 of file PointUtils.h.

355 {
356 static_cast<Derived*>(this)->setErrs(2, errs);
357 }

◆ z()

template<class Derived >
double YODA::ZDirectionMixin< Derived >::z ( ) const
inline

◆ zErrAvg()

template<class Derived >
double YODA::ZDirectionMixin< Derived >::zErrAvg ( ) const
inline

Definition at line 324 of file PointUtils.h.

324 {
325 return static_cast<const Derived*>(this)->errAvg(2);
326 }

◆ zErrMinus()

template<class Derived >
double YODA::ZDirectionMixin< Derived >::zErrMinus ( ) const
inline

Get minus z error.

Definition at line 314 of file PointUtils.h.

314 {
315 return static_cast<const Derived*>(this)->errMinus(2);
316 }

Referenced by YODA::ZDirectionMixin< Derived >::scaleZ().

◆ zErrPlus()

template<class Derived >
double YODA::ZDirectionMixin< Derived >::zErrPlus ( ) const
inline

Get plus z error.

Definition at line 319 of file PointUtils.h.

319 {
320 return static_cast<const Derived*>(this)->errPlus(2);
321 }

Referenced by YODA::ZDirectionMixin< Derived >::scaleZ().

◆ zErrs()

template<class Derived >
std::pair< double, double > YODA::ZDirectionMixin< Derived >::zErrs ( ) const
inline

Get y error pair.

Definition at line 309 of file PointUtils.h.

309 {
310 return static_cast<const Derived*>(this)->errs(2);
311 }

◆ zMax()

template<class Derived >
double YODA::ZDirectionMixin< Derived >::zMax ( ) const
inline

Get value plus positive y-error.

Definition at line 365 of file PointUtils.h.

365 {
366 return static_cast<const Derived*>(this)->max(2);
367 }

◆ zMin()

template<class Derived >
double YODA::ZDirectionMixin< Derived >::zMin ( ) const
inline

Get value minus negative y-error.

Definition at line 360 of file PointUtils.h.

360 {
361 return static_cast<const Derived*>(this)->min(2);
362 }

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