Go to the documentation of this file.
3 #ifndef EICD_VectorXYZ_H
4 #define EICD_VectorXYZ_H
20 VectorXYZ(
double xx,
double yy,
double zz) :
x{
static_cast<float>(xx)},
y{
static_cast<float>(yy)},
z{
static_cast<float>(zz)} {}
24 float mag()
const {
return std::hypot(
x,
y,
z);}
25 float r()
const {
return mag();}
27 float phi()
const {
return atan2(
y,
x);}
28 float eta()
const {
return -log(tan(0.5*
theta()));}
29 operator std::tuple<float, float, float>() {
return {
x,
y,
z};}
std::ostream & operator<<(std::ostream &o, const ConstBasicParticle &value)
Definition: BasicParticle.cc:102
VectorXYZ add(const VectorXYZ &rhs) const
Definition: VectorXYZ.h:31
VectorXYZ()
Definition: VectorXYZ.h:19
float phi() const
Definition: VectorXYZ.h:27
float theta() const
Definition: VectorXYZ.h:26
VectorXYZ subtract(const VectorXYZ &rhs) const
Definition: VectorXYZ.h:32
Definition: BasicParticle.cc:13
float z
Definition: VectorXYZ.h:17
VectorXYZ(const VectorPolarType &v)
Definition: VectorXYZ.h:21
VectorXYZ scale(double f) const
Definition: VectorXYZ.h:33
float y
Definition: VectorXYZ.h:16
float mag() const
Definition: VectorXYZ.h:24
const float & operator[](unsigned i) const
Definition: VectorXYZ.h:23
VectorXYZ(double xx, double yy, double zz)
Definition: VectorXYZ.h:20
float & operator[](unsigned i)
Definition: VectorXYZ.h:22
float x
[mm] or [GeV]
Definition: VectorXYZ.h:15
float r() const
Definition: VectorXYZ.h:25
float eta() const
Definition: VectorXYZ.h:28
float dot(const VectorXYZ &rhs) const
Definition: VectorXYZ.h:30
Definition: VectorXYZ.h:13