mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
gamma matrices as input
This commit is contained in:
parent
9d82855c5d
commit
56cefadf9b
@ -24,6 +24,8 @@ public:
|
||||
static void ContractBaryons(const PropagatorField &q1,
|
||||
const PropagatorField &q2,
|
||||
const PropagatorField &q3,
|
||||
const Gamma GammaA,
|
||||
const Gamma GammaB,
|
||||
ComplexField &baryon_corr);
|
||||
};
|
||||
|
||||
@ -33,19 +35,22 @@ template<class FImpl>
|
||||
void BaryonUtils<FImpl>::ContractBaryons(const PropagatorField &q1,
|
||||
const PropagatorField &q2,
|
||||
const PropagatorField &q3,
|
||||
const Gamma GammaA,
|
||||
const Gamma GammaB,
|
||||
ComplexField &baryon_corr)
|
||||
{
|
||||
GridBase *grid = q1._grid;
|
||||
|
||||
// C = i gamma_2 gamma_4 => C gamma_5 = - i gamma_1 gamma_3
|
||||
Gamma GammaA(Gamma::Algebra::Identity); //Still hardcoded 1
|
||||
Gamma GammaB(Gamma::Algebra::SigmaXZ); //Still hardcoded Cg5
|
||||
//Gamma GammaA(Gamma::Algebra::Identity); //Still hardcoded 1
|
||||
//Gamma GammaB(Gamma::Algebra::SigmaXZ); //Still hardcoded Cg5
|
||||
//Gamma GammaB(Gamma::Algebra::GammaZGamma5); //Still hardcoded CgX = i gamma_3 gamma_5
|
||||
Gamma g4(Gamma::Algebra::GammaT); //needed for parity P_\pm = 0.5*(1 \pm \gamma_4)
|
||||
|
||||
std::vector<std::vector<int>> epsilon = {{0,1,2},{1,2,0},{2,0,1},{0,2,1},{2,1,0},{1,0,2}};
|
||||
std::vector<int> epsilon_sgn = {1,1,1,-1,-1,-1};
|
||||
char left[] = "uud";
|
||||
char right[] = "uud";
|
||||
char left[] = "sss";
|
||||
char right[] = "sss";
|
||||
std::vector<int> wick_contraction = {0,0,0,0,0,0};
|
||||
|
||||
for (int ie=0; ie < 6 ; ie++)
|
||||
|
@ -49,6 +49,7 @@ public:
|
||||
std::string, q1,
|
||||
std::string, q2,
|
||||
std::string, q3,
|
||||
std::string, gamma,
|
||||
std::string, output);
|
||||
};
|
||||
|
||||
@ -132,7 +133,7 @@ void TBaryon<FImpl1, FImpl2, FImpl3>::execute(void)
|
||||
Result result;
|
||||
int nt = env().getDim(Tp);
|
||||
result.corr.resize(nt);
|
||||
|
||||
const std::string gamma{ par().gamma };
|
||||
std::vector<TComplex> buf;
|
||||
// C = i gamma_2 gamma_4 => C gamma_5 = - i gamma_1 gamma_3
|
||||
/* Gamma GammaA(Gamma::Algebra::Identity); //Still hardcoded 1
|
||||
@ -213,7 +214,22 @@ void TBaryon<FImpl1, FImpl2, FImpl3>::execute(void)
|
||||
}
|
||||
*/
|
||||
|
||||
BaryonUtils<FIMPL>::ContractBaryons(q1,q2,q3,c);
|
||||
Gamma GammaA(Gamma::Algebra::Identity);
|
||||
Gamma GammaB(Gamma::Algebra::SigmaXZ); //Still hardcoded Cg5
|
||||
if (gamma.compare("X") ==0){
|
||||
std::cout << "using interpolator C gamma_X";
|
||||
Gamma GammaB(Gamma::Algebra::GammaZGamma5); //Still hardcoded CgX = i gamma_3 gamma_5
|
||||
}
|
||||
if (gamma.compare("Y") ==0){
|
||||
std::cout << "using interpolator C gamma_Y";
|
||||
Gamma GammaB(Gamma::Algebra::GammaT); //Still hardcoded CgX = - gamma_4
|
||||
}
|
||||
if (gamma.compare("Z")==0){
|
||||
std::cout << "using interpolator C gamma_Z";
|
||||
Gamma GammaB(Gamma::Algebra::GammaXGamma5); //Still hardcoded CgX = i gamma_1 gamma_5
|
||||
}
|
||||
|
||||
BaryonUtils<FIMPL>::ContractBaryons(q1,q2,q3,GammaA,GammaB,c);
|
||||
|
||||
sliceSum(c,buf,Tp);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user