MINT2
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
SymmLorentzMatrix Class Reference

#include <SymmLorentzMatrix.h>

Inheritance diagram for SymmLorentzMatrix:
LorentzMatrix ZTgperp ZTspin2

Public Member Functions

 SymmLorentzMatrix ()
 
 SymmLorentzMatrix (const TLorentzVector p[4])
 
 SymmLorentzMatrix (const TLorentzVector p)
 
 SymmLorentzMatrix (const SymmLorentzMatrix &other)
 
SymmLorentzMatrixadd (const SymmLorentzMatrix &other)
 
SymmLorentzMatrixsubtract (const SymmLorentzMatrix &other)
 
SymmLorentzMatrixmult (double s)
 
SymmLorentzMatrixdiv (double s)
 
TLorentzVector Contract (const TLorentzVector &vec)
 
LorentzMatrix Contract_1 (const SymmLorentzMatrix &M)
 
double Contract_2 (const SymmLorentzMatrix &M)
 
SymmLorentzMatrixoperator+= (const SymmLorentzMatrix &rhs)
 
SymmLorentzMatrixoperator *= (double rhs)
 
SymmLorentzMatrixoperator-= (const SymmLorentzMatrix &rhs)
 
SymmLorentzMatrixoperator/= (double rhs)
 
SymmLorentzMatrixoperator= (const SymmLorentzMatrix &other)
 
SymmLorentzMatrix operator+ (const SymmLorentzMatrix &rhs) const
 
SymmLorentzMatrix operator- (const SymmLorentzMatrix &rhs) const
 
SymmLorentzMatrix operator * (double rhs) const
 
SymmLorentzMatrix operator/ (double rhs) const
 
- Public Member Functions inherited from LorentzMatrix
const TLorentzVector & v (int i) const
 
 LorentzMatrix ()
 
 LorentzMatrix (const TLorentzVector p[4])
 
 LorentzMatrix (const LorentzMatrix &other)
 
const TLorentzVector & X () const
 
const TLorentzVector & Y () const
 
const TLorentzVector & Z () const
 
const TLorentzVector & T () const
 
TLorentzVector & X ()
 
TLorentzVector & Y ()
 
TLorentzVector & Z ()
 
TLorentzVector & T ()
 
const TLorentzVector & operator[] (int i) const
 
TLorentzVector & operator[] (int i)
 
LorentzMatrixadd (const LorentzMatrix &other)
 
LorentzMatrixsubtract (const LorentzMatrix &other)
 
LorentzMatrixmult (double s)
 
LorentzMatrixdiv (double s)
 
LorentzMatrixoperator+= (const LorentzMatrix &rhs)
 
LorentzMatrixoperator *= (double rhs)
 
LorentzMatrixoperator-= (const LorentzMatrix &rhs)
 
LorentzMatrixoperator/= (double rhs)
 
LorentzMatrixoperator= (const LorentzMatrix &other)
 
LorentzMatrix operator+ (const LorentzMatrix &rhs) const
 
LorentzMatrix operator- (const LorentzMatrix &rhs) const
 
LorentzMatrix operator * (double rhs) const
 
LorentzMatrix operator/ (double rhs) const
 

Static Public Member Functions

static const SymmLorentzMatrixgmunu ()
 

Protected Member Functions

bool symmetrize ()
 
bool makeZero ()
 
- Protected Member Functions inherited from LorentzMatrix
bool makeZero ()
 

Static Protected Member Functions

static void makeGmunu ()
 

Static Protected Attributes

static SymmLorentzMatrix__gmunu = 0
 

Additional Inherited Members

- Protected Attributes inherited from LorentzMatrix
TLorentzVector _v [4]
 

Detailed Description

Definition at line 7 of file SymmLorentzMatrix.h.

Constructor & Destructor Documentation

◆ SymmLorentzMatrix() [1/4]

SymmLorentzMatrix::SymmLorentzMatrix ( )
inline

Definition at line 41 of file SymmLorentzMatrix.h.

◆ SymmLorentzMatrix() [2/4]

SymmLorentzMatrix::SymmLorentzMatrix ( const TLorentzVector  p[4])
inline

Definition at line 42 of file SymmLorentzMatrix.h.

43  : LorentzMatrix(p) {};

◆ SymmLorentzMatrix() [3/4]

SymmLorentzMatrix::SymmLorentzMatrix ( const TLorentzVector  p)
inline

Definition at line 45 of file SymmLorentzMatrix.h.

45  {
46  X().SetX(p.X() * p.X());
47  X().SetY(p.X() * p.Y());
48  X().SetZ(p.X() * p.Z());
49  X().SetT(p.X() * p.T());
50 
51  Y().SetX(p.Y() * p.X());
52  Y().SetY(p.Y() * p.Y());
53  Y().SetZ(p.Y() * p.Z());
54  Y().SetT(p.Y() * p.T());
55 
56  Z().SetX(p.Z() * p.X());
57  Z().SetY(p.Z() * p.Y());
58  Z().SetZ(p.Z() * p.Z());
59  Z().SetT(p.Z() * p.T());
60 
61  T().SetX(p.T() * p.X());
62  T().SetY(p.T() * p.Y());
63  T().SetZ(p.T() * p.Z());
64  T().SetT(p.T() * p.T());
65  }
const TLorentzVector & T() const
Definition: LorentzMatrix.h:31
const TLorentzVector & X() const
Definition: LorentzMatrix.h:28
const TLorentzVector & Y() const
Definition: LorentzMatrix.h:29
const TLorentzVector & Z() const
Definition: LorentzMatrix.h:30

◆ SymmLorentzMatrix() [4/4]

SymmLorentzMatrix::SymmLorentzMatrix ( const SymmLorentzMatrix other)
inline

Definition at line 66 of file SymmLorentzMatrix.h.

67  : LorentzMatrix(other){}

Member Function Documentation

◆ add()

SymmLorentzMatrix& SymmLorentzMatrix::add ( const SymmLorentzMatrix other)
inline

Definition at line 69 of file SymmLorentzMatrix.h.

69  {
70  for(int i=0; i < 4; i++) _v[i] += other._v[i];
71  return *this;
72  }
TLorentzVector _v[4]
Definition: LorentzMatrix.h:9

◆ Contract()

TLorentzVector SymmLorentzMatrix::Contract ( const TLorentzVector &  vec)
inline

Definition at line 85 of file SymmLorentzMatrix.h.

85  {
86  // M^{mu nu} g_{nu alpha} v^{alpha}
87  // M^{mu nu} v_{alpha}
88  return vec.T()*T() - vec.X()*X() - vec.Y()*Y() -vec.Z()*Z();
89  }
const TLorentzVector & T() const
Definition: LorentzMatrix.h:31
const TLorentzVector & X() const
Definition: LorentzMatrix.h:28
const TLorentzVector & Y() const
Definition: LorentzMatrix.h:29
const TLorentzVector & Z() const
Definition: LorentzMatrix.h:30

◆ Contract_1()

LorentzMatrix SymmLorentzMatrix::Contract_1 ( const SymmLorentzMatrix M)
inline

Definition at line 90 of file SymmLorentzMatrix.h.

90  {
91  // One pair of indices gets contracted. Since
92  // both matrices are symmetric, it doesnt matter which.
93  //
94  // O^{mu alpha} g_{alpha beta} M^{beta nu} = R^{mu nu}
95  // O^{mu alpha} M_{beta}^{nu}
96  LorentzMatrix R;
97  R.X() = this->Contract(M.X());
98  R.Y() = this->Contract(M.Y());
99  R.Z() = this->Contract(M.Z());
100  R.T() = this->Contract(M.T()); // signs?
101 
102  return R;
103  }
const TLorentzVector & T() const
Definition: LorentzMatrix.h:31
const TLorentzVector & X() const
Definition: LorentzMatrix.h:28
const TLorentzVector & Y() const
Definition: LorentzMatrix.h:29
const TLorentzVector & Z() const
Definition: LorentzMatrix.h:30
TLorentzVector Contract(const TLorentzVector &vec)

◆ Contract_2()

double SymmLorentzMatrix::Contract_2 ( const SymmLorentzMatrix M)
inline

Definition at line 104 of file SymmLorentzMatrix.h.

104  {
105  // Both pairs of indices are contracted.
106  // since the matrices are symmetric, it does
107  // not matter which index from this with which form M.
108  //
109  // O^{mu alpha} g_{alpha beta} M^{beta nu} g_{mu nu}
111  // R^{mu nu} R_{mu nu}
112  double xx = R.X().X();//Dot(R.X());
113  double yy = R.Y().Y();//Dot(R.Y());
114  double zz = R.Z().Z();//Dot(R.Z());
115  double tt = R.T().T();//Dot(R.T());
116 
117  return tt - xx - yy - zz; // signs?
118  }
LorentzMatrix Contract_1(const SymmLorentzMatrix &M)

◆ div()

SymmLorentzMatrix& SymmLorentzMatrix::div ( double  s)
inline

Definition at line 81 of file SymmLorentzMatrix.h.

81  {
82  for(int i=0; i < 4; i++) _v[i] *= (1./s);
83  return *this;
84  }
static const double s
TLorentzVector _v[4]
Definition: LorentzMatrix.h:9

◆ gmunu()

const SymmLorentzMatrix & SymmLorentzMatrix::gmunu ( )
static

Definition at line 10 of file SymmLorentzMatrix.cpp.

10  {
11  if(0 == __gmunu) makeGmunu();
12  return * __gmunu;
13 }
static SymmLorentzMatrix * __gmunu
static void makeGmunu()

◆ makeGmunu()

void SymmLorentzMatrix::makeGmunu ( )
staticprotected

Definition at line 16 of file SymmLorentzMatrix.cpp.

16  {
17  __gmunu = new SymmLorentzMatrix();
18  __gmunu->X().SetXYZT(-1,0,0,0);
19  __gmunu->Y().SetXYZT(0,-1,0,0);
20  __gmunu->Z().SetXYZT(0,0,-1,0);
21  __gmunu->T().SetXYZT(0,0,0, 1);
22 }
static SymmLorentzMatrix * __gmunu
const TLorentzVector & T() const
Definition: LorentzMatrix.h:31
const TLorentzVector & X() const
Definition: LorentzMatrix.h:28
const TLorentzVector & Y() const
Definition: LorentzMatrix.h:29
const TLorentzVector & Z() const
Definition: LorentzMatrix.h:30

◆ makeZero()

bool SymmLorentzMatrix::makeZero ( )
inlineprotected

Definition at line 32 of file SymmLorentzMatrix.h.

32  {
33  X().SetXYZT(0,0,0,0);
34  Y().SetXYZT(0,0,0,0);
35  Z().SetXYZT(0,0,0,0);
36  T().SetXYZT(0,0,0,0);
37  return true;
38  }
const TLorentzVector & T() const
Definition: LorentzMatrix.h:31
const TLorentzVector & X() const
Definition: LorentzMatrix.h:28
const TLorentzVector & Y() const
Definition: LorentzMatrix.h:29
const TLorentzVector & Z() const
Definition: LorentzMatrix.h:30

◆ mult()

SymmLorentzMatrix& SymmLorentzMatrix::mult ( double  s)
inline

Definition at line 77 of file SymmLorentzMatrix.h.

77  {
78  for(int i=0; i < 4; i++) _v[i] *= s;
79  return *this;
80  }
static const double s
TLorentzVector _v[4]
Definition: LorentzMatrix.h:9

◆ operator *()

SymmLorentzMatrix SymmLorentzMatrix::operator * ( double  rhs) const
inline

Definition at line 146 of file SymmLorentzMatrix.h.

146  {
147  SymmLorentzMatrix returnVal(*this);
148  returnVal *= rhs;
149  return returnVal;
150  }

◆ operator *=()

SymmLorentzMatrix& SymmLorentzMatrix::operator *= ( double  rhs)
inline

Definition at line 123 of file SymmLorentzMatrix.h.

123  {
124  return mult(rhs);
125  }
SymmLorentzMatrix & mult(double s)

◆ operator+()

SymmLorentzMatrix SymmLorentzMatrix::operator+ ( const SymmLorentzMatrix rhs) const
inline

Definition at line 136 of file SymmLorentzMatrix.h.

136  {
137  SymmLorentzMatrix returnVal(*this);
138  returnVal += rhs;
139  return returnVal;
140  }

◆ operator+=()

SymmLorentzMatrix& SymmLorentzMatrix::operator+= ( const SymmLorentzMatrix rhs)
inline

Definition at line 120 of file SymmLorentzMatrix.h.

120  {
121  return add(rhs);
122  }
SymmLorentzMatrix & add(const SymmLorentzMatrix &other)

◆ operator-()

SymmLorentzMatrix SymmLorentzMatrix::operator- ( const SymmLorentzMatrix rhs) const
inline

Definition at line 141 of file SymmLorentzMatrix.h.

141  {
142  SymmLorentzMatrix returnVal(*this);
143  returnVal -= rhs;
144  return returnVal;
145  }

◆ operator-=()

SymmLorentzMatrix& SymmLorentzMatrix::operator-= ( const SymmLorentzMatrix rhs)
inline

Definition at line 126 of file SymmLorentzMatrix.h.

126  {
127  return subtract(rhs);
128  }
SymmLorentzMatrix & subtract(const SymmLorentzMatrix &other)

◆ operator/()

SymmLorentzMatrix SymmLorentzMatrix::operator/ ( double  rhs) const
inline

Definition at line 151 of file SymmLorentzMatrix.h.

151  {
152  SymmLorentzMatrix returnVal(*this);
153  returnVal /= rhs;
154  return returnVal;
155  }

◆ operator/=()

SymmLorentzMatrix& SymmLorentzMatrix::operator/= ( double  rhs)
inline

Definition at line 129 of file SymmLorentzMatrix.h.

129  {
130  return div(rhs);
131  }
SymmLorentzMatrix & div(double s)

◆ operator=()

SymmLorentzMatrix& SymmLorentzMatrix::operator= ( const SymmLorentzMatrix other)
inline

Definition at line 132 of file SymmLorentzMatrix.h.

132  {
133  for(int i=0; i<4; i++) _v[i] = other._v[i];
134  return *this;
135  }
TLorentzVector _v[4]
Definition: LorentzMatrix.h:9

◆ subtract()

SymmLorentzMatrix& SymmLorentzMatrix::subtract ( const SymmLorentzMatrix other)
inline

Definition at line 73 of file SymmLorentzMatrix.h.

73  {
74  for(int i=0; i < 4; i++) _v[i] -= other._v[i];
75  return *this;
76  }
TLorentzVector _v[4]
Definition: LorentzMatrix.h:9

◆ symmetrize()

bool SymmLorentzMatrix::symmetrize ( )
inlineprotected

Definition at line 13 of file SymmLorentzMatrix.h.

13  {
14  // clumsy but save
15  X().SetY(Y().X());
16  X().SetZ(Z().X());
17  X().SetT(T().X());
18 
19  Y().SetX(X().Y());
20  Y().SetZ(Z().Y());
21  Y().SetT(T().Y());
22 
23  Z().SetX(X().Z());
24  Z().SetY(Y().Z());
25  Z().SetT(T().Z());
26 
27  T().SetX(X().T());
28  T().SetY(Y().T());
29  T().SetZ(Z().T());
30  return true;
31  }
const TLorentzVector & T() const
Definition: LorentzMatrix.h:31
const TLorentzVector & X() const
Definition: LorentzMatrix.h:28
const TLorentzVector & Y() const
Definition: LorentzMatrix.h:29
const TLorentzVector & Z() const
Definition: LorentzMatrix.h:30

Member Data Documentation

◆ __gmunu

SymmLorentzMatrix * SymmLorentzMatrix::__gmunu = 0
staticprotected

Definition at line 9 of file SymmLorentzMatrix.h.


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