CHROMA
wallnuclff_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Wall-sink nucleon form-factors
3  *
4  * Form factors constructed from a quark and a backward quark propagator
5  */
6 #include "qdp_config.h"
7 #if QDP_NS == 4
8 #if QDP_ND == 4
9 #if QDP_NC == 3
10 
11 
12 #include "chromabase.h"
14 
15 namespace Chroma {
16 
17 
18 //! Compute dbar-d current insertion in nucleon
19 /*!
20  * \ingroup hadron
21  *
22  * quark contraction within a baryon
23  *
24  * \param q1 first quark ( Read )
25  * \param q2 second quark ( Read )
26  * \param q3 third quark ( Read )
27  *
28  * \return color-contracted spin object
29  */
30 template<class T1, class T2, class T3>
31 static
32 LatticeSpinMatrix baryonContract(const T1& q1,
33  const T2& q2,
34  const T3& q3)
35 {
36  LatticeSpinMatrix S;
37 
38  S = traceColor(q1 * traceSpin(quarkContract13(q3*Gamma(5), Gamma(5)*q2)))
39  + traceColor(q1 * quarkContract13(q3*Gamma(5), Gamma(5)*q2));
40 
41  return S;
42 }
43 
44 
45 //! Wall-sink nucleon-> gamma+nucleon form-factors
46 /*!
47  * \ingroup hadron
48  *
49  * This routine is specific to Wilson fermions!
50  *
51  * \param form Mega-structure holding form-factors ( Write )
52  * \param u gauge fields (used for non-local currents) ( Read )
53  * \param forw_u_prop forward U quark propagator ( Read )
54  * \param back_u_prop backward D quark propagator ( Read )
55  * \param forw_d_prop forward U quark propagator ( Read )
56  * \param back_d_prop backward D quark propagator ( Read )
57  * \param u_x2 forward U quark propagator evaluated at sink ( Read )
58  * \param d_x2 forward D quark propagator evaluated at sink ( Read )
59  * \param phases fourier transform phase factors ( Read )
60  * \param t0 time slice of the source ( Read )
61  * \param wall_source true if using a wall source ( Read )
62  */
63 
64 void wallNuclFormFac(WallFormFac_formfacs_t& form,
65  const multi1d<LatticeColorMatrix>& u,
66  const LatticePropagator& forw_u_prop,
67  const LatticePropagator& back_u_prop,
68  const LatticePropagator& forw_d_prop,
69  const LatticePropagator& back_d_prop,
70  const Propagator& u_x2,
71  const Propagator& d_x2,
72  const SftMom& phases,
73  int t0,
74  bool wall_source)
75 {
76  START_CODE();
77 
78  if ( Ns != 4 || Nc != 3 || Nd != 4 ) // Code is specific to Ns=4, Nc=3, Nd=4
79  return;
80 
81  form.subroutine = "wallNuclFormFac";
82 
83  // Length of lattice in decay direction and 3pt correlations fcns
84  int length = phases.numSubsets();
85 
86  int G5 = Ns*Ns-1;
87 
88  // The list of meaningful insertions
89  // The gamma matrices specified correspond to
90  // V_mu and A_mu = gamma_mu gamma_5, specificially
91  // where in the Chroma code gamma_5 = g_3 g_2 g_1 g_0
92  //
93  // GAMMA CURRENT
94  // 1 V_0
95  // 2 V_1
96  // 4 V_2
97  // 8 V_3
98  // 14 -A_0
99  // 13 A_1
100  // 11 -A_2
101  // 7 A_3
102  multi1d<int> gamma_list(2*Nd);
103  gamma_list[0] = 1;
104  gamma_list[1] = 2;
105  gamma_list[2] = 4;
106  gamma_list[3] = 8;
107  gamma_list[4] = 14;
108  gamma_list[5] = 13;
109  gamma_list[6] = 11;
110  gamma_list[7] = 7;
111 
112  // Spin projectors
113  multi1d<SpinMatrix> S_proj(Nd);
114  SpinMatrix g_one = 1.0;
115 
116  // T = (1 + gamma_4) / 2 = (1 + Gamma(8)) / 2
117  S_proj[0] = 0.5 * (g_one + (g_one * Gamma(8)));
118 
119  // T = \Sigma_k (1 + gamma_4) / 2 = -i gamma_i gamma_j S_proj[0] i,j cyclic perms
120  S_proj[1] = timesMinusI(Gamma(1 << 1) * (Gamma(1 << 2) * S_proj[0]));
121  S_proj[2] = timesMinusI(Gamma(1 << 2) * (Gamma(1 << 0) * S_proj[0]));
122  S_proj[3] = timesMinusI(Gamma(1 << 0) * (Gamma(1 << 1) * S_proj[0]));
123 
124 
125  // Quark names
126  multi1d<std::string> quark_name(2);
127  quark_name[0] = "u";
128  quark_name[1] = "d";
129 
130  // Formfac names
131  multi1d<std::string> formfac_name(1);
132  formfac_name[0] = "nucleon->gamma+nucleon";
133 
134  // Projector names
135  multi1d<std::string> proj_name(Nd);
136  proj_name[0] = "I";
137  proj_name[1] = "sigma_1";
138  proj_name[2] = "sigma_2";
139  proj_name[3] = "sigma_3";
140 
141 
142  // Antiquarks
143  LatticePropagator anti_u_prop = adj(Gamma(G5)*back_u_prop*Gamma(G5));
144  LatticePropagator anti_d_prop = adj(Gamma(G5)*back_d_prop*Gamma(G5));
145 
146  // Resize some things - this is needed upfront because I traverse the
147  // structure in a non-recursive scheme
148  form.quark.resize(quark_name.size());
149  for (int ud=0; ud < form.quark.size(); ++ud)
150  {
151  form.quark[ud].formfac.resize(formfac_name.size());
152  for(int dp = 0; dp < form.quark[ud].formfac.size(); ++dp)
153  {
154  form.quark[ud].formfac[dp].lorentz.resize(1);
155  for(int lorz = 0; lorz < form.quark[ud].formfac[dp].lorentz.size(); ++lorz)
156  {
157  form.quark[ud].formfac[dp].lorentz[lorz].projector.resize(proj_name.size());
158  for (int proj = 0; proj < form.quark[ud].formfac[dp].lorentz[lorz].projector.size(); ++proj)
159  {
160  form.quark[ud].formfac[dp].lorentz[lorz].projector[proj].insertion.resize(gamma_list.size());
161  }
162  }
163  }
164  }
165 
166 
167  // For calculational purpose, loop over insertions first.
168  // This is out-of-order from storage within the data structure
169  // Loop over gamma matrices of the insertion current of insertion current
170  for(int gamma_ctr = 0; gamma_ctr < gamma_list.size(); ++gamma_ctr)
171  {
172  int gamma_value = gamma_list[gamma_ctr];
173  int mu = gamma_ctr % Nd;
174  bool compute_nonlocal = (gamma_ctr < Nd) ? true : false;
175 
176  // Loop over "u"=0 or "d"=1 pieces
177  for(int ud = 0; ud < form.quark.size(); ++ud)
178  {
179  WallFormFac_quark_t& quark = form.quark[ud];
180  quark.quark_ctr = ud;
181  quark.quark_name = quark_name[ud];
182 
183  LatticePropagator local_insert_prop, nonlocal_insert_prop;
184 
185 
186  switch (ud)
187  {
188  case 0:
189  {
190  // "\bar u O u" insertion in rho
191  // The local non-conserved current contraction
192  local_insert_prop = anti_u_prop*Gamma(gamma_value)*forw_u_prop;
193 
194  if (compute_nonlocal)
195  {
196  // Construct the non-local (possibly conserved) current contraction
197  nonlocal_insert_prop = nonlocalCurrentProp(u, mu, forw_u_prop, anti_u_prop);
198  }
199  }
200  break;
201 
202  case 1:
203  {
204  // "\bar d O d" insertion in rho
205  // The local non-conserved current contraction
206  local_insert_prop = anti_d_prop*Gamma(gamma_value)*forw_d_prop;
207 
208  if (compute_nonlocal)
209  {
210  // Construct the non-local (possibly conserved) current contraction
211  nonlocal_insert_prop = nonlocalCurrentProp(u, mu, forw_d_prop, anti_d_prop);
212  }
213  }
214  break;
215 
216  default:
217  QDP_error_exit("Unknown ud type", ud);
218  }
219 
220 
221  // Loop over "rho->rho"=0 types of form-factors
222  for(int dp = 0; dp < quark.formfac.size(); ++dp)
223  {
224  WallFormFac_formfac_t& formfac = quark.formfac[dp];
225  formfac.formfac_ctr = dp;
226  formfac.formfac_name = formfac_name[dp];
227 
228  LatticeSpinMatrix local_contract, nonlocal_contract;
229 
230 
231  // Loop over Lorentz indices of source and sink hadron operators
232  for(int lorz = 0; lorz < formfac.lorentz.size(); ++lorz)
233  {
234  WallFormFac_lorentz_t& lorentz = formfac.lorentz[lorz];
235  lorentz.lorentz_ctr = lorz;
236 
237  int gamma_value1 = G5;
238  int gamma_value2 = G5;
239 
240  lorentz.snk_gamma = gamma_value1;
241  lorentz.src_gamma = gamma_value2;
242 
243  // Contractions depend on "ud" (u or d quark contribution)
244  // and source/sink operators
245  switch (ud)
246  {
247  case 0:
248  {
249  // "\bar u O u" insertion in rho
250  // The local non-conserved current contraction
251  local_contract =
252  baryonContract(local_insert_prop, u_x2, d_x2) +
253  baryonContract(u_x2, local_insert_prop, d_x2);
254 
255  if (compute_nonlocal)
256  {
257  // Construct the non-local (possibly conserved) current contraction
258  nonlocal_contract =
259  baryonContract(nonlocal_insert_prop, u_x2, d_x2) +
260  baryonContract(u_x2, nonlocal_insert_prop, d_x2);
261  }
262  }
263  break;
264 
265  case 1:
266  {
267  // "\bar d O d" insertion in rho
268  // The local non-conserved current contraction
269  local_contract =
270  baryonContract(u_x2, u_x2, local_insert_prop);
271 
272  if (compute_nonlocal)
273  {
274  // Construct the non-local (possibly conserved) current contraction
275  nonlocal_contract =
276  baryonContract(u_x2, u_x2, nonlocal_insert_prop);
277  }
278  }
279  break;
280 
281  default:
282  QDP_error_exit("Unknown ud type", ud);
283  }
284 
285 
286  // Loop over the spin projectors
287  for (int proj = 0; proj < lorentz.projector.size(); ++proj)
288  {
289  WallFormFac_projector_t& projector = lorentz.projector[proj];
290  projector.proj_ctr = proj;
291  projector.proj_name = proj_name[proj];
292 
293  WallFormFac_insertion_t& insertion = projector.insertion[gamma_ctr];
294 
295  insertion.gamma_ctr = gamma_ctr;
296  insertion.mu = mu;
297  insertion.gamma_value = gamma_value;
298 
299  // The local non-conserved std::vector-current matrix element
300  LatticeComplex corr_local_fn = traceSpin(S_proj[proj] * local_contract);
301 
302  // The nonlocal (possibly conserved) current matrix element
303  LatticeComplex corr_nonlocal_fn = traceSpin(S_proj[proj] * nonlocal_contract);
304 
305  multi1d<WallFormFac_momenta_t>& momenta = insertion.momenta;
306 
307  wallFormFacSft(momenta, corr_local_fn, corr_nonlocal_fn, phases,
308  compute_nonlocal, t0);
309 
310  } // end for(proj)
311  } // end for(dp)
312  } // end for(ud)
313  } // end for(lorz)
314  } // end for(gamma_ctr)
315 
316  END_CODE();
317 }
318 
319 } // end namespace Chroma
320 
321 #endif
322 #endif
323 #endif
324 
Primary include file for CHROMA library code.
int mu
Definition: cool.cc:24
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.
Definition: wallff_w.cc:54
LatticePropagator nonlocalCurrentProp(const multi1d< LatticeColorMatrix > &u, int mu, const LatticePropagator &forw_prop, const LatticePropagator &anti_prop)
Compute nonlocal current propagator.
Definition: wallff_w.cc:28
void wallNuclFormFac(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 nucleon-> gamma+nucleon form-factors.
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
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)
int G5
Definition: pbg5p_w.cc:57
static multi1d< LatticeColorMatrix > u
START_CODE()
Wall-sink nucleon form-factors.