Bridge++  Ver. 1.2.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gammaMatrixSet_Dirac.cpp
Go to the documentation of this file.
1 
14 #include "gammaMatrixSet_Dirac.h"
15 
16 #include <cassert>
17 
18 #include "commonParameters.h"
19 #include "communicator.h"
20 
21 #include "bridgeIO.h"
22 using Bridge::vout;
23 
24 #ifdef USE_FACTORY
25 namespace {
26  GammaMatrixSet *create_object()
27  {
28  return new GammaMatrixSet_Dirac();
29  }
30 
31 
32  bool init = GammaMatrixSet::Factory::Register("Dirac", create_object);
33 }
34 #endif
35 
36 const std::string GammaMatrixSet_Dirac::class_name = "GammaMatrixSet_Dirac";
37 
38 //====================================================================
40 {
41  vout.general(m_vl, "Gamma matrix: dirac representation.\n");
42 
43  m_gm[UNITY].set(0, 0, icomplex(1, 0));
44  m_gm[UNITY].set(1, 1, icomplex(1, 0));
45  m_gm[UNITY].set(2, 2, icomplex(1, 0));
46  m_gm[UNITY].set(3, 3, icomplex(1, 0));
47 
48  m_gm[GAMMA1].set(0, 3, icomplex(0, -1));
49  m_gm[GAMMA1].set(1, 2, icomplex(0, -1));
50  m_gm[GAMMA1].set(2, 1, icomplex(0, 1));
51  m_gm[GAMMA1].set(3, 0, icomplex(0, 1));
52 
53  m_gm[GAMMA2].set(0, 3, icomplex(-1, 0));
54  m_gm[GAMMA2].set(1, 2, icomplex(1, 0));
55  m_gm[GAMMA2].set(2, 1, icomplex(1, 0));
56  m_gm[GAMMA2].set(3, 0, icomplex(-1, 0));
57 
58  m_gm[GAMMA3].set(0, 2, icomplex(0, -1));
59  m_gm[GAMMA3].set(1, 3, icomplex(0, 1));
60  m_gm[GAMMA3].set(2, 0, icomplex(0, 1));
61  m_gm[GAMMA3].set(3, 1, icomplex(0, -1));
62 
63  m_gm[GAMMA4].set(0, 0, icomplex(1, 0));
64  m_gm[GAMMA4].set(1, 1, icomplex(1, 0));
65  m_gm[GAMMA4].set(2, 2, icomplex(-1, 0));
66  m_gm[GAMMA4].set(3, 3, icomplex(-1, 0));
67 
68  m_gm[GAMMA5].set(0, 2, icomplex(1, 0));
69  m_gm[GAMMA5].set(1, 3, icomplex(1, 0));
70  m_gm[GAMMA5].set(2, 0, icomplex(1, 0));
71  m_gm[GAMMA5].set(3, 1, icomplex(1, 0));
72 
73  m_gm[GAMMA51] = m_gm[GAMMA5].mult(m_gm[GAMMA1]);
74 
75  m_gm[GAMMA52] = m_gm[GAMMA5].mult(m_gm[GAMMA2]);
76 
77  m_gm[GAMMA53] = m_gm[GAMMA5].mult(m_gm[GAMMA3]);
78 
79  m_gm[GAMMA54] = m_gm[GAMMA5].mult(m_gm[GAMMA4]);
80 
81  m_gm[SIGMA12] = m_gm[GAMMA2].mult_i(m_gm[GAMMA1]);
82 
83  m_gm[SIGMA23] = m_gm[GAMMA3].mult_i(m_gm[GAMMA2]);
84 
85  m_gm[SIGMA31] = m_gm[GAMMA1].mult_i(m_gm[GAMMA3]);
86 
87  m_gm[SIGMA41] = m_gm[GAMMA1].mult_i(m_gm[GAMMA4]);
88 
89  m_gm[SIGMA42] = m_gm[GAMMA2].mult_i(m_gm[GAMMA4]);
90 
91  m_gm[SIGMA43] = m_gm[GAMMA3].mult_i(m_gm[GAMMA4]);
92 
93  m_gm[CHARGECONJG] = m_gm[GAMMA4].mult(m_gm[GAMMA2]);
94 
95  //print();
96 }
97 
98 
99 //====================================================================
101 {
102  vout.general(m_vl, "\n unity =\n");
103  m_gm[UNITY].print();
104 
105  vout.general(m_vl, "\n gamma1 =\n");
106  m_gm[GAMMA1].print();
107 
108  vout.general(m_vl, "\n gamma2 =\n");
109  m_gm[GAMMA2].print();
110 
111  vout.general(m_vl, "\n gamma3 =\n");
112  m_gm[GAMMA3].print();
113 
114  vout.general(m_vl, "\n gamma4 =\n");
115  m_gm[GAMMA4].print();
116 
117  vout.general(m_vl, "\n gamma5 =\n");
118  m_gm[GAMMA5].print();
119 
120  vout.general(m_vl, "\n gamma5 * gamma1 =\n");
121  m_gm[GAMMA51].print();
122 
123  vout.general(m_vl, "\n gamma5 * gamma2 =\n");
124  m_gm[GAMMA52].print();
125 
126  vout.general(m_vl, "\n gamma5 * gamma3 =\n");
127  m_gm[GAMMA53].print();
128 
129  vout.general(m_vl, "\n gamma5 * gamma4 =\n");
130  m_gm[GAMMA54].print();
131 
132  vout.general(m_vl, "\n sigma12 = -(i/2) [gamma1, gamma2] =\n");
133  m_gm[SIGMA12].print();
134 
135  vout.general(m_vl, "\n sigma23 = -(i/2) [gamma2, gamma3] =\n");
136  m_gm[SIGMA23].print();
137 
138  vout.general(m_vl, "\n sigma31 = -(i/2) [gamma3, gamma1] =\n");
139  m_gm[SIGMA31].print();
140 
141  vout.general(m_vl, "\n sigma41 = -(i/2) [gamma4, gamma1] =\n");
142  m_gm[SIGMA41].print();
143 
144  vout.general(m_vl, "\n sigma42 = -(i/2) [gamma4, gamma2] =\n");
145  m_gm[SIGMA42].print();
146 
147  vout.general(m_vl, "\n sigma43 = -(i/2) [gamma4, gamma3] =\n");
148  m_gm[SIGMA43].print();
149 
150  vout.general(m_vl, "\n charge_conjg = gamma4 * gamma2 =\n");
151  m_gm[CHARGECONJG].print();
152 }
153 
154 
155 //====================================================================
156 //============================================================END=====
BridgeIO vout
Definition: bridgeIO.cpp:207
void general(const char *format,...)
Definition: bridgeIO.cpp:38
static const std::string class_name
Set of Gamma Matrices: basis class.
Set of Gamma Matrix: Dirac representation.
Bridge::VerboseLevel m_vl
std::valarray< GammaMatrix > m_gm