MINT2
Functions
LeviCivita.h File Reference
#include "Mint/LorentzMatrix.h"
#include "Mint/Utils.h"
#include "TLorentzVector.h"
#include "TMatrixT.h"

Go to the source code of this file.

Functions

double LeviCivita (const TLorentzVector &p0, const TLorentzVector &p1, const TLorentzVector &p2, const TLorentzVector &p3)
 
double LeviCivita (const TLorentzVector &p0, const TLorentzVector &p1, const LorentzMatrix &M)
 
TLorentzVector LeviCivita (const TLorentzVector &a, const TLorentzVector &b, const TLorentzVector &c)
 

Function Documentation

◆ LeviCivita() [1/3]

double LeviCivita ( const TLorentzVector &  p0,
const TLorentzVector &  p1,
const TLorentzVector &  p2,
const TLorentzVector &  p3 
)
inline

Definition at line 12 of file LeviCivita.h.

15  {
16 
17  // it is the determinant of the matrix made up of p0, p1, p2, p3
18  TMatrixT<double> m(4, 4);
19  for(int i=0; i < 4; i++){
20  // strange indexing, because I have 0th component = E
21  // but Rene has 0th component = px, 3rd component = E:
22  m(0, i)=p0[(i+3)%4];
23  m(1, i)=p1[(i+3)%4];
24  m(2, i)=p2[(i+3)%4];
25  m(3, i)=p3[(i+3)%4];
26  }
27  return m.Determinant();
28 }
static const double m

◆ LeviCivita() [2/3]

double LeviCivita ( const TLorentzVector &  p0,
const TLorentzVector &  p1,
const LorentzMatrix M 
)
inline

Definition at line 30 of file LeviCivita.h.

32  {
33  double sum=0;
34  for(int a=0; a<4; a++){
35  for(int b=0; b<4; b++){
36  if(a==b) continue;
37  for(int c=0; c<4; c++){
38  if(a==c || b==c) continue;
39  for(int d=0; d<4; d++){
40  if(a==d || b==d || c==d) continue;
41  sum += MINT::LeviCita(a, b, c, d)
42  * p0[ (a + 3)%4 ] // coping with the stupid, stupid
43  * p1[ (b + 3)%4 ] // stupid, stupid convention in TLorentzVector
44  * M[ (c + 3)%4 ][ (d + 3)%4 ] // that index 0 = p_x, 1=py, 2=pz, 3=Energy
45  ; // arrrrgh. ARRRRRRRGH!!! Rene!!! Why????
46  // (0 + 3)%4 = 3, (1+3)%4 = 0, (2+3)%4 = 1 (3+3)%4 = 2
47  }
48  }
49  }
50  }
51  return sum;
52 }
int LeviCita(int a, int b)
Definition: Utils.cpp:41

◆ LeviCivita() [3/3]

TLorentzVector LeviCivita ( const TLorentzVector &  a,
const TLorentzVector &  b,
const TLorentzVector &  c 
)
inline

Definition at line 54 of file LeviCivita.h.

54  {
55 
56  TLorentzVector v;
57 
58  v.SetT( -1.* a.X() * ( b.Y() * c.Z() - b.Z() * c.Y() )
59  - a.Y() * ( b.Z() * c.X() - b.X() * c.Z() )
60  - a.Z() * ( b.X() * c.Y() - b.Y() * c.X() ) );
61 
62  v.SetZ( a.X() * ( b.T() * c.Y() - b.Y() * c.T() )
63  + a.Y() * ( b.X() * c.T() - b.T() * c.X() )
64  + a.T() * ( b.Y() * c.X() - b.X() * c.Y() ) );
65 
66  v.SetY( a.X() * ( b.Z() * c.T() - b.T() * c.Z() )
67  + a.Z() * ( b.T() * c.X() - b.X() * c.T() )
68  + a.T() * ( b.X() * c.Z() - b.Z() * c.X() ) );
69 
70  v.SetX( a.Y() * ( b.T() * c.Z() - b.Z() * c.T() )
71  + a.Z() * ( b.Y() * c.T() - b.T() * c.Y() )
72  + a.T() * ( b.Z() * c.Y() - b.Y() * c.Z() ) );
73 
74  return v;
75 }