BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc File Reference
#include "EvtGenBase/EvtPatches.hh"
#include <iostream>
#include <math.h>
#include <assert.h>
#include "EvtGenBase/EvtComplex.hh"
#include "EvtGenBase/EvtVector4C.hh"
#include "EvtGenBase/EvtTensor4C.hh"

Go to the source code of this file.

Functions

EvtTensor4C rotateEuler (const EvtTensor4C &rs, double alpha, double beta, double gamma)
 
EvtTensor4C boostTo (const EvtTensor4C &rs, const EvtVector4R p4)
 
EvtTensor4C boostTo (const EvtTensor4C &rs, const EvtVector3R boost)
 
ostream & operator<< (ostream &s, const EvtTensor4C &t)
 
EvtTensor4C operator* (const EvtTensor4C &t1, const EvtComplex &c)
 
EvtTensor4C operator* (const EvtComplex &c, const EvtTensor4C &t1)
 
EvtTensor4C operator* (const EvtTensor4C &t1, double d)
 
EvtTensor4C operator* (double d, const EvtTensor4C &t1)
 
EvtComplex cont (const EvtTensor4C &t1, const EvtTensor4C &t2)
 
EvtTensor4C directProd (const EvtVector4C &c1, const EvtVector4C &c2)
 
EvtTensor4C directProd (const EvtVector4C &c1, const EvtVector4R &c2)
 
EvtTensor4C directProd (const EvtVector4R &c1, const EvtVector4R &c2)
 
EvtTensor4C dual (const EvtTensor4C &t2)
 
EvtTensor4C conj (const EvtTensor4C &t2)
 
EvtTensor4C cont22 (const EvtTensor4C &t1, const EvtTensor4C &t2)
 
EvtTensor4C cont11 (const EvtTensor4C &t1, const EvtTensor4C &t2)
 

Function Documentation

◆ boostTo() [1/2]

EvtTensor4C boostTo ( const EvtTensor4C rs,
const EvtVector3R  boost 
)

Definition at line 98 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

99 {
100
101 EvtTensor4C tmp(rs);
102 tmp.applyBoostTo(boost);
103 return tmp;
104
105}

◆ boostTo() [2/2]

EvtTensor4C boostTo ( const EvtTensor4C rs,
const EvtVector4R  p4 
)

Definition at line 89 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

90 {
91
92 EvtTensor4C tmp(rs);
93 tmp.applyBoostTo(p4);
94 return tmp;
95
96}

◆ conj()

EvtTensor4C conj ( const EvtTensor4C t2)

Definition at line 411 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

411 {
412 EvtTensor4C temp;
413
414 int i,j;
415
416 for(i=0;i<4;i++){
417 for(j=0;j<4;j++){
418 temp.set(i,j,::conj((t2.get(i,j))));
419 }
420 }
421
422 return temp;
423}
EvtTensor4C conj(const EvtTensor4C &t2)
void set(int i, int j, const EvtComplex &c)
const EvtComplex & get(int i, int j) const

◆ cont()

◆ cont11()

EvtTensor4C cont11 ( const EvtTensor4C t1,
const EvtTensor4C t2 
)

Definition at line 443 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

443 {
444 EvtTensor4C temp;
445
446 int i,j;
447 EvtComplex c;
448
449 for(i=0;i<4;i++){
450 for(j=0;j<4;j++){
451 c=t1.get(0,i)*t2.get(0,j)-t1.get(1,i)*t2.get(1,j)
452 -t1.get(2,i)*t2.get(2,j)-t1.get(3,i)*t2.get(3,j);
453 temp.set(i,j,c);
454 }
455 }
456
457 return temp;
458}

◆ cont22()

EvtTensor4C cont22 ( const EvtTensor4C t1,
const EvtTensor4C t2 
)

Definition at line 426 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

426 {
427 EvtTensor4C temp;
428
429 int i,j;
430 EvtComplex c;
431
432 for(i=0;i<4;i++){
433 for(j=0;j<4;j++){
434 c=t1.get(i,0)*t2.get(j,0)-t1.get(i,1)*t2.get(j,1)
435 -t1.get(i,2)*t2.get(j,2)-t1.get(i,3)*t2.get(j,3);
436 temp.set(i,j,c);
437 }
438 }
439
440 return temp;
441}

◆ directProd() [1/3]

EvtTensor4C directProd ( const EvtVector4C c1,
const EvtVector4C c2 
)

Definition at line 327 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

327 {
328 EvtTensor4C temp;
329 int i,j;
330
331 for (i=0;i<4;i++) {
332 for (j=0;j<4;j++) {
333 temp.set(i,j,c1.get(i)*c2.get(j));
334 }
335 }
336 return temp;
337}

◆ directProd() [2/3]

EvtTensor4C directProd ( const EvtVector4C c1,
const EvtVector4R c2 
)

Definition at line 340 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

340 {
341 EvtTensor4C temp;
342 int i,j;
343
344 for (i=0;i<4;i++) {
345 for (j=0;j<4;j++) {
346 temp.set(i,j,c1.get(i)*c2.get(j));
347 }
348 }
349 return temp;
350}

◆ directProd() [3/3]

EvtTensor4C directProd ( const EvtVector4R c1,
const EvtVector4R c2 
)

Definition at line 353 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

353 {
354
355 EvtTensor4C temp;
356 int i,j;
357
358 for (i=0;i<4;i++) {
359 for (j=0;j<4;j++) {
360 temp.t[i][j]=EvtComplex(c1.get(i)*c2.get(j),0.0);
361 }
362 }
363 return temp;
364}

◆ dual()

EvtTensor4C dual ( const EvtTensor4C t2)

Definition at line 379 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

379 {
380
381 EvtTensor4C temp;
382
383 temp.set(0,0,EvtComplex(0.0,0.0));
384 temp.set(1,1,EvtComplex(0.0,0.0));
385 temp.set(2,2,EvtComplex(0.0,0.0));
386 temp.set(3,3,EvtComplex(0.0,0.0));
387
388 temp.set(0,1,t2.get(3,2)-t2.get(2,3));
389 temp.set(0,2,-t2.get(3,1)+t2.get(1,3));
390 temp.set(0,3,t2.get(2,1)-t2.get(1,2));
391
392 temp.set(1,2,-t2.get(3,0)+t2.get(0,3));
393 temp.set(1,3,t2.get(2,0)-t2.get(0,2));
394
395 temp.set(2,3,-t2.get(1,0)+t2.get(0,1));
396
397 temp.set(1,0,-temp.get(0,1));
398 temp.set(2,0,-temp.get(0,2));
399 temp.set(3,0,-temp.get(0,3));
400
401 temp.set(2,1,-temp.get(1,2));
402 temp.set(3,1,-temp.get(1,3));
403
404 temp.set(3,2,-temp.get(2,3));
405
406 return temp;
407
408}

Referenced by EvtbTosllVectorAmp::CalcAmp(), EvtSemiLeptonicTensorAmp::CalcAmp(), EvtSemiLeptonicVectorAmp::CalcAmp(), EvtBHadronic::decay(), EvtKstarnunu::decay(), EvtLNuGamma::decay(), EvtSVPCP::decay(), EvtSVPHelAmp::decay(), EvtTVSPwave::decay(), EvtVSPPwave::decay(), EvtDecayPlaneNormalAngle(), and EvtVector4R::scalartripler3().

◆ operator*() [1/4]

EvtTensor4C operator* ( const EvtComplex c,
const EvtTensor4C t1 
)

Definition at line 281 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

281 {
282
283 return EvtTensor4C(t1)*=c;
284
285}

◆ operator*() [2/4]

EvtTensor4C operator* ( const EvtTensor4C t1,
const EvtComplex c 
)

Definition at line 275 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

275 {
276
277 return EvtTensor4C(t1)*=c;
278
279}

◆ operator*() [3/4]

EvtTensor4C operator* ( const EvtTensor4C t1,
double  d 
)

Definition at line 300 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

300 {
301
302 return EvtTensor4C(t1)*=EvtComplex(d,0.0);
303
304}

◆ operator*() [4/4]

EvtTensor4C operator* ( double  d,
const EvtTensor4C t1 
)

Definition at line 306 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

306 {
307
308 return EvtTensor4C(t1)*=EvtComplex(d,0.0);
309
310}

◆ operator<<()

ostream & operator<< ( ostream &  s,
const EvtTensor4C t 
)

Definition at line 205 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

205 {
206
207 int i,j;
208 s<< endl;
209 for(i=0;i<4;i++){
210 for(j=0;j<4;j++){
211 s << t.t[i][j];
212 }
213 s << endl;
214 }
215 return s;
216}
XmlRpcServer s
Definition: HelloServer.cpp:11
TTree * t
Definition: binning.cxx:23

◆ rotateEuler()

EvtTensor4C rotateEuler ( const EvtTensor4C rs,
double  alpha,
double  beta,
double  gamma 
)

Definition at line 80 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtTensor4C.cc.

81 {
82
83 EvtTensor4C tmp(rs);
84 tmp.applyRotateEuler(alpha,beta,gamma);
85 return tmp;
86
87}
const double alpha