20#include "analysis/OrcaKinFit/ThreeVector.h"
32 namespace OrcaKinFit {
48 inline FourVector(
double E_,
double px_,
double py_,
double pz_);
56 inline double getE()
const;
58 inline double getPx()
const;
60 inline double getPy()
const;
62 inline double getPz()
const;
64 inline double getM2()
const;
66 inline double getM()
const;
71 inline double getP2()
const;
73 inline double getP()
const;
75 inline double getPt2()
const;
77 inline double getPt()
const;
80 inline double getPhi()
const;
84 inline double getEta()
const;
89 inline ThreeVector getBeta()
const { assert(
E > 0);
return (1. /
E) *
p;};
90 inline double getGamma()
const { assert(
getM() > 0);
return getE() /
getM();};
99 inline void setValues(
double E_,
double px_,
double py_,
double pz_);
116 :
E(E_), p(px_, py_, pz_)
124 :
E(
std::
sqrt(p_.getP2() + m * m)), p(p_)
150 case 1:
return getPx();
151 case 2:
return getPy();
152 case 3:
return getPz();
157 void FourVector::setValues(
double E_,
double px_,
double py_,
double pz_)
160 p.setValues(px_, py_, pz_);
163 FourVector& FourVector::operator+= (
const FourVector& rhs)
170 FourVector& FourVector::operator-= (
const FourVector& rhs)
177 FourVector& FourVector::operator*= (
double rhs)
234 inline std::ostream& operator<< (std::ostream& os,
238 os <<
"(" << rhs.
getE() <<
", " << rhs.
getPx() <<
", " << rhs.
getPy() <<
", " << rhs.
getPz() <<
")";
Yet another four vector class, with metric +—.
double getPx() const
Returns the x momentum / 1 component.
FourVector()
Default constructor.
double E
The energy / 0 component.
const ThreeVector & getThreeVector() const
Returns the momentum three vector.
double getM2() const
Returns the mass squared / magnitude squared.
double getPz() const
Returns the z momentum / 3 component.
double getPhi() const
Returns the azimuthal angle of the momentum / three vector squared.
double getEta() const
Returns the pseudo rapidity of the momentum / three vector squared.
double getM() const
Returns the mass / magnitude.
double getPt2() const
Returns the transverse momentum squared / magnitude of the 1 and 2 component vector squared.
ThreeVector p
The momentum three vector.
double getPy() const
Returns the y momentum / 2 component.
double getComponent(int i) const
Returns the i'th component (starting from 0=energy)
double getP2() const
Returns the momentum squared / magnitude of the three vector squared.
double getPt() const
Returns the transverse momentum / magnitude of the 1 and 2 component vector.
double getP() const
Returns the momentum / magnitude of the three vector.
double getE() const
Returns the energy / 0 component.
double getTheta() const
Returns the polar angle of the momentum / three vector squared.
double getMass() const
Returns the mass / magnitude.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.