CHROMA
simple_baryon_2pt_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Construct baryon sequential sources.
3  */
4 
10 #include "util/ft/sftmom.h"
11 #include "io/xml_group_reader.h"
12 
13 namespace Chroma
14 {
15 
16  // Read parameters
17  void read(XMLReader& xml, const std::string& path, SimpleBaryonSeqSourceEnv::Params& param)
18  {
20  param = tmp;
21  }
22 
23  // Writer
24  void write(XMLWriter& xml, const std::string& path, const SimpleBaryonSeqSourceEnv::Params& param)
25  {
26  param.writeXML(xml, path);
27  }
28 
29 
30  namespace SimpleBaryonSeqSourceEnv
31  {
32  //! The T and Spin struct
33  /*! \ingroup hadron */
34  struct SpinMatTsp_t
35  {
36  GroupXML_t T_xml; /*!< Holds source xml params*/
37  SpinMatrix T;
38 
39  GroupXML_t sp_xml; /*!< Holds source xml params*/
40  SpinMatrix sp;
41  };
42  }
43 
44  namespace GeneralBaryonSeqSourceEnv
45  {
46  //! The T and Spin struct
47  /*! \ingroup hadron */
48  struct SpinMatTsp_t
49  {
50  GroupXML_t T_xml; /*!< Holds source xml params*/
51  SpinMatrix T;
52 
53  GroupXML_t SRC_sp_xml; /*!< Holds source xml params*/
54  SpinMatrix SRC_sp;
55 
56  GroupXML_t SNK_sp_xml; /*!< Holds source xml params*/
57  SpinMatrix SNK_sp;
58  };
59  }
60 
61 
62  //! Read a T and sp struct
63  /*! \ingroup hadron */
64  void read(XMLReader& xml, const std::string& path, SimpleBaryonSeqSourceEnv::SpinMatTsp_t& param)
65  {
66  XMLReader paramtop(xml, path);
67 
68  param.T_xml = readXMLGroup(paramtop, "Projector", "name");
69  param.sp_xml = readXMLGroup(paramtop, "DiquarkSpin", "name");
70 
72  param.T_xml.id, paramtop, param.T_xml.path);
74  param.sp_xml.id, paramtop, param.sp_xml.path);
75  }
76 
77  // Writer
78  void write(XMLWriter& xml, const std::string& path, const SimpleBaryonSeqSourceEnv::SpinMatTsp_t& param)
79  {
80  push(xml, path);
81 
82  xml << param.T_xml.xml;
83  xml << param.sp_xml.xml;
84 
85  pop(xml);
86  }
87 
88 
89  //! Read a T and sp struct
90  /*! \ingroup hadron */
91  void read(XMLReader& xml, const std::string& path, GeneralBaryonSeqSourceEnv::SpinMatTsp_t& param)
92  {
93  XMLReader paramtop(xml, path);
94 
95  param.T_xml = readXMLGroup(paramtop, "Projector", "name");
96  param.SRC_sp_xml = readXMLGroup(paramtop, "SrcDiquarkSpin", "name");
97  param.SRC_sp_xml = readXMLGroup(paramtop, "SnkDiquarkSpin", "name");
98 
99  param.T = BaryonSpinMatrixEnv::TheBarSpinMatFuncMap::Instance().callFunction(param.T_xml.id, paramtop, param.T_xml.path);
100  param.SRC_sp = BaryonSpinMatrixEnv::TheBarSpinMatFuncMap::Instance().callFunction(param.SRC_sp_xml.id, paramtop, param.SRC_sp_xml.path);
101  param.SNK_sp = BaryonSpinMatrixEnv::TheBarSpinMatFuncMap::Instance().callFunction(param.SNK_sp_xml.id, paramtop, param.SNK_sp_xml.path);
102  }
103 
104  // Writer
105  void write(XMLWriter& xml, const std::string& path, const SimpleBaryonSeqSourceEnv::SpinMatTsp_t& param)
106  {
107  push(xml, path);
108 
109  xml << param.T_xml.xml;
110  xml << param.SRC_sp_xml.xml;
111  xml << param.SNK_sp_xml.xml;
112 
113  pop(xml);
114  }
115 
116 
117 
118  // Anonymous namespace
119  /*! \ingroup hadron */
120  namespace
121  {
122  //! Check only 1 prop passed
123  /*! \ingroup hadron */
124  void check1Args(const char* name, const multi1d<LatticePropagator>& quark_propagators)
125  {
126  if (quark_propagators.size() != 1)
127  {
128 // QDPIO::cerr << __func__ << ": expect only 1 prop" << std::endl;
129 // QDP_abort(1);
130 
131  std::ostringstream s;
132  s << name << ": expecting 1 prop, instead passed = " << quark_propagators.size() << std::endl;
133  throw s.str();
134  }
135  }
136 
137  //! Check only 2 props passed
138  /*! \ingroup hadron */
139  void check2Args(const char* name, const multi1d<LatticePropagator>& quark_propagators)
140  {
141  if (quark_propagators.size() != 2)
142  {
143 // QDPIO::cerr << __func__ << ": expect only 2 prop" << std::endl;
144 // QDP_abort(1);
145 
146  std::ostringstream s;
147  s << name << ": expecting 2 props, instead passed = " << quark_propagators.size() << std::endl;
148  throw s.str();
149  }
150  }
151  }
152 
153 
154  //! Baryon sequential sources
155  /*! \ingroup hadron */
156  namespace SimpleBaryonSeqSourceEnv
157  {
158 
159  //! Initialize
161  {
162  j_decay = -1;
163  t_sink = -1;
164  sink_mom.resize(Nd-1);
165  sink_mom = 0;
166  }
167 
168 
169  //! Read parameters
170  Params::Params(XMLReader& xml, const std::string& path)
171  {
172  XMLReader paramtop(xml, path);
173 
174  int version;
175  read(paramtop, "version", version);
176 
177  switch (version)
178  {
179  case 1:
180  break;
181 
182  default:
183  QDPIO::cerr << __func__ << ": parameter version " << version
184  << " unsupported." << std::endl;
185  QDP_abort(1);
186  }
187 
188  read(paramtop, "time_rev", param.time_rev);
189  read(paramtop, "j_decay", j_decay);
190  read(paramtop, "t_sink", t_sink);
191  read(paramtop, "sink_mom", sink_mom);
192  }
193 
194 
195  // Writer
196  void Params::writeXML(XMLWriter& xml, const std::string& path) const
197  {
198  push(xml, path);
199 
200  int version = 1;
201  write(xml, "version", version);
202 
203  write(xml, "time_rev", param.time_rev);
204  write(xml, "j_decay", j_decay);
205  write(xml, "t_sink", t_sink);
206  write(xml, "sink_mom", sink_mom);
207  pop(xml);
208  }
209 
210 
211  // Nucleon-Nucleon 2pt correlator with general projector and Cg5
212  multi1d<Hadron2PtContraction_t> operator()(const multi1d<LatticeColorMatrix>& u);
213  {
214  START_CODE();
215 
216  multi1d<ForwardProp_t>& forward_headers;
217  multi1d<LatticePropagator>& quark_propagators;
218 
219  check2Args("BarNuclTCg5", quark_propagators);
220 
221  LatticePropagator src_prop_tmp;
222  LatticePropagator q1_tmp;
223  LatticePropagator q2_tmp;
224  LatticePropagator di_quark;
225  LatticeColorMatrix col_mat;
226 
227  /* "\bar u O u" insertion in NR proton, ie.
228  * "(u Cg5 d) u" */
229  /* Some generic T */
230 
231  // Use precomputed Cg5
234  di_quark = quarkContract24(q1_tmp, q2_tmp);
235 
236  // First term
237  src_prop_tmp = T * di_quark;
238 
239  // Now the second term
240  src_prop_tmp += traceSpin(di_quark) * T;
241 
242  // The third term...
243  q1_tmp = q2_tmp * Cg5;
244  q2_tmp = quark_propagators[0] * T;
245 
246  src_prop_tmp -= quarkContract13(q1_tmp, q2_tmp) + transposeSpin(quarkContract12(q2_tmp, q1_tmp));
247 
249 
251  }
252 
253 
254  // Compute the 2-pt at the sink
255  Complex
256  BarNuclUTCg5::twoPtSink(const multi1d<LatticeColorMatrix>& u,
257  const multi1d<ForwardProp_t>& forward_headers,
258  const multi1d<LatticePropagator>& quark_propagators,
259  int gamma_insertion)
260  {
261  check2Args("BarNuclUTCg5", quark_propagators);
264 
265  // Constructor the 2pt
266  LatticeComplex b_prop = Baryon2PtContractions::sigma2pt(quark_propagators[0],
267  quark_propagators[1],
268  T, Cg5);
269 
270  // Constructor the 2pt
271  SftMom sft(0, getTSrce(), getSinkMom(), false, getDecayDir());
272  multi2d<DComplex> hsum;
273  hsum = sft.sft(b_prop);
274 
275  // U-quark rescaling factor is 1 for this type of seqsource
276  return Real(2) * hsum[0][getTSink()];
277  }
278 
279 
280  //! Nucleon-Nucleon D piece with general projector and Cg5
281  LatticePropagator
282  BarNuclDTCg5::operator()(const multi1d<LatticeColorMatrix>& u,
283  const multi1d<ForwardProp_t>& forward_headers,
284  const multi1d<LatticePropagator>& quark_propagators)
285  {
286  START_CODE();
287 
288  check1Args("BarNuclDTCg5", quark_propagators);
289 
290  LatticePropagator src_prop_tmp;
291  LatticePropagator q1_tmp;
292  LatticePropagator q2_tmp;
293 
294  /* "\bar d O d" insertion in NR proton, ie.
295  * "(u Cg5 d) u" */
296  /* Some generic T */
297 
298  // First term
300  q1_tmp = T * q2_tmp;
301 
303  src_prop_tmp = -quarkContract14(q1_tmp, q2_tmp);
304 
305  // Second term
306  q1_tmp = q2_tmp * Cg5;
307  q2_tmp = quark_propagators[0] * T;
308 
309  src_prop_tmp -= transposeSpin(quarkContract12(q2_tmp, q1_tmp));
310 
311  END_CODE();
312 
315  }
316 
317  // Compute the 2-pt at the sink
318  Complex
319  BarNuclDTCg5::twoPtSink(const multi1d<LatticeColorMatrix>& u,
320  const multi1d<ForwardProp_t>& forward_headers,
321  const multi1d<LatticePropagator>& quark_propagators,
322  int gamma_insertion)
323  {
324  check2Args("BarNuclDTCg5", quark_propagators);
327 
328  // Constructor the 2pt
329  LatticeComplex b_prop = Baryon2PtContractions::sigma2pt(quark_propagators[0],
330  quark_propagators[1],
331  T, Cg5);
332 
333  // Extract the sink at the appropriate momenta
334  SftMom sft(0, getTSrce(), getSinkMom(), false, getDecayDir());
335  multi2d<DComplex> hsum;
336  hsum = sft.sft(b_prop);
337 
338  // D-quark rescaling factor is 1 for this type of seqsource
339  return Real(1) * hsum[0][getTSink()];
340  }
341 
342 
343 
344  //! Delta+ - Delta+ U piece with general projector and spin matrix
345  LatticePropagator
346  BarDeltaUTsp::operator()(const multi1d<LatticeColorMatrix>& u,
347  const multi1d<ForwardProp_t>& forward_headers,
348  const multi1d<LatticePropagator>& quark_propagators)
349  {
350  START_CODE();
351 
352  check2Args("BarDeltaUTsp", quark_propagators);
353 
354  LatticePropagator src_prop_tmp;
355  LatticePropagator q1_tmp;
356  LatticePropagator q2_tmp;
357  LatticePropagator di_quark;
358  LatticeColorMatrix col_mat;
359 
360  /* "\bar u O u" insertion in Delta^+,
361  ie. "2*(u sp d) u + (u sp u) d" */
362  // generic T
363 
364  q1_tmp = quark_propagators[0] * sp;
365  q2_tmp = sp * quark_propagators[1];
366  di_quark = quarkContract24(q1_tmp, q2_tmp);
367  src_prop_tmp = T * di_quark;
368 
369  src_prop_tmp += traceSpin(di_quark) * T;
370 
371  q1_tmp = q2_tmp * sp;
372  q2_tmp = quark_propagators[0] * T;
373  src_prop_tmp += quarkContract13(q1_tmp, q2_tmp) + transposeSpin(quarkContract12(q2_tmp, q1_tmp));
374 
375  q1_tmp = sp * quark_propagators[0];
376  q2_tmp = q1_tmp * sp;
377  q1_tmp = T * quark_propagators[1];
378  src_prop_tmp += transposeSpin(quarkContract12(q1_tmp, q2_tmp)) + quarkContract24(q1_tmp, q2_tmp);
379 
380  q2_tmp = q1_tmp * sp;
381  q1_tmp = sp * quark_propagators[0];
382  src_prop_tmp += quarkContract14(q2_tmp, q1_tmp);
383 
384  q1_tmp = sp * quark_propagators[1];
385  q2_tmp = q1_tmp * T;
386  q1_tmp = quark_propagators[0] * sp;
387  src_prop_tmp += quarkContract14(q1_tmp, q2_tmp) + quarkContract13(q1_tmp, q2_tmp);
388  src_prop_tmp *= 2;
389 
390  END_CODE();
391 
394  }
395 
396 
397  // Compute the 2-pt at the sink
398  Complex
399  BarDeltaUTsp::twoPtSink(const multi1d<LatticeColorMatrix>& u,
400  const multi1d<ForwardProp_t>& forward_headers,
401  const multi1d<LatticePropagator>& quark_propagators,
402  int gamma_insertion)
403  {
404  check2Args("BarDeltaUTsp", quark_propagators);
407 
408  // Constructor the 2pt
409  LatticeComplex b_prop = Baryon2PtContractions::sigmast2pt(quark_propagators[0],
410  quark_propagators[1],
411  T, sp);
412 
413  // Extract the sink at the appropriate momenta
414  SftMom sft(0, getTSrce(), getSinkMom(), false, getDecayDir());
415  multi2d<DComplex> hsum;
416  hsum = sft.sft(b_prop);
417 
418  // U-quark rescaling factor is 1 for this type of seqsource
419  return Real(2) * hsum[0][getTSink()];
420  }
421 
422 
423 
424  //! Delta+ - Delta+ D piece with general projector and spin matrix
425  LatticePropagator
426  BarDeltaDTsp::operator()(const multi1d<LatticeColorMatrix>& u,
427  const multi1d<ForwardProp_t>& forward_headers,
428  const multi1d<LatticePropagator>& quark_propagators)
429  {
430  START_CODE();
431 
432  check1Args("BarDeltaDTsp", quark_propagators);
433 
434  LatticePropagator src_prop_tmp;
435  LatticePropagator q1_tmp;
436  LatticePropagator q2_tmp;
437  LatticePropagator di_quark;
438 
439  /* "\bar d O d" insertion in Delta^+,
440  ie. "2*(u sp d) u + (u sp u) d" */
441  // generic T
442 
443  q2_tmp = quark_propagators[0] * sp;
444  q1_tmp = T * q2_tmp;
445  q2_tmp = sp * quark_propagators[0];
446  src_prop_tmp = quarkContract14(q1_tmp, q2_tmp);
447 
448  q1_tmp = q2_tmp * sp;
449  q2_tmp = quark_propagators[0] * T;
450  src_prop_tmp += transposeSpin(quarkContract12(q2_tmp, q1_tmp));
451 
452  q1_tmp = quark_propagators[0] * sp;
453  q2_tmp = sp * quark_propagators[0];
454  src_prop_tmp += T * quarkContract24(q1_tmp, q2_tmp);
455 
456  di_quark = quarkContract13(q1_tmp, q2_tmp);
457  src_prop_tmp += di_quark * T;
458  src_prop_tmp *= 2;
459 
460  src_prop_tmp += traceSpin(di_quark) * T;
461 
462  END_CODE();
463 
466  }
467 
468  // Compute the 2-pt at the sink
469  Complex
470  BarDeltaDTsp::twoPtSink(const multi1d<LatticeColorMatrix>& u,
471  const multi1d<ForwardProp_t>& forward_headers,
472  const multi1d<LatticePropagator>& quark_propagators,
473  int gamma_insertion)
474  {
475  check2Args("BarDeltaDTsp", quark_propagators);
478 
479  // Constructor the 2pt
480  LatticeComplex b_prop = Baryon2PtContractions::sigmast2pt(quark_propagators[0],
481  quark_propagators[1],
482  T, sp);
483 
484  // Extract the sink at the appropriate momenta
485  SftMom sft(0, getTSrce(), getSinkMom(), false, getDecayDir());
486  multi2d<DComplex> hsum;
487  hsum = sft.sft(b_prop);
488 
489  // D-quark rescaling factor is 1 for this type of seqsource
490  return Real(1) * hsum[0][getTSink()];
491  }
492 
493 
494 
495  //! Anonymous namespace
496  namespace
497  {
498 
499  //-------------------- callback functions ---------------------------------------
500 
501  //! "\bar u O u" insertion in nucleon-nucleon */
502  /*!
503  * \ingroup hadron
504  *
505  * This is a generic version
506  */
507  HadronSeqSource<LatticePropagator>* barNuclNuclU(XMLReader& xml_in,
508  const std::string& path)
509  {
510  // Determine the spin matrices
511  SpinMatTsp_t spin;
512  read(xml_in, path, spin);
513 
514  return new BarNuclUTCg5(Params(xml_in, path), spin.T, spin.sp);
515  }
516 
517 
518  //! "\bar d O d" insertion in nucleon-nucleon */
519  /*!
520  * \ingroup hadron
521  *
522  * This is a generic version
523  */
524  HadronSeqSource<LatticePropagator>* barNuclNuclD(XMLReader& xml_in,
525  const std::string& path)
526  {
527  // Determine the spin matrices
528  SpinMatTsp_t spin;
529  read(xml_in, path, spin);
530 
531  return new BarNuclDTCg5(Params(xml_in, path), spin.T, spin.sp);
532  }
533 
534 
535  //! "\bar u O u" insertion in proton, ie. "(u C gamma_5 d) u" */
536  /*!
537  * \ingroup hadron
538  *
539  * C gamma_5 = Gamma(5) = - (C gamma_5)^T
540  * T = (1 + gamma_4) / 2 = (1 + Gamma(8)) / 2
541  */
542  HadronSeqSource<LatticePropagator>* barNuclUUnpol(XMLReader& xml_in,
543  const std::string& path)
544  {
545  return new BarNuclUTCg5(Params(xml_in, path), BaryonSpinMats::Tunpol(), BaryonSpinMats::Cg5());
546  }
547 
548 
549  //! "\bar d O d" insertion in proton, ie. "(u C gamma_5 d) u"
550  /*!
551  * \ingroup hadron
552  *
553  * C gamma_5 = Gamma(5) = - (C gamma_5)^T
554  * T = (1 + gamma_4) / 2 = (1 + Gamma(8)) / 2
555  */
556  HadronSeqSource<LatticePropagator>* barNuclDUnpol(XMLReader& xml_in,
557  const std::string& path)
558  {
559  return new BarNuclDTCg5(Params(xml_in, path), BaryonSpinMats::Tunpol(), BaryonSpinMats::Cg5());
560  }
561 
562 
563  //! "\bar u O u" insertion in proton, ie. "(u C gamma_5 (1/2)(1 + gamma_4) d) u"
564  /*!
565  * \ingroup hadron
566  *
567  * C g_5 = C gamma_5
568  * T = \Sigma_3 (1 + gamma_4) / 2 = -i (Gamma(3) + Gamma(11)) / 2
569  */
570  HadronSeqSource<LatticePropagator>* barNuclUPol(XMLReader& xml_in,
571  const std::string& path)
572  {
573  return new BarNuclUTCg5(Params(xml_in, path), BaryonSpinMats::Tpol(), BaryonSpinMats::Cg5());
574  }
575 
576 
577  //! "\bar u O u" insertion in proton, ie. "(u C gamma_5 (1/2)(1 + gamma_4) d) u"
578  /*!
579  * \ingroup hadron
580  *
581  * C g_5 = C gamma_5
582  * T = \Sigma_3 (1 + gamma_4) / 2 = -i (Gamma(3) + Gamma(11)) / 2
583  */
584  HadronSeqSource<LatticePropagator>* barNuclDPol(XMLReader& xml_in,
585  const std::string& path)
586  {
587  return new BarNuclDTCg5(Params(xml_in, path), BaryonSpinMats::Tpol(), BaryonSpinMats::Cg5());
588  }
589 
590  //! "\bar u O u" insertion in NR proton, ie. "(u C gamma_5 (1/2)(1 + gamma_4) d) u"
591  /*!
592  * \ingroup hadron
593  *
594  * C g_5 NR = (1/2)*C gamma_5 * ( 1 + g_4 )
595  * T = (1 + gamma_4) / 2 = (1 + Gamma(8)) / 2
596  */
597  HadronSeqSource<LatticePropagator>* barNuclUUnpolNR(XMLReader& xml_in,
598  const std::string& path)
599  {
600  return new BarNuclUTCg5(Params(xml_in, path), BaryonSpinMats::Tunpol(), BaryonSpinMats::Cg5NR());
601  }
602 
603 
604  //! "\bar d O d" insertion in NR proton, ie. "(u C gamma_5 (1/2)(1 + gamma_4) d) u"
605  /*!
606  * \ingroup hadron
607  *
608  * C g_5 NR = (1/2)*C gamma_5 * ( 1 + g_4 )
609  * T = (1 + gamma_4) / 2 = (1 + Gamma(8)) / 2
610  */
611  HadronSeqSource<LatticePropagator>* barNuclDUnpolNR(XMLReader& xml_in,
612  const std::string& path)
613  {
614  return new BarNuclDTCg5(Params(xml_in, path), BaryonSpinMats::Tunpol(), BaryonSpinMats::Cg5NR());
615  }
616 
617 
618  //! "\bar u O u" insertion in NR proton, ie. "(u C gamma_5 (1/2)(1 + gamma_4) d) u"
619  /*!
620  * \ingroup hadron
621  *
622  * C g_5 NR = (1/2)*C gamma_5 * ( 1 + g_4 )
623  * T = \Sigma_3 (1 + gamma_4) / 2 = -i (Gamma(3) + Gamma(11)) / 2
624  */
625  HadronSeqSource<LatticePropagator>* barNuclUPolNR(XMLReader& xml_in,
626  const std::string& path)
627  {
628  return new BarNuclUTCg5(Params(xml_in, path), BaryonSpinMats::Tpol(), BaryonSpinMats::Cg5NR());
629  }
630 
631 
632  //! "\bar d O d" insertion in NR proton, ie. "(u C gamma_5 (1/2)(1 + gamma_4) d) u"
633  /*!
634  * \ingroup hadron
635  *
636  * C g_5 NR = (1/2)*C gamma_5 * ( 1 + g_4 )
637  * T = \Sigma_3 (1 + gamma_4) / 2 = -i (Gamma(3) + Gamma(11)) / 2
638  */
639  HadronSeqSource<LatticePropagator>* barNuclDPolNR(XMLReader& xml_in,
640  const std::string& path)
641  {
642  return new BarNuclDTCg5(Params(xml_in, path), BaryonSpinMats::Tpol(), BaryonSpinMats::Cg5NR());
643  }
644 
645 
646  //! \bar u O u" insertion in NR proton, ie. "(u C gamma_5 (1/2)(1 + gamma_4) d) u"
647  /*!
648  * \ingroup hadron
649  *
650  * \f$C g_5 NR = (1/2)*C gamma_5 * ( 1 + g_4 )\f$
651  *
652  * \f$T = (1 + \Sigma_3)*(1 + gamma_4) / 2
653  * = (1 + Gamma(8) - i G(3) - i G(11)) / 2\f$
654  */
655  HadronSeqSource<LatticePropagator>* barNuclUMixedNR(XMLReader& xml_in,
656  const std::string& path)
657  {
658  return new BarNuclUTCg5(Params(xml_in, path), BaryonSpinMats::Tmixed(), BaryonSpinMats::Cg5NR());
659  }
660 
661 
662  //! "\bar d O d" insertion in NR proton, ie. "(u C gamma_5 (1/2)(1 + gamma_4) d) u"
663  /*!
664  * \ingroup hadron
665  *
666  * C g_5 NR = (1/2)*C gamma_5 * ( 1 + g_4 )
667  *
668  * T = (1 + \Sigma_3)*(1 + gamma_4) / 2
669  * = (1 + Gamma(8) - i G(3) - i G(11)) / 2
670  */
671  HadronSeqSource<LatticePropagator>* barNuclDMixedNR(XMLReader& xml_in,
672  const std::string& path)
673  {
674  return new BarNuclDTCg5(Params(xml_in, path), BaryonSpinMats::Tmixed(), BaryonSpinMats::Cg5NR());
675  }
676 
677  //! \bar u O u" insertion in NR proton
678  /*!
679  * \ingroup hadron
680  *
681  * "\bar u O u" insertion in NR proton, ie.
682  * "(u C gamma_5 (1/2)(1 - gamma_4) d) u"
683  *
684  * \f$C g_5 NR = (1/2)*C gamma_5 * ( 1 - g_4 )\f$
685  *
686  * $T = (1 + \Sigma_3)*(1 + gamma_4) / 2
687  * = (1 + Gamma(8) - i G(3) - i G(11)) / 2$
688  */
689  HadronSeqSource<LatticePropagator>* barNuclUMixedNRnegPar(XMLReader& xml_in,
690  const std::string& path)
691  {
692  return new BarNuclUTCg5(Params(xml_in, path),
694  }
695 
696  //! "\bar d O d" insertion in NR proton, ie. "(u C gamma_5 (1/2)(1 - gamma_4) d) u"
697  /*!
698  * \ingroup hadron
699  *
700  * C g_5 NR = (1/2)*C gamma_5 * ( 1 - g_4 )
701  *
702  * T = (1 + \Sigma_3)*(1 - gamma_4) / 2
703  * = (1 - Gamma(8) + i G(3) - i G(11)) / 2
704  */
705  HadronSeqSource<LatticePropagator>* barNuclDMixedNRnegPar(XMLReader& xml_in,
706  const std::string& path)
707  {
708  return new BarNuclDTCg5(Params(xml_in, path),
710  }
711 
712 
713  /** The octet baryon sequantial sources **/
714  //! \bar d O d" insertion in NR proton
715  /*!
716  * \ingroup hadron
717  *
718  * "\bar d O d" insertion in NR proton, ie.
719  * "(s C gamma_5 (1/2)(1 + gamma_4) d) s"
720  *
721  * $C g_5 NR = (1/2)*C gamma_5 * ( 1 + g_4 )$
722  *
723  * $T = (1 + \Sigma_3)*(1 + gamma_4) / 2
724  * = (1 + Gamma(8) - i G(3) - i G(11)) / 2$
725 
726  * The d-quark insertion for a Xi baryon: primarily for the
727  * Xi- to Xi0 transision
728 
729  * The Xi is just like the proton with up quark replaced with the strange
730  * the single quark propagator passed in is just the strange quark propagator
731  */
732  HadronSeqSource<LatticePropagator>* barXiDMixedNR(XMLReader& xml_in,
733  const std::string& path)
734  {
735  return new BarNuclDTCg5(Params(xml_in, path), BaryonSpinMats::Tmixed(), BaryonSpinMats::Cg5NR());
736  }
737 
738 
739 
740  //! "\bar u O u" insertion in delta-delta */
741  /*!
742  * \ingroup hadron
743  *
744  * This is a generic version
745  */
746  HadronSeqSource<LatticePropagator>* barDeltaDeltaU(XMLReader& xml_in,
747  const std::string& path)
748  {
749  // Determine the spin matrices
750  SpinMatTsp_t spin;
751  read(xml_in, path, spin);
752 
753  return new BarDeltaUTsp(Params(xml_in, path), spin.T, spin.sp);
754  }
755 
756 
757  //! "\bar d O d" insertion in delta-delta */
758  /*!
759  * \ingroup hadron
760  *
761  * This is a generic version
762  */
763  HadronSeqSource<LatticePropagator>* barDeltaDeltaD(XMLReader& xml_in,
764  const std::string& path)
765  {
766  // Determine the spin matrices
767  SpinMatTsp_t spin;
768  read(xml_in, path, spin);
769 
770  return new BarDeltaDTsp(Params(xml_in, path), spin.T, spin.sp);
771  }
772 
773 
774  //! "\bar u O u" insertion in Delta^+ "2*(u sp d) u + (u sp u) d" */
775  /*!
776  * \ingroup hadron
777  *
778  * C gamma_- = sp = (C gamma_-)^T
779  * T = (1 + gamma_4) / 2 = (1 + Gamma(8)) / 2
780  *
781  * Agghh, we have a goofy factor of 2 normalization factor here. The
782  * ancient szin way didn't care about norms, so it happily made it
783  * 2 times too big. There is a missing 0.5 in T_unpol guy.
784  * Since nobody has used this code before, we are switching to a more
785  * sane convention and breaking agreement with the old szin code.
786  */
787  HadronSeqSource<LatticePropagator>* barDeltaUUnpol(XMLReader& xml_in,
788  const std::string& path)
789  {
790  return new BarDeltaUTsp(Params(xml_in, path), BaryonSpinMats::Tunpol(), BaryonSpinMats::Cgm());
791  }
792 
793 
794  //! "\bar d O d" insertion in Delta^+ "2*(u sp d) u + (u sp u) d" */
795  /*!
796  * \ingroup hadron
797  *
798  * C gamma_- = sp = (C gamma_-)^T
799  * T = (1 + gamma_4) / 2 = (1 + Gamma(8)) / 2
800  *
801  *
802  * Agghh, we have a goofy factor of 2 normalization factor here. The
803  * ancient szin way didn't care about norms, so it happily made it
804  * 2 times too big. There is a missing 0.5 in T_unpol guy.
805  * Since nobody has used this code before, we are switching to a more
806  * sane convention and breaking agreement with the old szin code.
807  */
808  HadronSeqSource<LatticePropagator>* barDeltaDUnpol(XMLReader& xml_in,
809  const std::string& path)
810  {
811  return new BarDeltaDTsp(Params(xml_in, path), BaryonSpinMats::Tunpol(), BaryonSpinMats::Cgm());
812  }
813 
814 
815  //! Local registration flag
816  bool registered = false;
817 
818  } // end anonymous namespace
819 
820 
821  //! Register all the factories
822  bool registerAll()
823  {
824  bool success = true;
825  if (! registered)
826  {
827  //! Register needed stuff
829 
830  //! Register all the factories
831  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL-NUCL_U"),
832  barNuclNuclU);
833 
834  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL-NUCL_D"),
835  barNuclNuclD);
836 
837  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_U_UNPOL"),
838  barNuclUUnpol);
839 
840  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_D_UNPOL"),
841  barNuclDUnpol);
842 
843  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_U_POL"),
844  barNuclUPol);
845 
846  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_D_POL"),
847  barNuclDPol);
848 
849  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_U_UNPOL_NONREL"),
850  barNuclUUnpolNR);
851 
852  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_D_UNPOL_NONREL"),
853  barNuclDUnpolNR);
854 
855  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_U_POL_NONREL"),
856  barNuclUPolNR);
857 
858  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_D_POL_NONREL"),
859  barNuclDPolNR);
860 
861  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_U_MIXED_NONREL"),
862  barNuclUMixedNR);
863 
864  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_D_MIXED_NONREL"),
865  barNuclDMixedNR);
866 
867  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_U_MIXED_NONREL_NEGPAR"),
868  barNuclUMixedNRnegPar);
869 
870  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("NUCL_D_MIXED_NONREL_NEGPAR"),
871  barNuclDMixedNRnegPar);
872 
873  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("XI_D_MIXED_NONREL"),
874  barXiDMixedNR);
875 
876 
877  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("DELTA-DELTA_U"),
878  barDeltaDeltaU);
879 
880  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("DELTA-DELTA_D"),
881  barDeltaDeltaD);
882 
883  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("DELTA_U_UNPOL"),
884  barDeltaUUnpol);
885 
886  success &= Chroma::TheWilsonHadronSeqSourceFactory::Instance().registerObject(std::string("DELTA_D_UNPOL"),
887  barDeltaDUnpol);
888 
889  registered = true;
890  }
891  return success;
892  }
893 
894  } // namespace BaryonSeqSourceCallMapEnv
895 
896 
897 } // end namespace Chroma
Heavy-light baryon 2-pt functions.
Baryon spin and projector matrices.
Factory for producing baryon spin matrix contraction objects.
virtual LatticePropagator projectBaryon(const LatticePropagator &src_prop_tmp, const multi1d< ForwardProp_t > &forward_headers)
Combine projection with time-ordering.
virtual void setBC(const multi1d< ForwardProp_t > &forward_headers)
Convenience function to yank the boundary condition from the forward prop headers.
Definition: baryon_2pt_w.cc:50
virtual void setTSrce(const multi1d< ForwardProp_t > &forward_headers)
Convenience function to yank the source location from the forward prop headers.
Fourier transform phase factor support.
Definition: sftmom.h:35
multi2d< DComplex > sft(const LatticeComplex &cf) const
Do a sumMulti(cf*phases,getSet())
Definition: sftmom.cc:524
const multi1d< int > & getSinkMom() const
Get sink_mom.
Complex twoPtSink(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props, int gamma_insertion)
Compute the 2-pt at the sink.
LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)
Construct the source.
const multi1d< int > & getSinkMom() const
Get sink_mom.
LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)
Construct the source.
Complex twoPtSink(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props, int gamma_insertion)
Compute the 2-pt at the sink.
const multi1d< int > & getSinkMom() const
Get sink_mom.
LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)
Construct the source.
Complex twoPtSink(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props, int gamma_insertion)
Compute the 2-pt at the sink.
Nucleon-Nucleon U piece with general projector and Cg5.
const multi1d< int > & getSinkMom() const
Get sink_mom.
Complex twoPtSink(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props, int gamma_insertion)
Compute the 2-pt at the sink.
static T & Instance()
Definition: singleton.h:432
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
LatticeComplex sigma2pt(const LatticePropagator &quark_propagator_1, const LatticePropagator &quark_propagator_2, const SpinMatrix &T, const SpinMatrix &sp)
Sigma 2-pt.
Definition: barhqlq_w.cc:18
LatticeComplex sigmast2pt(const LatticePropagator &quark_propagator_1, const LatticePropagator &quark_propagator_2, const SpinMatrix &T, const SpinMatrix &sp)
Delta 2-pt.
Definition: barhqlq_w.cc:89
GroupXML_t readXMLGroup(XMLReader &xml_in, const std::string &path, const std::string &type_name)
Read group and return as a std::string.
Nd
Definition: meslate.cc:74
static bool registered
Local registration flag.
const std::string name
Name to be used.
bool registerAll()
Register all the factories.
SpinMatrix Tmixed()
T = (1 + \Sigma_3)*(1 + gamma_4) / 2 = (1 + Gamma(8) - i G(3) - i G(11)) / 2.
SpinMatrix Tunpol()
T = (1 + gamma_4) / 2 = (1 + Gamma(8)) / 2.
SpinMatrix Cg5NRnegPar()
C g_5 NR = (1/2)*C gamma_5 * ( 1 - g_4 )
SpinMatrix Cgm()
C gamma_- = Cgm = (C gamma_-)^T.
SpinMatrix TmixedNegPar()
T = (1 - \Sigma_3)*(1 - gamma_4) / 2 = (1 - Gamma(8) + i G(3) - i G(11)) / 2.
SpinMatrix Cg5()
C g_5 = C gamma_5 = Gamma(5)
SpinMatrix Cg5NR()
C g_5 NR = (1/2)*C gamma_5 * ( 1 + g_4 )
SpinMatrix Tpol()
T = \Sigma_3 (1 + gamma_4) / 2 = -i (Gamma(3) + Gamma(11)) / 2.
check2Args("BarNuclTCg5", quark_propagators)
return projectBaryon(src_prop_tmp, forward_headers)
bool registerAll()
Register all the factories.
multi1d< ForwardProp_t > & forward_headers
multi1d< LatticePropagator > & quark_propagators
multi1d< Hadron2PtContraction_t > operator()(const multi1d< LatticeColorMatrix > &u)
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
LatticeFermion tmp
Definition: mespbg5p_w.cc:36
push(xml_out,"Condensates")
LinOpSysSolverMGProtoClover::T T
pop(xml_out)
START_CODE()
multi1d< LatticeFermion > s(Ncb)
::std::string string
Definition: gtest.h:1979
Factory for producing quark prop sinks.
Fourier transform phase factor support.
Construct baryon sequential sources.
Hold group xml and type id.
Simple baryon sequential source parameters.
void writeXML(XMLWriter &in, const std::string &path) const
Read an XML group as a std::string.