BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtVector4C Class Reference

#include <EvtVector4C.hh>

Public Member Functions

 EvtVector4C ()
 EvtVector4C (const EvtComplex &, const EvtComplex &, const EvtComplex &, const EvtComplex &)
virtual ~EvtVector4C ()
void set (int, const EvtComplex &)
void set (const EvtComplex &, const EvtComplex &, const EvtComplex &, const EvtComplex &)
void set (double, double, double, double)
 EvtVector4C (const EvtVector4R &v1)
const EvtComplexget (int) const
EvtComplex cont (const EvtVector4C &v4) const
EvtVector4C conj () const
EvtVector3C vec () const
EvtVector4Coperator= (const EvtVector4C &v2)
EvtVector4Coperator-= (const EvtVector4C &v2)
EvtVector4Coperator+= (const EvtVector4C &v2)
EvtVector4Coperator*= (const EvtComplex &c)
void applyRotateEuler (double alpha, double beta, double gamma)
void applyBoostTo (const EvtVector4R &p4)
void applyBoostTo (const EvtVector3R &boost)
double dot (const EvtVector4C &p2)

Friends

EvtVector4C rotateEuler (const EvtVector4C &e, double alpha, double beta, double gamma)
EvtVector4C boostTo (const EvtVector4C &e, const EvtVector4R p4)
EvtVector4C boostTo (const EvtVector4C &e, const EvtVector3R boost)
EvtVector4C operator* (double d, const EvtVector4C &v2)
EvtVector4C operator* (const EvtComplex &c, const EvtVector4C &v2)
EvtVector4C operator* (const EvtVector4C &v2, const EvtComplex &c)
EvtVector4C operator* (const EvtComplex &c, const EvtVector4R &v2)
EvtComplex operator* (const EvtVector4R &v1, const EvtVector4C &v2)
EvtComplex operator* (const EvtVector4C &v1, const EvtVector4R &v2)
EvtComplex operator* (const EvtVector4C &v1, const EvtVector4C &v2)
EvtVector4C operator+ (const EvtVector4C &v1, const EvtVector4C &v2)
EvtVector4C operator- (const EvtVector4C &v1, const EvtVector4C &v2)
std::ostream & operator<< (std::ostream &s, const EvtVector4C &v)

Detailed Description

Definition at line 31 of file EvtVector4C.hh.

Constructor & Destructor Documentation

◆ EvtVector4C() [1/3]

EvtVector4C::EvtVector4C ( )

Definition at line 29 of file EvtVector4C.cc.

29 {
30
31 v[0] = EvtComplex( 0.0 );
32 v[1] = EvtComplex( 0.0 );
33 v[2] = EvtComplex( 0.0 );
34 v[3] = EvtComplex( 0.0 );
35}

Referenced by boostTo, boostTo, conj(), cont(), dot(), operator*, operator*, operator*, operator*, operator*, operator*, operator*, operator*=(), operator+, operator+=(), operator-, operator-=(), operator<<, operator=(), and rotateEuler.

◆ EvtVector4C() [2/3]

EvtVector4C::EvtVector4C ( const EvtComplex & e0,
const EvtComplex & e1,
const EvtComplex & e2,
const EvtComplex & e3 )

Definition at line 39 of file EvtVector4C.cc.

40 {
41
42 v[0] = e0;
43 v[1] = e1;
44 v[2] = e2;
45 v[3] = e3;
46}
Double_t e1
Double_t e2

◆ ~EvtVector4C()

EvtVector4C::~EvtVector4C ( )
virtual

Definition at line 37 of file EvtVector4C.cc.

37{}

◆ EvtVector4C() [3/3]

EvtVector4C::EvtVector4C ( const EvtVector4R & v1)
inline

Definition at line 172 of file EvtVector4C.hh.

172 {
173
174 v[0] = EvtComplex( v1.get( 0 ) );
175 v[1] = EvtComplex( v1.get( 1 ) );
176 v[2] = EvtComplex( v1.get( 2 ) );
177 v[3] = EvtComplex( v1.get( 3 ) );
178}
double get(int i) const

Member Function Documentation

◆ applyBoostTo() [1/2]

void EvtVector4C::applyBoostTo ( const EvtVector3R & boost)

Definition at line 80 of file EvtVector4C.cc.

80 {
81
82 double bx, by, bz, gamma, b2;
83
84 bx = boost.get( 0 );
85 by = boost.get( 1 );
86 bz = boost.get( 2 );
87
88 double bxx = bx * bx;
89 double byy = by * by;
90 double bzz = bz * bz;
91
92 b2 = bxx + byy + bzz;
93
94 if ( b2 == 0.0 ) { return; }
95
96 assert( b2 < 1.0 );
97
98 gamma = 1.0 / sqrt( 1 - b2 );
99
100 double gb2 = ( gamma - 1.0 ) / b2;
101
102 double gb2xy = gb2 * bx * by;
103 double gb2xz = gb2 * bx * bz;
104 double gb2yz = gb2 * by * bz;
105
106 double gbx = gamma * bx;
107 double gby = gamma * by;
108 double gbz = gamma * bz;
109
110 EvtComplex e2 = v[0];
111 EvtComplex px2 = v[1];
112 EvtComplex py2 = v[2];
113 EvtComplex pz2 = v[3];
114
115 v[0] = gamma * e2 + gbx * px2 + gby * py2 + gbz * pz2;
116
117 v[1] = gbx * e2 + gb2 * bxx * px2 + px2 + gb2xy * py2 + gb2xz * pz2;
118
119 v[2] = gby * e2 + gb2 * byy * py2 + py2 + gb2xy * px2 + gb2yz * pz2;
120
121 v[3] = gbz * e2 + gb2 * bzz * pz2 + pz2 + gb2yz * py2 + gb2xz * px2;
122
123 return;
124}
double get(int i) const

◆ applyBoostTo() [2/2]

void EvtVector4C::applyBoostTo ( const EvtVector4R & p4)

Definition at line 69 of file EvtVector4C.cc.

69 {
70
71 double e = p4.get( 0 );
72
73 EvtVector3R boost( p4.get( 1 ) / e, p4.get( 2 ) / e, p4.get( 3 ) / e );
74
75 applyBoostTo( boost );
76
77 return;
78}
void applyBoostTo(const EvtVector4R &p4)

Referenced by EvtRaritaSchwinger::applyBoostTo(), applyBoostTo(), boostTo, and boostTo.

◆ applyRotateEuler()

void EvtVector4C::applyRotateEuler ( double alpha,
double beta,
double gamma )

Definition at line 126 of file EvtVector4C.cc.

126 {
127
128 double sp = sin( phi );
129 double st = sin( theta );
130 double sk = sin( ksi );
131 double cp = cos( phi );
132 double ct = cos( theta );
133 double ck = cos( ksi );
134
135 EvtComplex x =
136 ( ck * ct * cp - sk * sp ) * v[1] + ( -sk * ct * cp - ck * sp ) * v[2] + st * cp * v[3];
137 EvtComplex y =
138 ( ck * ct * sp + sk * cp ) * v[1] + ( -sk * ct * sp + ck * cp ) * v[2] + st * sp * v[3];
139 EvtComplex z = -ck * st * v[1] + sk * st * v[2] + ct * v[3];
140
141 v[1] = x;
142 v[2] = y;
143 v[3] = z;
144}
Double_t x[10]

Referenced by rotateEuler, EvtPhotonParticle::rotateToHelicityBasis(), EvtTensorParticle::rotateToHelicityBasis(), and EvtVectorParticle::rotateToHelicityBasis().

◆ conj()

◆ cont()

EvtComplex EvtVector4C::cont ( const EvtVector4C & v4) const
inline

Definition at line 137 of file EvtVector4C.hh.

137 {
138
139 return v[0] * v4.v[0] - v[1] * v4.v[1] - v[2] * v4.v[2] - v[3] * v4.v[3];
140}

Referenced by EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtLNuGamma::decay(), and EvtVVSPwave::decay().

◆ dot()

double EvtVector4C::dot ( const EvtVector4C & p2)

◆ get()

◆ operator*=()

EvtVector4C & EvtVector4C::operator*= ( const EvtComplex & c)
inline

Definition at line 142 of file EvtVector4C.hh.

142 {
143
144 v[0] *= c;
145 v[1] *= c;
146 v[2] *= c;
147 v[3] *= c;
148
149 return *this;
150}

◆ operator+=()

EvtVector4C & EvtVector4C::operator+= ( const EvtVector4C & v2)
inline

Definition at line 84 of file EvtVector4C.hh.

84 {
85
86 v[0] += v2.v[0];
87 v[1] += v2.v[1];
88 v[2] += v2.v[2];
89 v[3] += v2.v[3];
90
91 return *this;
92}

◆ operator-=()

EvtVector4C & EvtVector4C::operator-= ( const EvtVector4C & v2)
inline

Definition at line 94 of file EvtVector4C.hh.

94 {
95
96 v[0] -= v2.v[0];
97 v[1] -= v2.v[1];
98 v[2] -= v2.v[2];
99 v[3] -= v2.v[3];
100
101 return *this;
102}

◆ operator=()

EvtVector4C & EvtVector4C::operator= ( const EvtVector4C & v2)
inline

Definition at line 74 of file EvtVector4C.hh.

74 {
75
76 v[0] = v2.v[0];
77 v[1] = v2.v[1];
78 v[2] = v2.v[2];
79 v[3] = v2.v[3];
80
81 return *this;
82}

◆ set() [1/3]

void EvtVector4C::set ( const EvtComplex & e,
const EvtComplex & p1,
const EvtComplex & p2,
const EvtComplex & p3 )
inline

Definition at line 108 of file EvtVector4C.hh.

109 {
110
111 v[0] = e;
112 v[1] = p1;
113 v[2] = p2;
114 v[3] = p3;
115}
double p2[4]
double p1[4]

◆ set() [2/3]

void EvtVector4C::set ( double e,
double p1,
double p2,
double p3 )
inline

Definition at line 117 of file EvtVector4C.hh.

117 {
118
119 v[0] = EvtComplex( e );
120 v[1] = EvtComplex( p1 );
121 v[2] = EvtComplex( p2 );
122 v[3] = EvtComplex( p3 );
123}

◆ set() [3/3]

◆ vec()

EvtVector3C EvtVector4C::vec ( ) const
inline

Definition at line 106 of file EvtVector4C.hh.

106{ return EvtVector3C( v[1], v[2], v[3] ); }

Referenced by EvtVVP::decay(), and EvtSVVHelAmp::SVVHel().

◆ boostTo [1/2]

EvtVector4C boostTo ( const EvtVector4C & e,
const EvtVector3R boost )
friend

Definition at line 62 of file EvtVector4C.cc.

62 {
63
64 EvtVector4C tmp( rs );
65 tmp.applyBoostTo( boost );
66 return tmp;
67}

◆ boostTo [2/2]

EvtVector4C boostTo ( const EvtVector4C & e,
const EvtVector4R p4 )
friend

Definition at line 55 of file EvtVector4C.cc.

55 {
56
57 EvtVector4C tmp( rs );
58 tmp.applyBoostTo( p4 );
59 return tmp;
60}

◆ operator* [1/7]

EvtVector4C operator* ( const EvtComplex & c,
const EvtVector4C & v2 )
friend

Definition at line 157 of file EvtVector4C.hh.

157 {
158
159 return EvtVector4C( v2 ) *= c;
160}

◆ operator* [2/7]

EvtVector4C operator* ( const EvtComplex & c,
const EvtVector4R & v2 )
friend

Definition at line 167 of file EvtVector4C.hh.

167 {
168
169 return EvtVector4C( c * v2.get( 0 ), c * v2.get( 1 ), c * v2.get( 2 ), c * v2.get( 3 ) );
170}

◆ operator* [3/7]

EvtComplex operator* ( const EvtVector4C & v1,
const EvtVector4C & v2 )
friend

Definition at line 192 of file EvtVector4C.hh.

192 {
193
194 return v1.v[0] * v2.v[0] - v1.v[1] * v2.v[1] - v1.v[2] * v2.v[2] - v1.v[3] * v2.v[3];
195}

◆ operator* [4/7]

EvtComplex operator* ( const EvtVector4C & v1,
const EvtVector4R & v2 )
friend

Definition at line 186 of file EvtVector4C.hh.

186 {
187
188 return v1.v[0] * v2.get( 0 ) - v1.v[1] * v2.get( 1 ) - v1.v[2] * v2.get( 2 ) -
189 v1.v[3] * v2.get( 3 );
190}

◆ operator* [5/7]

EvtVector4C operator* ( const EvtVector4C & v2,
const EvtComplex & c )
friend

Definition at line 162 of file EvtVector4C.hh.

162 {
163
164 return EvtVector4C( v2 ) *= c;
165}

◆ operator* [6/7]

EvtComplex operator* ( const EvtVector4R & v1,
const EvtVector4C & v2 )
friend

Definition at line 180 of file EvtVector4C.hh.

180 {
181
182 return v1.get( 0 ) * v2.v[0] - v1.get( 1 ) * v2.v[1] - v1.get( 2 ) * v2.v[2] -
183 v1.get( 3 ) * v2.v[3];
184}

◆ operator* [7/7]

EvtVector4C operator* ( double d,
const EvtVector4C & v2 )
friend

Definition at line 152 of file EvtVector4C.hh.

152 {
153
154 return EvtVector4C( v2.v[0] * d, v2.v[1] * d, v2.v[2] * d, v2.v[3] * d );
155}

◆ operator+

EvtVector4C operator+ ( const EvtVector4C & v1,
const EvtVector4C & v2 )
friend

Definition at line 127 of file EvtVector4C.hh.

127 {
128
129 return EvtVector4C( v1 ) += v2;
130}

◆ operator-

EvtVector4C operator- ( const EvtVector4C & v1,
const EvtVector4C & v2 )
friend

Definition at line 132 of file EvtVector4C.hh.

132 {
133
134 return EvtVector4C( v1 ) -= v2;
135}

◆ operator<<

std::ostream & operator<< ( std::ostream & s,
const EvtVector4C & v )
friend

◆ rotateEuler

EvtVector4C rotateEuler ( const EvtVector4C & e,
double alpha,
double beta,
double gamma )
friend

Definition at line 48 of file EvtVector4C.cc.

48 {
49
50 EvtVector4C tmp( rs );
51 tmp.applyRotateEuler( alpha, beta, gamma );
52 return tmp;
53}
double alpha

The documentation for this class was generated from the following files: