BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TLorentzVectorC.h
Go to the documentation of this file.
1#ifndef RAD_TLorentzVectorC
2#define RAD_TLorentzVectorC
3
4#include <complex>
5#include "TLorentzVector.h"
6
8protected:
9 std::complex<double> fx,fy,fz,fe;
10public:
12 TLorentzVectorC(std::complex<double> x,
13 std::complex<double> y,
14 std::complex<double> z,
15 std::complex<double> e){
16 fx = x; fy = y; fz = z; fe = e;
17 };
19
20 void SetPxPyPzE(std::complex<double> x,
21 std::complex<double> y,
22 std::complex<double> z,
23 std::complex<double> e){
24 fx = x; fy = y; fz = z; fe = e;
25 }
26
27 inline std::complex<double> Px() const {return fx;}
28 inline std::complex<double> Py() const {return fy;}
29 inline std::complex<double> Pz() const {return fz;}
30 inline std::complex<double> E() const {return fe;}
31 inline std::complex<double> X() const {return fx;}
32 inline std::complex<double> Y() const {return fy;}
33 inline std::complex<double> Z() const {return fz;}
34 inline std::complex<double> T() const {return fe;}
35
37 fx = q.Px();
38 fy = q.Py();
39 fz = q.Pz();
40 fe = q.E();
41 return *this;
42 }
43
44
46 return TLorentzVectorC(fx+q.Px(), fy+q.Py(), fz+q.Pz(), fe+q.E());
47 }
48
50 fx += q.Px();
51 fy += q.Py();
52 fz += q.Pz();
53 fe += q.T();
54 return *this;
55 }
56
58 return TLorentzVectorC(fx-q.Px(), fy-q.Py(), fz-q.Pz(), fe-q.E());
59 }
60
62 fx -= q.Px();
63 fy -= q.Py();
64 fz -= q.Pz();
65 fe -= q.T();
66 return *this;
67 }
68
70 return TLorentzVectorC(-X(), -Y(), -Z(), -T());
71 }
72
73 inline TLorentzVectorC& operator *= (double a) {
74 fx *= a;
75 fy *= a;
76 fz *= a;
77 fe *= a;
78 return *this;
79 }
80
81 inline TLorentzVectorC operator * (double a) const {
82 return TLorentzVectorC(a*X(), a*Y(), a*Z(), a*T());
83 }
84
85 inline TLorentzVectorC& operator *= (std::complex<double> a) {
86 fx *= a;
87 fy *= a;
88 fz *= a;
89 fe *= a;
90 return *this;
91 }
92
93 inline TLorentzVectorC operator * (std::complex<double> a) const {
94 return TLorentzVectorC(a*X(), a*Y(), a*Z(), a*T());
95 }
96
97 inline std::complex<double> Dot(const TLorentzVectorC & q) const {
98 return T()*std::conj(q.T())
99 - (Z()*std::conj(q.Z()) + Y()*std::conj(q.Y()) + X()*std::conj(q.X()));
100 }
101
102 inline std::complex<double> Dot(const TLorentzVector & q) const {
103 return T()*q.T() - Z()*q.Z() - Y()*q.Y() - X()*q.X();
104 }
105
106 inline std::complex<double> operator * (const TLorentzVectorC & q) const {
107 return Dot(q);
108 }
109
110 inline std::complex<double> operator * (const TLorentzVector & q) const {
111 return Dot(q);
112 }
113};
114
115#endif // RAD_TLorentzVectorC
Double_t x[10]
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
Definition: KKsem.h:33
TLorentzVectorC operator+(const TLorentzVectorC &q) const
TLorentzVectorC & operator+=(const TLorentzVectorC &q)
TLorentzVectorC operator*(double a) const
void SetPxPyPzE(std::complex< double > x, std::complex< double > y, std::complex< double > z, std::complex< double > e)
TLorentzVectorC(std::complex< double > x, std::complex< double > y, std::complex< double > z, std::complex< double > e)
std::complex< double > E() const
std::complex< double > fe
std::complex< double > Dot(const TLorentzVector &q) const
TLorentzVectorC & operator=(const TLorentzVectorC &q)
TLorentzVectorC & operator*=(double a)
TLorentzVectorC operator-() const
std::complex< double > T() const
std::complex< double > fx
std::complex< double > X() const
TLorentzVectorC & operator-=(const TLorentzVectorC &q)
std::complex< double > Z() const
std::complex< double > Pz() const
std::complex< double > Y() const
std::complex< double > Py() const
std::complex< double > fz
std::complex< double > Dot(const TLorentzVectorC &q) const
std::complex< double > fy
std::complex< double > Px() const
double y[1000]