CHROMA
vector_meson_s.cc
Go to the documentation of this file.
1 /*! File: vector_meson_s.cc
2  *
3  * The routines in this file computes some of the staggered rhos
4  *
5  * Only the local vectors are computed.
6 
7  *
8  * BEWARE: These routines ASSUME that the quark propagators have been
9  * calculated in the Coulomb (or other spatially fixed) gauge.
10  * It is not gauge invariant. It could be made to be so by adding some
11  * parallel transport, however folklore claims that increases noise
12  *
13  * YOU HAVE BEEN WARNED.
14  */
15 
19 
20 namespace Chroma {
21 
22 // I cant forward declare this for some reason
23 // Standard Time Slicery
24 class TimeSliceFunc : public SetFunc
25 {
26 public:
27  TimeSliceFunc(int dir): dir_decay(dir) {}
28 
29  int operator() (const multi1d<int>& coordinate) const {return coordinate[dir_decay];}
30  int numSubsets() const {return Layout::lattSize()[dir_decay];}
31 
32  int dir_decay;
33 
34 private:
35  TimeSliceFunc() {} // hide default constructor
36 };
37 
38 /*! StaggeredVectorMesons
39  *
40  * This routine computes the three local std::vector mesons.
41  *
42  * Caveats: i) It assumes that the propagators you give
43  * have been computed in some spatially fixed gauge
44  * eg the Coulomb Gauge.
45  *
46  * ii) This means that there is only
47  * 8 propagators corresponding to the 8 corners of the
48  * spatial cube. The props come in an array whose single
49  * index std::maps lexicographically to the corners of the cube.
50  * ie: prop_index = 0, hypercube_coord (0,0,0,0)
51  * prop_index = 1, hypercube_coord (1,0,0,0)
52  * prop_index = 2, hypercube_coord (0,1,0,0)
53  *
54  * essentially prop_index = x + 2*y + 4*z
55  *
56  * iii) The assumption is that you are working in 4d
57  *
58  * Parameters:
59  *
60  * quark_props -- The array of input propagators (Read)
61  *
62  * j_decay -- The time direction (has to be Nd-1 for now)
63  * (Read)
64  */
65 
66 
67 void
69  multi1d<LatticeStaggeredPropagator>& quark_props,
70  int j_decay)
71 {
72 
73  // Paranoid Checks
74 
75  if( Nd != 4 ) {
76  QDPIO::cerr << "The no of dimensions should be 4 for now. It is: "
77  << Nd << std::endl;
78  QDP_abort(1);
79  }
80 
81 
82  // Also for now we want j_decay to be 3.
83  switch( j_decay ) {
84  case 3:
85  break;
86 
87  default:
88  QDPIO::cerr << "staggeredVectors: j_decay must be 3 for just now. It is " << j_decay << std::endl;
89  QDP_abort(1);
90  };
91 
92  // Get the lattice size.
93  const multi1d<int>& latt_size = Layout::lattSize();
94 
95  // resize output array appropriately
96  corr_fn.resize(NUM_STAG_PIONS, latt_size[Nd-1]);
97 
98  // Correlation functions before spatial sum
99  LatticeComplex corr_fn_s;
100 
101  // Machinery to do timeslice sums with
102  Set timeslice;
103  timeslice.make(TimeSliceFunc(Nd-1));
104 
105  // Counters/Indices
106  int sca_index = 0;
107 
108  //
109  //
110  //
111  corr_fn_s = StagPhases::alpha(1)*
112  trace(quark_props[0]*adj(quark_props[ 0 ]));
113  corr_fn[ sca_index ] = sumMulti(corr_fn_s, timeslice);
114  tag_names[sca_index] = "gamma_x_CROSS_gamma_x" ;
115  sca_index++;
116 
117  corr_fn_s = StagPhases::alpha(1)*StagPhases::alpha(2)*
118  trace(quark_props[0]*adj(quark_props[0]));
119 
120  corr_fn[ sca_index ] = sumMulti(corr_fn_s, timeslice);
121  tag_names[sca_index] = "gamma_y_CROSS_gamma_y" ;
122  sca_index++;
123 
124 
125  corr_fn_s = StagPhases::alpha(2)*StagPhases::alpha(3)*
126  trace(quark_props[0]*adj(quark_props[0] ));
127  corr_fn[ sca_index ] = sumMulti(corr_fn_s, timeslice);
128  tag_names[sca_index] = "gamma_z_CROSS_gamma_z" ;
129  sca_index++;
130 
131 
132  tag_names[sca_index] = "M_VT" ;
133 
134  for(int t= 0 ; t < latt_size[Nd-1] ; ++t)
135  {
136  corr_fn[sca_index][t] = ( corr_fn[0][t]
137  + corr_fn[1][t]
138  + corr_fn[2][t] ) / 3.0 ;
139  }
140 
141 
142 }
143 
144 
145 /**
146  Compute the local std::vector meson correlators using a single
147  local quark propagator.
148 
149  * I have checked this routine against the MILC code.
150 
151 **/
152 
153 
154 void
156  LatticeStaggeredPropagator & quark_props,
157  int j_decay)
158 {
159 
160  // Paranoid Checks
161 
162  if( Nd != 4 ) {
163  QDPIO::cerr << "The no of dimensions should be 4 for now. It is: "
164  << Nd << std::endl;
165  QDP_abort(1);
166  }
167 
168 
169  // Also for now we want j_decay to be 3.
170  switch( j_decay ) {
171  case 3:
172  break;
173 
174  default:
175  QDPIO::cerr << "staggeredVectors: j_decay must be 3 for just now. It is " << j_decay << std::endl;
176  QDP_abort(1);
177  };
178 
179  // Get the lattice size.
180  const multi1d<int>& latt_size = Layout::lattSize();
181 
182  // resize output array appropriately
183  corr_fn.resize(NUM_STAG_PIONS, latt_size[Nd-1]);
184 
185  // Correlation functions before spatial sum
186  LatticeComplex corr_fn_s;
187 
188  // Machinery to do timeslice sums with
189  Set timeslice;
190  timeslice.make(TimeSliceFunc(Nd-1));
191 
192  // Counters/Indices
193  int sca_index = 0;
194 
195  //
196  //
197  //
198 
199  corr_fn_s = StagPhases::alpha(1)*
200  trace(quark_props*adj(quark_props));
201  corr_fn[ sca_index ] = sumMulti(corr_fn_s, timeslice);
202  tag_names[sca_index] = "gamma_x_CROSS_gamma_x" ;
203  sca_index++;
204 
205  corr_fn_s = StagPhases::alpha(1)*StagPhases::alpha(2)*
206  trace(quark_props*adj(quark_props));
207 
208  corr_fn[ sca_index ] = sumMulti(corr_fn_s, timeslice);
209  tag_names[sca_index] = "gamma_y_CROSS_gamma_y" ;
210  sca_index++;
211 
212 
213  corr_fn_s = StagPhases::alpha(2)*StagPhases::alpha(3)*
214  trace(quark_props*adj(quark_props ));
215  corr_fn[ sca_index ] = sumMulti(corr_fn_s, timeslice);
216  tag_names[sca_index] = "gamma_z_CROSS_gamma_z" ;
217  sca_index++;
218 
219 
220  tag_names[sca_index] = "M_VT" ;
221 
222  for(int t= 0 ; t < latt_size[Nd-1] ; ++t)
223  {
224  corr_fn[sca_index][t] = ( corr_fn[0][t]
225  + corr_fn[1][t]
226  + corr_fn[2][t] ) / 3.0 ;
227  }
228 
229 
230 }
231 
232 } // end namespace Chroma
Function object used for constructing the time-slice set.
Definition: barQll_w.h:95
int operator()(const multi1d< int > &coordinate) const
Definition: barQll_w.h:99
multi1d< std::string > tag_names
multi2d< DComplex > corr_fn
void compute(multi1d< LatticeStaggeredPropagator > &quark_props, int j_decay)
Function object used for constructing the time-slice set.
#define NUM_STAG_PIONS
Definition: hadron_corr_s.h:6
int j_decay
Definition: meslate.cc:22
int t
Definition: meslate.cc:37
Nd
Definition: meslate.cc:74
static const LatticeInteger & alpha(const int dim)
Definition: stag_phases_s.h:43
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10