CHROMA
g4g5_x_g4g5_local.cc
Go to the documentation of this file.
1 /*! File: pion_local_s.cc
2  *
3  * The routines in this file compute the staggered pions
4  * (gamma_4 gamma_5 cross gamma_4 gamma_5)
5  *
6  *
7  */
8 
11 
12 namespace Chroma {
13 
14 // I cant forward declare this for some reason
15 // Standard Time Slicery
16  class TimeSliceFunc : public SetFunc
17  {
18  public:
19  TimeSliceFunc(int dir): dir_decay(dir) {}
20 
21  int operator() (const multi1d<int>& coordinate) const {return coordinate[dir_decay];}
22  int numSubsets() const {return Layout::lattSize()[dir_decay];}
23 
24  int dir_decay;
25 
26  private:
27  TimeSliceFunc() {} // hide default constructor
28  };
29 
30 /*! compute method for the g4g5_x_g4g5_local_meson class
31  *
32  * This routine computes all 16 staggered pions.
33  *
34  * Caveats: i) It assumes that the propagators you give
35  * have been computed in some spatially fixed gauge
36  * eg the Coulomb Gauge.
37  *
38  *
39  * iii) The assumption is that you are working in 4d
40  *
41  * Parameters:
42  *
43  * quark_props -- The array of input propagators (Read)
44  * pion_corr_fn -- The 2d array of pion correlation functions
45  * (16, Nt) (Write)
46  *
47  * j_decay -- The time direction (has to be Nd-1 for now)
48  * (Read)
49  */
50 
51 
52 // THis brings the staggered phases alpha and beta into the namespace
53  using namespace StagPhases;
54 
55  void
57  LatticeStaggeredPropagator& quark_prop_A,
58  LatticeStaggeredPropagator& quark_prop_B,
59  int j_decay)
60  {
61 
62  // Paranoid Checks
63 
64  if( Nd != 4 ) {
65  QDPIO::cerr << "The no of dimensions should be 4 for now. It is: "
66  << Nd << std::endl;
67  QDP_abort(1);
68  }
69 
70  // Also for now we want j_decay to be 3.
71  switch( j_decay ) {
72  case 3:
73  break;
74 
75  default:
76  QDPIO::cerr << "pions_s: j_decay must be 3 for just now. It is " << j_decay << std::endl;
77  QDP_abort(1);
78  };
79 
80  // Get the lattice size.
81  const multi1d<int>& latt_size = Layout::lattSize();
82 
83 
84  // Correlation functions before spatial sum
85  LatticeComplex latt_corr_fn;
86 
87  // Machinery to do timeslice sums with
88  Set timeslice;
89  timeslice.make(TimeSliceFunc(Nd-1));
90 
91  // Counters/Indices
92  int pion_index = 0;
93  int i;
94  int mu, nu, rho;
95 
96  // Goldstone Pion
97  latt_corr_fn = - alpha(Nd-1)*trace(adj(quark_prop_A)*quark_prop_B);
98 
99  // Slice Sum
100  corr_fn[ pion_index ] = sumMulti(latt_corr_fn, timeslice);
101  tag_names[pion_index] = "gamma4gamma5_CROSS_gamma4gamma5" ;
102 
103  pion_index++;
104 
105  if( pion_index != no_pions ) {
106  QDPIO::cerr << "Panic! Panic! Something has gone horribly wrong" << std::endl;
107  QDP_abort(1);
108  }
109  }
110 
111 } // end namespace Chroma
112 
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
void compute(LatticeStaggeredPropagator &quark_prop_A, LatticeStaggeredPropagator &quark_prop_B, int j_decay)
Function object used for constructing the time-slice set.
int mu
Definition: cool.cc:24
int nu
Definition: cool.cc:25
int j_decay
Definition: meslate.cc:22
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
int i
Definition: pbg5p_w.cc:55