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