BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtDiracSpinor.cc File Reference
#include "EvtDiracSpinor.hh"
#include "EvtComplex.hh"
#include "EvtGammaMatrix.hh"
#include "EvtPatches.hh"
#include "EvtReport.hh"
#include "EvtTensor4C.hh"
#include "EvtVector4C.hh"
#include <assert.h>
#include <math.h>

Go to the source code of this file.

Functions

ostream & operator<< (ostream &s, const EvtDiracSpinor &sp)
EvtDiracSpinor rotateEuler (const EvtDiracSpinor &sp, double alpha, double beta, double gamma)
EvtDiracSpinor boostTo (const EvtDiracSpinor &sp, const EvtVector4R p4)
EvtDiracSpinor boostTo (const EvtDiracSpinor &sp, const EvtVector3R boost)
EvtVector4C EvtLeptonVACurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtVector4C EvtLeptonVCurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtVector4C EvtLeptonACurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtComplex EvtLeptonSCurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtComplex EvtLeptonPCurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtTensor4C EvtLeptonTCurrent (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtTensor4C EvtLeptonTg5Current (const EvtDiracSpinor &d, const EvtDiracSpinor &dp)
EvtDiracSpinor operator* (const EvtComplex &c, const EvtDiracSpinor &d)

Function Documentation

◆ boostTo() [1/2]

EvtDiracSpinor boostTo ( const EvtDiracSpinor & sp,
const EvtVector3R boost )

Definition at line 74 of file EvtDiracSpinor.cc.

74 {
75
76 EvtDiracSpinor tmp( sp );
77 tmp.applyBoostTo( boost );
78 return tmp;
79}

◆ boostTo() [2/2]

◆ EvtLeptonACurrent()

EvtVector4C EvtLeptonACurrent ( const EvtDiracSpinor & d,
const EvtDiracSpinor & dp )

Definition at line 207 of file EvtDiracSpinor.cc.

207 {
208
209 EvtVector4C temp;
210
211 EvtGammaMatrix mat;
212
213 // no conjugate here; done in the multiplication
214 // yes this is stupid and fooled me to for a long time (ryd)
215
217 temp.set( 0, d * ( mat * dp ) );
218
220 temp.set( 1, d * ( mat * dp ) );
221
223 temp.set( 2, d * ( mat * dp ) );
224
226 temp.set( 3, d * ( mat * dp ) );
227
228 return temp;
229}
static const EvtGammaMatrix & va1()
static const EvtGammaMatrix & v0()
static const EvtGammaMatrix & va3()
static const EvtGammaMatrix & v2()
static const EvtGammaMatrix & va0()
static const EvtGammaMatrix & va2()
static const EvtGammaMatrix & v1()
static const EvtGammaMatrix & v3()
void set(int, const EvtComplex &)

Referenced by EvtbTosllScalarAmp::CalcAmp(), and EvtbTosllVectorAmp::CalcAmp().

◆ EvtLeptonPCurrent()

EvtComplex EvtLeptonPCurrent ( const EvtDiracSpinor & d,
const EvtDiracSpinor & dp )

Definition at line 243 of file EvtDiracSpinor.cc.

243 {
244
245 EvtComplex temp;
246
247 // no conjugate here; done in the multiplication
248 // yes this is stupid and fooled me to for a long time (ryd)
250 temp = d * ( m * dp );
251
252 return temp;
253}
static const EvtGammaMatrix & g0()
static const EvtGammaMatrix & g5()

Referenced by EvtHypNonLepton::calcAmp().

◆ EvtLeptonSCurrent()

EvtComplex EvtLeptonSCurrent ( const EvtDiracSpinor & d,
const EvtDiracSpinor & dp )

Definition at line 231 of file EvtDiracSpinor.cc.

231 {
232
233 EvtComplex temp;
234
235 // no conjugate here; done in the multiplication
236 // yes this is stupid and fooled me to for a long time (ryd)
237
238 temp = d * ( EvtGammaMatrix::g0() * dp );
239
240 return temp;
241}

Referenced by EvtHypNonLepton::calcAmp().

◆ EvtLeptonTCurrent()

EvtTensor4C EvtLeptonTCurrent ( const EvtDiracSpinor & d,
const EvtDiracSpinor & dp )

Definition at line 255 of file EvtDiracSpinor.cc.

255 {
256
257 EvtTensor4C temp;
258 temp.zero();
259 EvtComplex i2( 0, 0.5 );
260
261 static EvtGammaMatrix mat01 =
264 static EvtGammaMatrix mat02 =
267 static EvtGammaMatrix mat03 =
270 static EvtGammaMatrix mat12 =
273 static EvtGammaMatrix mat13 =
276 static EvtGammaMatrix mat23 =
279
280 temp.set( 0, 1, i2 * ( d * ( mat01 * dp ) ) );
281 temp.set( 1, 0, -temp.get( 0, 1 ) );
282
283 temp.set( 0, 2, i2 * ( d * ( mat02 * dp ) ) );
284 temp.set( 2, 0, -temp.get( 0, 2 ) );
285
286 temp.set( 0, 3, i2 * ( d * ( mat03 * dp ) ) );
287 temp.set( 3, 0, -temp.get( 0, 3 ) );
288
289 temp.set( 1, 2, i2 * ( d * ( mat12 * dp ) ) );
290 temp.set( 2, 1, -temp.get( 1, 2 ) );
291
292 temp.set( 1, 3, i2 * ( d * ( mat13 * dp ) ) );
293 temp.set( 3, 1, -temp.get( 1, 3 ) );
294
295 temp.set( 2, 3, i2 * ( d * ( mat23 * dp ) ) );
296 temp.set( 3, 2, -temp.get( 2, 3 ) );
297
298 return temp;
299}
static const EvtGammaMatrix & g2()
static const EvtGammaMatrix & g1()
static const EvtGammaMatrix & g3()
void set(int i, int j, const EvtComplex &c)
const EvtComplex & get(int i, int j) const

◆ EvtLeptonTg5Current()

EvtTensor4C EvtLeptonTg5Current ( const EvtDiracSpinor & d,
const EvtDiracSpinor & dp )

Definition at line 301 of file EvtDiracSpinor.cc.

302 { // sigma^{mu,nu} gamma_5
303
304 EvtTensor4C temp;
305 temp.zero();
306 EvtComplex i2( 0, 0.5 );
307
308 static EvtGammaMatrix mat01 = EvtGammaMatrix::g0() *
312 static EvtGammaMatrix mat02 = EvtGammaMatrix::g0() *
316 static EvtGammaMatrix mat03 = EvtGammaMatrix::g0() *
320 static EvtGammaMatrix mat12 = EvtGammaMatrix::g0() *
324 static EvtGammaMatrix mat13 = EvtGammaMatrix::g0() *
328 static EvtGammaMatrix mat23 = EvtGammaMatrix::g0() *
332
333 temp.set( 0, 1, i2 * ( d * ( mat01 * dp ) ) );
334 temp.set( 1, 0, -temp.get( 0, 1 ) );
335
336 temp.set( 0, 2, i2 * ( d * ( mat02 * dp ) ) );
337 temp.set( 2, 0, -temp.get( 0, 2 ) );
338
339 temp.set( 0, 3, i2 * ( d * ( mat03 * dp ) ) );
340 temp.set( 3, 0, -temp.get( 0, 3 ) );
341
342 temp.set( 1, 2, i2 * ( d * ( mat12 * dp ) ) );
343 temp.set( 2, 1, -temp.get( 1, 2 ) );
344
345 temp.set( 1, 3, i2 * ( d * ( mat13 * dp ) ) );
346 temp.set( 3, 1, -temp.get( 1, 3 ) );
347
348 temp.set( 2, 3, i2 * ( d * ( mat23 * dp ) ) );
349 temp.set( 3, 2, -temp.get( 2, 3 ) );
350
351 return temp;
352}

Referenced by EvtEDM::decay().

◆ EvtLeptonVACurrent()

EvtVector4C EvtLeptonVACurrent ( const EvtDiracSpinor & d,
const EvtDiracSpinor & dp )

Definition at line 162 of file EvtDiracSpinor.cc.

162 {
163
164 // Old code; below is a new specialized code that does it more efficiently.
165 // EvtGammaMatrix mat;
166 // EvtVector4C temp;
167 // mat.va0();
168 // temp.set(0,d*(mat*dp));
169 // mat.va1();
170 // temp.set(1,d*(mat*dp));
171 // mat.va2();
172 // temp.set(2,d*(mat*dp));
173 // mat.va3();
174 // temp.set(3,d*(mat*dp));
175 // return temp;
176
177 EvtComplex u02 = ::conj( d.spinor[0] - d.spinor[2] );
178 EvtComplex u13 = ::conj( d.spinor[1] - d.spinor[3] );
179
180 EvtComplex v02 = dp.spinor[0] - dp.spinor[2];
181 EvtComplex v13 = dp.spinor[1] - dp.spinor[3];
182
183 EvtComplex a = u02 * v02;
184 EvtComplex b = u13 * v13;
185
186 EvtComplex c = u02 * v13;
187 EvtComplex e = u13 * v02;
188
189 return EvtVector4C( a + b, -( c + e ), EvtComplex( 0, 1 ) * ( c - e ), b - a );
190}
Evt3Rank3C conj(const Evt3Rank3C &t2)

Referenced by EvtSemiLeptonicBaryonAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtKstarnunu::decay(), EvtLNuGamma::decay(), EvtSll::decay(), EvtSLN::decay(), EvtTauHadnu::decay(), EvtTaulnunu::decay(), EvtTauScalarnu::decay(), and EvtTauVectornu::decay().

◆ EvtLeptonVCurrent()

EvtVector4C EvtLeptonVCurrent ( const EvtDiracSpinor & d,
const EvtDiracSpinor & dp )

Definition at line 192 of file EvtDiracSpinor.cc.

192 {
193
194 EvtVector4C temp;
195
196 // no conjugate here; done in the multiplication
197 // yes this is stupid and fooled me to for a long time (ryd)
198
199 temp.set( 0, d * ( EvtGammaMatrix::v0() * dp ) );
200 temp.set( 1, d * ( EvtGammaMatrix::v1() * dp ) );
201 temp.set( 2, d * ( EvtGammaMatrix::v2() * dp ) );
202 temp.set( 3, d * ( EvtGammaMatrix::v3() * dp ) );
203
204 return temp;
205}

Referenced by EvtbTosllScalarAmp::CalcAmp(), EvtbTosllVectorAmp::CalcAmp(), EvtEDM::decay(), and EvtVll::decay().

◆ operator*()

EvtDiracSpinor operator* ( const EvtComplex & c,
const EvtDiracSpinor & d )

Definition at line 354 of file EvtDiracSpinor.cc.

354 {
355 EvtDiracSpinor result;
356 result.spinor[0] = c * d.spinor[0];
357 result.spinor[1] = c * d.spinor[1];
358 result.spinor[2] = c * d.spinor[2];
359 result.spinor[3] = c * d.spinor[3];
360 return result;
361}

◆ operator<<()

ostream & operator<< ( ostream & s,
const EvtDiracSpinor & sp )

Definition at line 50 of file EvtDiracSpinor.cc.

50 {
51
52 s << "[" << sp.spinor[0] << "," << sp.spinor[1] << "," << sp.spinor[2] << "," << sp.spinor[3]
53 << "]";
54 return s;
55}
XmlRpcServer s

◆ rotateEuler()

EvtDiracSpinor rotateEuler ( const EvtDiracSpinor & sp,
double alpha,
double beta,
double gamma )

Definition at line 59 of file EvtDiracSpinor.cc.

60 {
61
62 EvtDiracSpinor tmp( sp );
63 tmp.applyRotateEuler( alpha, beta, gamma );
64 return tmp;
65}
double alpha

Referenced by EvtJTO3P::decay().