CHROMA
pions_s.cc
Go to the documentation of this file.
1 /*! File: pions_follana_s.cc
2  *
3  * The routines in this file compute all 16 staggered pions.
4  *
5  * BEWARE: These routines ASSUME that the pion propagators have been
6  * calculated in the Coulomb (or other spatially fixed) gauge.
7  * It is not gauge invariant. It could be made to be so by adding some
8  * parallel transport, however folklore claims that increases noise
9  *
10  * YOU HAVE BEEN WARNED.
11  */
12 
13 #include "meas/hadron/pions_s.h"
15 
16 namespace Chroma {
17 
18 // I cant forward declare this for some reason
19 // Standard Time Slicery
20  class TimeSliceFunc : public SetFunc
21  {
22  public:
23  TimeSliceFunc(int dir): dir_decay(dir) {}
24 
25  int operator() (const multi1d<int>& coordinate) const {return coordinate[dir_decay];}
26  int numSubsets() const {return Layout::lattSize()[dir_decay];}
27 
28  int dir_decay;
29 
30  private:
31  TimeSliceFunc() {} // hide default constructor
32  };
33 
34 /*! staggeredPionsFollana
35  *
36  * This routine computes all 16 staggered pions.
37  *
38  * Caveats: i) It assumes that the propagators you give
39  * have been computed in some spatially fixed gauge
40  * eg the Coulomb Gauge.
41  *
42  * ii) This means that there is only
43  * 8 propagators corresponding to the 8 corners of the
44  * spatial cube. The props come in an array whose single
45  * index std::maps lexicographically to the corners of the cube.
46  * ie: prop_index = 0, hypercube_coord (0,0,0,0)
47  * prop_index = 1, hypercube_coord (1,0,0,0)
48  * prop_index = 2, hypercube_coord (0,1,0,0)
49  *
50  * essentially prop_index = x + 2*y + 4*z
51  *
52  * iii) The assumption is that you are working in 4d
53  *
54  * Parameters:
55  *
56  * quark_props -- The array of input propagators (Read)
57  * pion_corr_fn -- The 2d array of pion correlation functions
58  * (16, Nt) (Write)
59  *
60  * j_decay -- The time direction (has to be Nd-1 for now)
61  * (Read)
62  */
63 
64 
65 // THis brings the staggered phases alpha and beta into the namespace
66  using namespace StagPhases;
67 
68  void
69  staggered_pions::compute(multi1d<LatticeStaggeredPropagator>& quark_props,
70  // multi2d<DComplex>& pion_corr_fn,
71  int j_decay)
72  {
73 
74  // Paranoid Checks
75 
76  if( Nd != 4 ) {
77  QDPIO::cerr << "The no of dimensions should be 4 for now. It is: "
78  << Nd << std::endl;
79  QDP_abort(1);
80  }
81 
82  // Check for 8 props
83  if( quark_props.size() != NUM_STAG_PROPS ) {
84  QDPIO::cerr << "pions_s: input quark props has the wrong number of elements. It should be 8 but is " << quark_props.size() << std::endl;
85  QDP_abort(1);
86  };
87 
88  // Also for now we want j_decay to be 3.
89  switch( j_decay ) {
90  case 3:
91  break;
92 
93  default:
94  QDPIO::cerr << "pions_s: j_decay must be 3 for just now. It is " << j_decay << std::endl;
95  QDP_abort(1);
96  };
97 
98  // Get the lattice size.
99  const multi1d<int>& latt_size = Layout::lattSize();
100 
101  // resize output array appropriately
102  corr_fn.resize(NUM_STAG_PIONS, latt_size[Nd-1]);
103 
104  // Correlation functions before spatial sum
105  LatticeComplex latt_corr_fn;
106 
107  // Machinery to do timeslice sums with
108  Set timeslice;
109  timeslice.make(TimeSliceFunc(Nd-1));
110 
111  // Phases
112  //multi1d<LatticeInteger> alpha(Nd); // KS Phases
113  //multi1d<LatticeInteger> beta(Nd); // Auxiliary phases for this work
114 
115  // Get the phases -- now done elsewhere
116  // mesPhasFollana(alpha, beta);
117 
118  // Counters/Indices
119  int pion_index = 0;
120  int i;
121  int mu, nu, rho;
122 
123  // Goldstone Pion
124  latt_corr_fn = trace(adj(quark_props[0])*quark_props[0]);
125 
126  // Slice Sum
127  corr_fn[ pion_index ] = sumMulti(latt_corr_fn, timeslice);
128  tag_names[pion_index] = "gamma5_CROSS_gamma5" ;
129 
130  pion_index++;
131 
132 
133  // Array to describe shifts in cube
134  multi1d<int> delta(Nd);
135 
136  tag_names[pion_index] = "gamma5_CROSS_gamma0_gamma5" ;
137  tag_names[pion_index+1] = "gamma5_CROSS_gamma1_gamma5" ;
138  tag_names[pion_index+2] = "gamma5_CROSS_gamma2_gamma5" ;
139  for(mu=0; mu<Nd-1; mu++) {
140 
141  delta = 0;
142  delta[mu] = 1;
143 
144  latt_corr_fn = beta(mu)*trace(shift_deltaProp(delta,quark_props[0])
145  *adj(quark_props[ deltaToPropIndex(delta) ]));
146 
147  corr_fn[ pion_index ] = sumMulti(latt_corr_fn, timeslice);
148  pion_index++;
149  }
150 
151  // ------------------------------
152  tag_names[pion_index] = "gamma3_gamma5_CROSS_gamma3_gamma5" ;
153  latt_corr_fn = - alpha(Nd-1)*trace(adj(quark_props[0])*quark_props[0]);
154  corr_fn[ pion_index ] = sumMulti(latt_corr_fn, timeslice);
155  pion_index++;
156 
157  // -----------------------------
158  tag_names[pion_index] = "gamma5_CROSS_gamma2_gamma3" ;
159  tag_names[pion_index+1] = "gamma5_CROSS_gamma1_gamma3" ;
160  tag_names[pion_index+2] = "gamma5_CROSS_gamma0_gamma3" ;
161 
162  for(mu=0; mu<Nd-1; mu++) {
163  for(nu=mu+1; nu <Nd-1; nu++) {
164  delta = 0;
165  delta[mu] = 1;
166  delta[nu] = 1;
167 
168  latt_corr_fn = - beta(mu)* beta(nu)
169  *trace(adj(shift_deltaProp(delta,quark_props[0]))
170  *quark_props[ deltaToPropIndex(delta) ]);
171 
172  corr_fn[ pion_index ] = sumMulti(latt_corr_fn, timeslice);
173  pion_index++;
174  }
175  }
176 
177  // --------------------
178 
179  tag_names[pion_index] = "gamma3_gamma5_CROSS_gamma1_gamma2" ;
180  tag_names[pion_index+1] = "gamma3_gamma5_CROSS_gamma0_gamma2" ;
181  tag_names[pion_index+2] = "gamma3_gamma5_CROSS_gamma0_gamma1" ;
182 
183  for(mu=0; mu<Nd-1; mu++) {
184  delta = 0;
185  delta[mu] = 1;
186 
187  latt_corr_fn = - beta(mu)* alpha(Nd-1)
188  *trace(adj(shift_deltaProp(delta,quark_props[0]))
189  *quark_props[ deltaToPropIndex(delta) ]);
190 
191  corr_fn[ pion_index ] = sumMulti(latt_corr_fn, timeslice);
192  pion_index++;
193  }
194 
195  // ---------------------------------
196  tag_names[pion_index] = "gamma5_CROSS_gamma3" ;
197 
198  for(mu=0; mu<Nd-1; mu++) {
199  for(nu=mu+1; nu <Nd-1; nu++) {
200  for(rho=nu+1; rho < Nd-1; rho++) {
201 
202  delta = 0;
203  delta[mu] = 1;
204  delta[nu] = 1;
205  delta[rho] = 1;
206 
207 
208  latt_corr_fn = - beta(mu) * beta(nu)* beta(rho)
209  *trace(adj(shift_deltaProp(delta,quark_props[0]))
210  *quark_props[ deltaToPropIndex(delta) ]);
211 
212  corr_fn[ pion_index ] = sumMulti(latt_corr_fn, timeslice);
213  pion_index++;
214  }
215  }
216  }
217 
218  // ---------------------------------
219  tag_names[pion_index] = "gamma3_gamma5_CROSS_gamma2" ;
220  tag_names[pion_index+1] = "gamma3_gamma5_CROSS_gamma1" ;
221  tag_names[pion_index+2] = "gamma3_gamma5_CROSS_gamma0" ;
222 
223  for(mu=0; mu<Nd-1; mu++) {
224  for(nu=mu+1; nu <Nd-1; nu++) {
225 
226  delta = 0;
227  delta[mu] = 1;
228  delta[nu] = 1;
229 
230  latt_corr_fn = beta(mu)* beta(nu)* alpha(Nd-1)
231  *trace(adj(shift_deltaProp(delta,quark_props[0]))
232  *quark_props[ deltaToPropIndex(delta) ]);
233 
234  corr_fn[ pion_index ] = sumMulti(latt_corr_fn, timeslice);
235  pion_index++;
236  }
237  }
238 
239  // ---------------------------------
240  tag_names[pion_index] = "gamma3_gamma5_CROSS_one" ;
241 
242  delta = 0;
243  delta[0] = delta[1] = delta[2] = 1;
244  latt_corr_fn = - alpha(3)* beta(0)* beta(1) * beta(2)
245  *trace(adj(shift_deltaProp(delta, quark_props[0]))
246  *quark_props[ deltaToPropIndex(delta) ] );
247 
248  corr_fn[ pion_index ] = sumMulti(latt_corr_fn, timeslice);
249  pion_index++;
250 
251  if( pion_index != NUM_STAG_PIONS) {
252  QDPIO::cerr << "Panic! Panic! Something has gone horribly wrong" << std::endl;
253  QDP_abort(1);
254  }
255  }
256 
257 } // end namespace Chroma
258 
Function object used for constructing the time-slice set.
Definition: barQll_w.h:95
int numSubsets() const
Definition: pions_s.cc:26
int operator()(const multi1d< int > &coordinate) const
Definition: barQll_w.h:99
TimeSliceFunc(int dir)
Definition: pions_s.cc:23
void compute(multi1d< LatticeStaggeredPropagator > &quark_props, int j_decay)
Definition: pions_s.cc:69
Function object used for constructing the time-slice set.
int mu
Definition: cool.cc:24
int nu
Definition: cool.cc:25
#define NUM_STAG_PIONS
Definition: hadron_corr_s.h:6
#define NUM_STAG_PROPS
Definition: hadron_corr_s.h:5
int j_decay
Definition: meslate.cc:22
Nd
Definition: meslate.cc:74
static const LatticeInteger & beta(const int dim)
Definition: stag_phases_s.h:47
static const LatticeInteger & alpha(const int dim)
Definition: stag_phases_s.h:43
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
int deltaToPropIndex(multi1d< int > &delta)
int i
Definition: pbg5p_w.cc:55