21 #ifndef _LORENTZ_VECTOR_HH_
22 #define _LORENTZ_VECTOR_HH_
25 #include <fastjet/internal/base.hh>
28 #define M_PI 3.141592653589793238462643383279502884197
31 FASTJET_BEGIN_NAMESPACE
41 LorentzVector(): px(0), py(0), pz(0), E(0) {}
42 LorentzVector(
double p1,
double p2,
double p3,
double p0): px(p1), py(p2), pz(p3), E(p0) {}
43 LorentzVector(
const LorentzVector& lv): px(lv.px), py(lv.py), pz(lv.pz), E(lv.E) {}
44 double p()
const {
return sqrt(px*px + py*py + pz*pz);}
45 double pt()
const {
return sqrt(px*px + py*py);}
46 double mt()
const {
return sqrt((E-pz)*(E+pz));}
47 double y()
const {
return 0.5*log((E + pz)/(E - pz));}
48 double Et()
const {
return E/p()*pt();}
49 inline double et()
const {
return Et();}
50 inline double e()
const {
return E;}
51 double eta()
const {
return 0.5*log((p() + pz)/(p() - pz));}
54 double r = atan2(py,px);
59 void add(LorentzVector v)
66 void subtract(LorentzVector v)
73 bool isEqual(LorentzVector v)
75 return px == v.px && py == v.py && pz == v.pz && E == v.E;