EvtGen 2.2.0
Monte Carlo generator of particle decays, in particular the weak decays of heavy flavour particles such as B mesons.
Loading...
Searching...
No Matches
EvtGammaMatrix.hh
Go to the documentation of this file.
1
2/***********************************************************************
3* Copyright 1998-2020 CERN for the benefit of the EvtGen authors *
4* *
5* This file is part of EvtGen. *
6* *
7* EvtGen is free software: you can redistribute it and/or modify *
8* it under the terms of the GNU General Public License as published by *
9* the Free Software Foundation, either version 3 of the License, or *
10* (at your option) any later version. *
11* *
12* EvtGen is distributed in the hope that it will be useful, *
13* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15* GNU General Public License for more details. *
16* *
17* You should have received a copy of the GNU General Public License *
18* along with EvtGen. If not, see <https://www.gnu.org/licenses/>. *
19***********************************************************************/
20
21#ifndef EVTGAMMAMATRIX_HH
22#define EVTGAMMAMATRIX_HH
23
25#include "EvtGenBase/EvtDiracSpinor.hh" // needed for adjoint
26//#include <iostream.h>
27#include <iosfwd>
28class EvtGammaMatrix;
29class EvtVector4C;
30
31namespace EvtGenFunctions {
32 // slash or Feynman slash a 4-vector
35} // namespace EvtGenFunctions
36
37// Description: Class to manipulate gamma matrices. The reperesentation
38// used is the "standard" Dirac representation.
39
40class EvtGammaMatrix final {
41 friend EvtGammaMatrix operator*( const EvtComplex& c,
42 const EvtGammaMatrix& g );
44 const EvtComplex& c );
45 friend EvtGammaMatrix operator/( const EvtGammaMatrix& g, const double d );
47 const EvtDiracSpinor& d );
49 const EvtGammaMatrix& g2 );
51 const EvtGammaMatrix& g2 );
53 const EvtGammaMatrix& g2 );
54 friend std::ostream& operator<<( std::ostream& s, const EvtGammaMatrix& v );
56
57 public:
59 EvtGammaMatrix( const EvtGammaMatrix& gm );
61
62 void init();
63 static const EvtGammaMatrix& g( int );
64 static const EvtGammaMatrix& g0();
65 static const EvtGammaMatrix& g1();
66 static const EvtGammaMatrix& g2();
67 static const EvtGammaMatrix& g3();
68 static const EvtGammaMatrix& g5();
69 static const EvtGammaMatrix& id();
70 static const EvtGammaMatrix& va0();
71 static const EvtGammaMatrix& va1();
72 static const EvtGammaMatrix& va2();
73 static const EvtGammaMatrix& va3();
74 static const EvtGammaMatrix& v0();
75 static const EvtGammaMatrix& v1();
76 static const EvtGammaMatrix& v2();
77 static const EvtGammaMatrix& v3();
78 // Dirac sigma matrix with upper or lower indices (only one element)
79 static const EvtGammaMatrix& sigmaUpper( unsigned int mu, unsigned int nu );
80 static const EvtGammaMatrix& sigmaLower( unsigned int mu, unsigned int nu );
81
85
86 private:
88};
89
91 const EvtGammaMatrix& g2 )
92{
93 return EvtGammaMatrix( g1 ) += g2;
94}
95
97 const EvtGammaMatrix& g2 )
98{
99 return EvtGammaMatrix( g1 ) -= g2;
100}
101
103 const EvtGammaMatrix& g2 )
104{
105 return EvtGammaMatrix( g1 ) *= g2;
106}
107
108inline EvtGammaMatrix operator/( const EvtGammaMatrix& g, const double d )
109{
110 return g * EvtComplex( 1 / d, 0 );
111}
112
113#endif
EvtGammaMatrix operator*(const EvtGammaMatrix &g1, const EvtGammaMatrix &g2)
EvtGammaMatrix operator/(const EvtGammaMatrix &g, const double d)
EvtGammaMatrix operator-(const EvtGammaMatrix &g1, const EvtGammaMatrix &g2)
EvtGammaMatrix operator+(const EvtGammaMatrix &g1, const EvtGammaMatrix &g2)
EvtDiracSpinor adjoint() const
EvtComplex m_gamma[4][4]
static const EvtGammaMatrix & sigmaLower(unsigned int mu, unsigned int nu)
friend EvtGammaMatrix operator*(const EvtComplex &c, const EvtGammaMatrix &g)
static const EvtGammaMatrix & va1()
friend EvtGammaMatrix operator/(const EvtGammaMatrix &g, const double d)
friend EvtGammaMatrix operator-(const EvtGammaMatrix &g1, const EvtGammaMatrix &g2)
static const EvtGammaMatrix & v0()
static const EvtGammaMatrix & id()
static const EvtGammaMatrix & sigmaUpper(unsigned int mu, unsigned int nu)
static const EvtGammaMatrix & g0()
static const EvtGammaMatrix & g2()
friend std::ostream & operator<<(std::ostream &s, const EvtGammaMatrix &v)
EvtGammaMatrix & operator-=(const EvtGammaMatrix &g)
static const EvtGammaMatrix & g(int)
static const EvtGammaMatrix & g1()
static const EvtGammaMatrix & va3()
static const EvtGammaMatrix & g3()
static const EvtGammaMatrix & v2()
static const EvtGammaMatrix & va0()
static const EvtGammaMatrix & va2()
static const EvtGammaMatrix & g5()
static const EvtGammaMatrix & v1()
static const EvtGammaMatrix & v3()
EvtGammaMatrix & operator*=(const EvtGammaMatrix &g)
EvtGammaMatrix & operator=(const EvtGammaMatrix &gm)
EvtGammaMatrix & operator+=(const EvtGammaMatrix &g)
friend EvtGammaMatrix operator+(const EvtGammaMatrix &g1, const EvtGammaMatrix &g2)
EvtGammaMatrix slash(const EvtVector4C &p)