CHROMA
Ql_3pt_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Heavy-Light 3pt function
3  */
4 
5 #include "Ql_3pt_w.h"
6 #include "barQll_w.h"
7 
8 namespace Chroma {
9 
10 //! Heavy-light meson 2-pt function
11 /*!
12  * \ingroup hadron
13  *
14  * This routine is specific to Wilson fermions!
15  *
16  * The heavy quark is inserted in the infinitely heavy quark limit
17  * by a Wilson-Line without spin indices.
18  * We are effectively propagating a spin-1/2 light quark
19  * This generates with two quark propagators all three-point
20  * functions, with all 16 gamma matrix insertions, of the form:
21  *
22  * Mat1 = Sc(z-y) [Gamma] Su(y-z) gamma5
23  * Mat2 = Sb(x-z) gamma5 Ss(z-x) [Gamma]
24  *
25  * And we output the 16 gamma's, all possible trace combinations (1 or 2 color traces and 1 or
26  * 2 spin traces
27  *
28  * \param u gauge field (Read)
29  * \param quark_propagator1 quark propagator1 ( Read )
30  * \param quark_propagator2 quark propagator2 ( Read )
31  * \param heavy_quark_propagator1 heavy quark propagator1 ( Read; Opt, if not static )
32  * \param heavy_quark_propagator2 heavy quark propagator2 ( Read; Opt, if not static )
33  * \param src_coord cartesian coordinates of the source ( Read )
34  * \param snk_coord cartesian coordinates of the sink ( Read )
35  * \param heavy_src cartesian coordinates of the heavy quark if not static ( Read )
36  * Not needed if both are static or both are not static.
37  * \param phases object holds list of momenta and Fourier phases ( Read )
38  * \param xml xml file object ( Read )
39  * \param xml_group group name for xml data ( Read )
40  *
41  * \param bc if there, the bc's for the static quark props...
42  */
43 
44 void QlQl(const multi1d<LatticeColorMatrix>& u,
45  const LatticePropagator& quark_propagator1,
46  const LatticePropagator& quark_propagator2,
47  const multi1d<int>& src_coord,
48  const multi1d<int>& snk_coord,
49  const int& bc,
50  const SftMom& phases,
51  XMLWriter& xml,
52  const std::string& xml_group)
53 {
54  START_CODE();
55 
56  if ( Ns != 4 ) /* Code is specific to Ns=4 */
57  return;
58 
59  int length = phases.numSubsets() ;
60  int num_mom = phases.numMom();
61 
62  LatticeColorMatrix Qprop1; // b quark
63  LatticeColorMatrix Qprop2; // c quark
64 
65  HeavyQuarkProp(Qprop1,u,src_coord,length,bc);
66  HeavyQuarkPropBack(Qprop2,u,snk_coord,length,bc);
67 
68  // S_proj_unpol = (1/2)(1 + gamma_4)
69  // This is the heavy quark dirac structure, but I am using the notation
70  // that is currently used in Chroma!!!!!!!!
71 
72  SpinMatrix g_one = 1.0;
73  SpinMatrix S_proj_unpol = 0.5 * (g_one + (g_one * Gamma(8)));
74  multi1d<DComplex> Hq;
75 
76  for(int gind=0; gind<16;++gind){// Loop over gamma matrices...
77  LatticePropagator Mat1 , Mat2;
78  LatticeComplex Hq_prop11 , Hq_prop12, Hq_prop21, Hq_prop22 ;
79 
80  Mat1 = quark_propagator1 * adj(Qprop1*S_proj_unpol) * Gamma(15) * Gamma(gind) ;
81  Mat2 = Qprop2*S_proj_unpol * adj(quark_propagator2) * Gamma(15) * Gamma(gind);
82  //First is number of spin traces , second is number of color traces
83  Hq_prop11 = trace(Mat1*Mat2);
84  Hq_prop12 = traceSpin(traceColor(Mat1)*traceColor(Mat2));
85  Hq_prop21 = traceColor(traceSpin(Mat1)*traceSpin(Mat2));
86  Hq_prop22 = trace(Mat1)*trace(Mat2);
87 
88  // Project onto zero momentum
89  multi2d<DComplex> hsumHq11, hsumHq12 , hsumHq21, hsumHq22 ;
90  hsumHq11 = phases.sft(Hq_prop11);
91  hsumHq12 = phases.sft(Hq_prop12);
92  hsumHq21 = phases.sft(Hq_prop21);
93  hsumHq22 = phases.sft(Hq_prop22);
94  multi2d<DComplex> HQprop11(num_mom,length) ;
95  multi2d<DComplex> HQprop12(num_mom,length) ;
96  multi2d<DComplex> HQprop21(num_mom,length) ;
97  multi2d<DComplex> HQprop22(num_mom,length) ;
98 
99  for(int sink_mom_num=0; sink_mom_num < num_mom; ++sink_mom_num)
100  for(int t = 0; t < length; ++t)
101  {
102  int t_eff = (t - src_coord[Nd-1] + length) % length;
103  HQprop11[sink_mom_num][t_eff] = hsumHq11[sink_mom_num][t];
104  HQprop12[sink_mom_num][t_eff] = hsumHq12[sink_mom_num][t];
105  HQprop21[sink_mom_num][t_eff] = hsumHq21[sink_mom_num][t];
106  HQprop22[sink_mom_num][t_eff] = hsumHq22[sink_mom_num][t];
107  }
108 
109  //XMLWriter xml_bar(xml);
110  push(xml, xml_group);
111  write(xml, "gamma_value", gind);
112  write(xml, "ThreePoint1Spin1ColorTrace", HQprop11[0]);
113  write(xml, "ThreePoint1Spin2ColorTrace", HQprop12[0]);
114  write(xml, "ThreePoint2Spin1ColorTrace", HQprop21[0]);
115  write(xml, "ThreePoint2Spin2ColorTrace", HQprop22[0]);
116 
117  pop(xml);
118 
119  END_CODE();
120  }// gind loop
121 }// QlQl routine
122 
123 
124 void QlQl(const multi1d<LatticeColorMatrix>& u,
125  const LatticePropagator& quark_propagator1,
126  const LatticePropagator& quark_propagator2,
127  const LatticePropagator& heavy_quark_propagator,
128  const multi1d<int>& src_coord,
129  const multi1d<int>& snk_coord,
130  const multi1d<int>& heavy_src,
131  const int& bc,
132  const SftMom& phases,
133  XMLWriter& xml,
134  const std::string& xml_group)
135 {
136  START_CODE();
137 
138  if ( Ns != 4 ) /* Code is specific to Ns=4 */
139  return;
140 
141  int length = phases.numSubsets() ;
142  int num_mom = phases.numMom();
143 
144  LatticeColorMatrix Qprop; // b quark
145 
146  if (heavy_src==src_coord)
147  HeavyQuarkProp(Qprop,u,snk_coord,length,bc);
148  else
149  HeavyQuarkProp(Qprop,u,src_coord,length,bc);
150 
151  // S_proj_unpol = (1/2)(1 + gamma_4)
152  // This is the heavy quark dirac structure, but I am using the notation
153  // that is currently used in Chroma!!!!!!!!
154 
155  SpinMatrix g_one = 1.0;
156  SpinMatrix S_proj_unpol = 0.5 * (g_one + (g_one * Gamma(8)));
157  multi1d<DComplex> Hq;
158 
159  for(int gind=0; gind<16;++gind){// Loop over gamma matrices...
160  LatticePropagator Mat1 , Mat2;
161  LatticeComplex Hq_prop11 , Hq_prop12, Hq_prop21, Hq_prop22 ;
162 
163  if (heavy_src==src_coord){
164  Mat1 = quark_propagator1 * adj(heavy_quark_propagator) * Gamma(15) * Gamma(gind) ;
165  Mat2 = Qprop*S_proj_unpol * adj(quark_propagator2) * Gamma(15) * Gamma(gind);
166  }
167  else{
168  Mat1 = quark_propagator1 * adj(Qprop*S_proj_unpol) * Gamma(15) * Gamma(gind) ;
169  Mat2 = heavy_quark_propagator * adj(quark_propagator2) * Gamma(15) * Gamma(gind);
170  }
171 
172  Hq_prop11 = trace(Mat1*Mat2);
173  Hq_prop12 = traceSpin(traceColor(Mat1)*traceColor(Mat2));
174  Hq_prop21 = traceColor(traceSpin(Mat1)*traceSpin(Mat2));
175  Hq_prop22 = trace(Mat1)*trace(Mat2);
176 
177  // Project onto zero momentum
178  multi2d<DComplex> hsumHq11, hsumHq12 , hsumHq21, hsumHq22 ;
179  hsumHq11 = phases.sft(Hq_prop11);
180  hsumHq12 = phases.sft(Hq_prop12);
181  hsumHq21 = phases.sft(Hq_prop21);
182  hsumHq22 = phases.sft(Hq_prop22);
183  multi2d<DComplex> HQprop11(num_mom,length) ;
184  multi2d<DComplex> HQprop12(num_mom,length) ;
185  multi2d<DComplex> HQprop21(num_mom,length) ;
186  multi2d<DComplex> HQprop22(num_mom,length) ;
187 
188  for(int sink_mom_num=0; sink_mom_num < num_mom; ++sink_mom_num)
189  for(int t = 0; t < length; ++t)
190  {
191  int t_eff = (t - src_coord[Nd-1] + length) % length;
192  HQprop11[sink_mom_num][t_eff] = hsumHq11[sink_mom_num][t];
193  HQprop12[sink_mom_num][t_eff] = hsumHq12[sink_mom_num][t];
194  HQprop21[sink_mom_num][t_eff] = hsumHq21[sink_mom_num][t];
195  HQprop22[sink_mom_num][t_eff] = hsumHq22[sink_mom_num][t];
196  }
197 
198  //XMLWriter xml_bar(xml);
199  push(xml, xml_group);
200  write(xml, "gamma_value", gind);
201  write(xml, "ThreePoint1Spin1ColorTrace", HQprop11[0]);
202  write(xml, "ThreePoint1Spin2ColorTrace", HQprop12[0]);
203  write(xml, "ThreePoint2Spin1ColorTrace", HQprop21[0]);
204  write(xml, "ThreePoint2Spin2ColorTrace", HQprop22[0]);
205  pop(xml);
206 
207  END_CODE();
208  }// gind loop
209 }// QlQl routine
210 
211  /***
212 
213  This version is for both heavy quarks being not static (thus, they could be light quarks).
214  **/
215 void QlQl(const multi1d<LatticeColorMatrix>& u,
216  const LatticePropagator& quark_propagator1,
217  const LatticePropagator& quark_propagator2,
218  const LatticePropagator& heavy_quark_propagator1,
219  const LatticePropagator& heavy_quark_propagator2,
220  const multi1d<int>& src_coord,
221  const multi1d<int>& snk_coord,
222  const SftMom& phases,
223  XMLWriter& xml,
224  const std::string& xml_group)
225 {
226  START_CODE();
227 
228  if ( Ns != 4 ) /* Code is specific to Ns=4 */
229  return;
230 
231  int length = phases.numSubsets() ;
232  int num_mom = phases.numMom();
233 
234  multi1d<DComplex> Hq;
235 
236  for(int gind=0; gind<16;++gind){// Loop over gamma matrices...
237  LatticePropagator Mat1 , Mat2;
238  LatticeComplex Hq_prop11 , Hq_prop12, Hq_prop21, Hq_prop22 ;
239 
240  Mat1 = quark_propagator1 * adj(heavy_quark_propagator1) * Gamma(15) * Gamma(gind);
241  Mat2 = heavy_quark_propagator2 * adj(quark_propagator2) * Gamma(15) * Gamma(gind);
242 
243  Hq_prop11 = trace(Mat1*Mat2);
244  Hq_prop12 = traceSpin(traceColor(Mat1)*traceColor(Mat2));
245  Hq_prop21 = traceColor(traceSpin(Mat1)*traceSpin(Mat2));
246  Hq_prop22 = trace(Mat1)*trace(Mat2);
247 
248  // Project onto zero momentum
249  multi2d<DComplex> hsumHq11, hsumHq12 , hsumHq21, hsumHq22 ;
250  hsumHq11 = phases.sft(Hq_prop11);
251  hsumHq12 = phases.sft(Hq_prop12);
252  hsumHq21 = phases.sft(Hq_prop21);
253  hsumHq22 = phases.sft(Hq_prop22);
254  multi2d<DComplex> HQprop11(num_mom,length) ;
255  multi2d<DComplex> HQprop12(num_mom,length) ;
256  multi2d<DComplex> HQprop21(num_mom,length) ;
257  multi2d<DComplex> HQprop22(num_mom,length) ;
258 
259  for(int sink_mom_num=0; sink_mom_num < num_mom; ++sink_mom_num)
260  for(int t = 0; t < length; ++t)
261  {
262  int t_eff = (t - src_coord[Nd-1] + length) % length;
263  HQprop11[sink_mom_num][t_eff] = hsumHq11[sink_mom_num][t];
264  HQprop12[sink_mom_num][t_eff] = hsumHq12[sink_mom_num][t];
265  HQprop21[sink_mom_num][t_eff] = hsumHq21[sink_mom_num][t];
266  HQprop22[sink_mom_num][t_eff] = hsumHq22[sink_mom_num][t];
267  }
268 
269  //XMLWriter xml_bar(xml);
270  push(xml, xml_group);
271  write(xml, "gamma_value", gind);
272  write(xml, "ThreePoint1Spin1ColorTrace", HQprop11[0]);
273  write(xml, "ThreePoint1Spin2ColorTrace", HQprop12[0]);
274  write(xml, "ThreePoint2Spin1ColorTrace", HQprop21[0]);
275  write(xml, "ThreePoint2Spin2ColorTrace", HQprop22[0]);
276  pop(xml);
277 
278  END_CODE();
279  }// gind loop
280 }// QlQl routine
281 
282 
283 }// Namespace Chroma
Static-Light 3pt function.
Heavy Baryon (Qll) 2-pt function : Orginos and Savage.
Fourier transform phase factor support.
Definition: sftmom.h:35
int numSubsets() const
Number of subsets - length in decay direction.
Definition: sftmom.h:63
multi2d< DComplex > sft(const LatticeComplex &cf) const
Do a sumMulti(cf*phases,getSet())
Definition: sftmom.cc:524
int numMom() const
Number of momenta.
Definition: sftmom.h:60
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
void QlQl(const multi1d< LatticeColorMatrix > &u, const LatticePropagator &quark_propagator1, const LatticePropagator &quark_propagator2, const multi1d< int > &src_coord, const multi1d< int > &snk_coord, const int &bc, const SftMom &phases, XMLWriter &xml, const std::string &xml_group)
Heavy-light meson 2-pt function.
Definition: Ql_3pt_w.cc:44
void HeavyQuarkProp(LatticeColorMatrix &Qprop, const multi1d< LatticeColorMatrix > &u, const multi1d< int > &src_coord, int length, int bc)
Heavy Quark Propagator.
Definition: barQll_w.cc:149
void HeavyQuarkPropBack(LatticeColorMatrix &Qprop, const multi1d< LatticeColorMatrix > &u, const multi1d< int > &src_coord, int length, int bc)
Backwards Heavy Quark Propagator.
Definition: barQll_w.cc:207
multi1d< int > bc
int t
Definition: meslate.cc:37
Nd
Definition: meslate.cc:74
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
pop(xml_out)
START_CODE()
::std::string string
Definition: gtest.h:1979