7 #include "qdp_config.h"
33 template<
class T1,
class T2,
class T3>
35 LatticeSpinMatrix deltaContract123(
const T1& q1,
43 traceColor(q3 * traceSpin(quarkContract13((q1*Gamma(10))*Gamma(
n), Gamma(10)*(Gamma(
m)*q2))));
62 template<
class T1,
class T2,
class T3>
64 LatticeSpinMatrix deltaContract132(
const T1& q1,
72 traceColor(q3 * quarkContract13((q1*Gamma(10))*Gamma(
n), Gamma(10)*(Gamma(
m)*q2)));
91 template<
class T1,
class T2,
class T3>
93 LatticeSpinMatrix deltaContract(
const T1& u1,
100 2*deltaContract123(
d, u1, u2,
n,
m) + deltaContract123(u1, u2,
d,
n,
m)
101 + 2*deltaContract132(
d, u1, u2,
n,
m) + 2*deltaContract132(u1,
d, u2,
n,
m)
102 + 2*deltaContract132(u1, u2,
d,
n,
m);
108 LatticeSpinMatrix S =
109 traceColor(u2 * traceSpin(quarkContract13((
d*Gamma(10))*Gamma(
n), Gamma(10)*(Gamma(
m)*u1))))
110 + 0.5*traceColor(
d * traceSpin(quarkContract13((u1*Gamma(10))*Gamma(
n), Gamma(10)*(Gamma(
m)*u2))))
111 + traceColor(u2 * quarkContract13((
d*Gamma(10))*Gamma(
n), Gamma(10)*(Gamma(
m)*u1)))
112 + traceColor(u2 * quarkContract13((u1*Gamma(10))*Gamma(
n), Gamma(10)*(Gamma(
m)*
d)))
113 + traceColor(
d * quarkContract13((u1*Gamma(10))*Gamma(
n), Gamma(10)*(Gamma(
m)*u2)));
123 LatticeSpinMatrix S =
124 traceColor(u2 * traceSpin(quarkContract13(
d*Gamma(n10), Gamma(m10)*u1)))
125 + 0.5*traceColor(
d * traceSpin(quarkContract13(u1*Gamma(n10), Gamma(m10)*u2)))
126 + traceColor(u2 * quarkContract13(
d*Gamma(n10), Gamma(m10)*u1))
127 + traceColor(u2 * quarkContract13(u1*Gamma(n10), Gamma(m10)*
d))
128 + traceColor(
d * quarkContract13(u1*Gamma(n10), Gamma(m10)*u2));
158 const multi1d<LatticeColorMatrix>&
u,
159 const LatticePropagator& forw_u_prop,
160 const LatticePropagator& back_u_prop,
161 const LatticePropagator& forw_d_prop,
162 const LatticePropagator& back_d_prop,
163 const Propagator& u_x2,
164 const Propagator& d_x2,
165 const SftMom& phases,
171 if ( Ns != 4 || Nc != 3 ||
Nd != 4 )
174 QDPIO::cout <<
"Entering wallDeltaFormFac" << std::endl;
175 QDP::StopWatch swatch;
179 form.subroutine =
"wallDeltaFormFac";
182 int length = phases.numSubsets();
200 multi1d<int> gamma_list(2*
Nd);
211 multi1d<SpinMatrix> S_proj(
Nd);
212 SpinMatrix g_one = 1.0;
215 S_proj[0] = 0.5 * (g_one + (g_one * Gamma(8)));
218 S_proj[1] = timesMinusI(Gamma(1 << 1) * (Gamma(1 << 2) * S_proj[0]));
219 S_proj[2] = timesMinusI(Gamma(1 << 2) * (Gamma(1 << 0) * S_proj[0]));
220 S_proj[3] = timesMinusI(Gamma(1 << 0) * (Gamma(1 << 1) * S_proj[0]));
224 multi1d<std::string> quark_name(2);
229 multi1d<std::string> formfac_name(1);
230 formfac_name[0] =
"nucleon->gamma+nucleon";
233 multi1d<std::string> proj_name(
Nd);
235 proj_name[1] =
"sigma_1";
236 proj_name[2] =
"sigma_2";
237 proj_name[3] =
"sigma_3";
241 LatticePropagator anti_u_prop = adj(Gamma(
G5)*back_u_prop*Gamma(
G5));
242 LatticePropagator anti_d_prop = adj(Gamma(
G5)*back_d_prop*Gamma(
G5));
247 form.quark.resize(quark_name.size());
248 for (
int ud=0; ud < form.quark.size(); ++ud)
250 form.quark[ud].formfac.resize(formfac_name.size());
251 for(
int dp = 0; dp < form.quark[ud].formfac.size(); ++dp)
253 form.quark[ud].formfac[dp].lorentz.resize(
Nd*
Nd);
254 for(
int lorz = 0; lorz < form.quark[ud].formfac[dp].lorentz.size(); ++lorz)
256 form.quark[ud].formfac[dp].lorentz[lorz].projector.resize(proj_name.size());
257 for (
int proj = 0; proj < form.quark[ud].formfac[dp].lorentz[lorz].projector.size(); ++proj)
259 form.quark[ud].formfac[dp].lorentz[lorz].projector[proj].insertion.resize(gamma_list.size());
266 QDPIO::cout <<
"Time(init): " << swatch.getTimeInMicroseconds() <<
" s" << std::endl;
272 for(
int gamma_ctr = 0; gamma_ctr < gamma_list.size(); ++gamma_ctr)
275 QDPIO::cout <<
"Time(gamma_ctr=" << gamma_ctr <<
"): " << swatch.getTimeInMicroseconds() <<
" s" << std::endl;
278 int gamma_value = gamma_list[gamma_ctr];
279 int mu = gamma_ctr %
Nd;
280 bool compute_nonlocal = (gamma_ctr <
Nd) ?
true :
false;
283 for(
int ud = 0; ud < form.quark.size(); ++ud)
286 QDPIO::cout <<
"Time(ud=" << ud <<
"): " << swatch.getTimeInMicroseconds() <<
" s" << std::endl;
289 WallFormFac_quark_t& quark = form.quark[ud];
290 quark.quark_ctr = ud;
291 quark.quark_name = quark_name[ud];
293 LatticePropagator local_insert_prop, nonlocal_insert_prop;
302 local_insert_prop = anti_u_prop*Gamma(gamma_value)*forw_u_prop;
304 if (compute_nonlocal)
316 local_insert_prop = anti_d_prop*Gamma(gamma_value)*forw_d_prop;
318 if (compute_nonlocal)
332 for(
int dp = 0; dp < quark.formfac.size(); ++dp)
335 QDPIO::cout <<
"Time(dp=" << dp <<
"): " << swatch.getTimeInMicroseconds() <<
" s" << std::endl;
338 WallFormFac_formfac_t& formfac = quark.formfac[dp];
339 formfac.formfac_ctr = dp;
340 formfac.formfac_name = formfac_name[dp];
342 LatticeSpinMatrix local_contract, nonlocal_contract;
346 for(
int lorz = 0; lorz < formfac.lorentz.size(); ++lorz)
349 QDPIO::cout <<
"Time(lorz=" << lorz <<
"): " << swatch.getTimeInMicroseconds() <<
" s" << std::endl;
352 WallFormFac_lorentz_t& lorentz = formfac.lorentz[lorz];
353 lorentz.lorentz_ctr = lorz;
360 tau = int(lorz /
Nd);
362 int gamma_value1 = 1 << sigma;
363 int gamma_value2 = 1 << tau;
365 lorentz.snk_gamma = gamma_value1;
366 lorentz.src_gamma = gamma_value2;
377 deltaContract(local_insert_prop, u_x2, d_x2, gamma_value1, gamma_value2) +
378 deltaContract(u_x2, local_insert_prop, d_x2, gamma_value1, gamma_value2);
380 if (compute_nonlocal)
384 deltaContract(nonlocal_insert_prop, u_x2, d_x2, gamma_value1, gamma_value2) +
385 deltaContract(u_x2, nonlocal_insert_prop, d_x2, gamma_value1, gamma_value2);
395 deltaContract(u_x2, u_x2, local_insert_prop, gamma_value1, gamma_value2);
397 if (compute_nonlocal)
401 deltaContract(u_x2, u_x2, nonlocal_insert_prop, gamma_value1, gamma_value2);
412 for (
int proj = 0; proj < lorentz.projector.size(); ++proj)
415 QDPIO::cout <<
"Time(proj=" << proj <<
"): " << swatch.getTimeInMicroseconds() <<
" s" << std::endl;
418 WallFormFac_projector_t& projector = lorentz.projector[proj];
419 projector.proj_ctr = proj;
420 projector.proj_name = proj_name[proj];
422 WallFormFac_insertion_t& insertion = projector.insertion[gamma_ctr];
424 insertion.gamma_ctr = gamma_ctr;
426 insertion.gamma_value = gamma_value;
429 LatticeComplex corr_local_fn = traceSpin(S_proj[proj] * local_contract);
432 LatticeComplex corr_nonlocal_fn = traceSpin(S_proj[proj] * nonlocal_contract);
434 multi1d<WallFormFac_momenta_t>& momenta = insertion.momenta;
437 QDPIO::cout <<
"Time(before sft): " << swatch.getTimeInMicroseconds() <<
" s" << std::endl;
440 compute_nonlocal,
t0);
442 QDPIO::cout <<
"Time(after sft): " << swatch.getTimeInMicroseconds() <<
" s" << std::endl;
451 QDPIO::cout <<
"Time(wallDeltaFormFac): " << swatch.getTimeInMicroseconds() <<
" s" << std::endl;
452 QDPIO::cout <<
"Exiting wallDeltaFormFac" << std::endl;
Primary include file for CHROMA library code.
Compute gamma matrix multiplication table factors.
int gammaSgn(int n, int m)
Return gamma matrix multiplication table factors.
void wallFormFacSft(multi1d< WallFormFac_momenta_t > &momenta, const LatticeComplex &corr_local_fn, const LatticeComplex &corr_nonlocal_fn, const SftMom &phases, bool compute_nonlocal, int t0)
Do slow SFT over hadron correlator data.
LatticePropagator nonlocalCurrentProp(const multi1d< LatticeColorMatrix > &u, int mu, const LatticePropagator &forw_prop, const LatticePropagator &anti_prop)
Compute nonlocal current propagator.
void wallDeltaFormFac(WallFormFac_formfacs_t &form, const multi1d< LatticeColorMatrix > &u, const LatticePropagator &forw_u_prop, const LatticePropagator &back_u_prop, const LatticePropagator &forw_d_prop, const LatticePropagator &back_d_prop, const Propagator &u_x2, const Propagator &d_x2, const SftMom &phases, int t0, bool wall_source)
Wall-sink delta-> gamma+delta form-factors.
Asqtad Staggered-Dirac operator.
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
static multi1d< LatticeColorMatrix > u
Wall-sink delta-> gamma+delta form-factors.