BOSS 8.0.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 "TLorentzVector.h"
5#include <complex>
6
8protected:
9 std::complex<double> fx, fy, fz, fe;
10
11public:
13 TLorentzVectorC( std::complex<double> x, std::complex<double> y, std::complex<double> z,
14 std::complex<double> e ) {
15 fx = x;
16 fy = y;
17 fz = z;
18 fe = e;
19 };
21
22 void SetPxPyPzE( std::complex<double> x, std::complex<double> y, std::complex<double> z,
23 std::complex<double> e ) {
24 fx = x;
25 fy = y;
26 fz = z;
27 fe = e;
28 }
29
30 inline std::complex<double> Px() const { return fx; }
31 inline std::complex<double> Py() const { return fy; }
32 inline std::complex<double> Pz() const { return fz; }
33 inline std::complex<double> E() const { return fe; }
34 inline std::complex<double> X() const { return fx; }
35 inline std::complex<double> Y() const { return fy; }
36 inline std::complex<double> Z() const { return fz; }
37 inline std::complex<double> T() const { return fe; }
38
40 fx = q.Px();
41 fy = q.Py();
42 fz = q.Pz();
43 fe = q.E();
44 return *this;
45 }
46
47 inline TLorentzVectorC operator+( const TLorentzVectorC& q ) const {
48 return TLorentzVectorC( fx + q.Px(), fy + q.Py(), fz + q.Pz(), fe + q.E() );
49 }
50
52 fx += q.Px();
53 fy += q.Py();
54 fz += q.Pz();
55 fe += q.T();
56 return *this;
57 }
58
59 inline TLorentzVectorC operator-( const TLorentzVectorC& q ) const {
60 return TLorentzVectorC( fx - q.Px(), fy - q.Py(), fz - q.Pz(), fe - q.E() );
61 }
62
64 fx -= q.Px();
65 fy -= q.Py();
66 fz -= q.Pz();
67 fe -= q.T();
68 return *this;
69 }
70
71 inline TLorentzVectorC operator-() const {
72 return TLorentzVectorC( -X(), -Y(), -Z(), -T() );
73 }
74
75 inline TLorentzVectorC& operator*=( double a ) {
76 fx *= a;
77 fy *= a;
78 fz *= a;
79 fe *= a;
80 return *this;
81 }
82
83 inline TLorentzVectorC operator*( double a ) const {
84 return TLorentzVectorC( a * X(), a * Y(), a * Z(), a * T() );
85 }
86
87 inline TLorentzVectorC& operator*=( std::complex<double> a ) {
88 fx *= a;
89 fy *= a;
90 fz *= a;
91 fe *= a;
92 return *this;
93 }
94
95 inline TLorentzVectorC operator*( std::complex<double> a ) const {
96 return TLorentzVectorC( a * X(), a * Y(), a * Z(), a * T() );
97 }
98
99 inline std::complex<double> Dot( const TLorentzVectorC& q ) const {
100 return T() * std::conj( q.T() ) -
101 ( Z() * std::conj( q.Z() ) + Y() * std::conj( q.Y() ) + X() * std::conj( q.X() ) );
102 }
103
104 inline std::complex<double> Dot( const TLorentzVector& q ) const {
105 return T() * q.T() - Z() * q.Z() - Y() * q.Y() - X() * q.X();
106 }
107
108 inline std::complex<double> operator*( const TLorentzVectorC& q ) const { return Dot( q ); }
109
110 inline std::complex<double> operator*( const TLorentzVector& q ) const { return Dot( q ); }
111};
112
113#endif // RAD_TLorentzVectorC
****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)
std::complex< double > operator*(const TLorentzVectorC &q) const
TLorentzVectorC & operator*=(double a)
TLorentzVectorC operator-() const
std::complex< double > T() const
std::complex< double > fx
TLorentzVectorC & operator*=(std::complex< double > a)
std::complex< double > X() const
TLorentzVectorC operator*(std::complex< double > a) const
std::complex< double > operator*(const TLorentzVector &q) 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
TLorentzVectorC operator-(const TLorentzVectorC &q) const
std::complex< double > fy
std::complex< double > Px() const