g4g5_x_g4g5_local.cc

Go to the documentation of this file.
00001 /*! File: pion_local_s.cc
00002  *
00003  * The routines in this file compute the staggered pions
00004  *  (gamma_4 gamma_5 cross gamma_4 gamma_5)
00005  *
00006  *
00007  */
00008 
00009 #include "meas/hadron/g4g5_x_g4g5_local.h"
00010 #include "util/gauge/stag_phases_s.h"
00011 
00012 namespace Chroma {
00013 
00014 // I cant forward declare this for some reason
00015 // Standard Time Slicery
00016   class TimeSliceFunc : public SetFunc
00017   {
00018   public:
00019     TimeSliceFunc(int dir): dir_decay(dir) {}
00020                                                                                 
00021     int operator() (const multi1d<int>& coordinate) const {return coordinate[dir_decay];}
00022     int numSubsets() const {return Layout::lattSize()[dir_decay];}
00023                                                                                 
00024     int dir_decay;
00025                                                                                 
00026   private:
00027     TimeSliceFunc() {}  // hide default constructor
00028   };
00029 
00030 /*! compute method for the g4g5_x_g4g5_local_meson class
00031  *
00032  * This routine computes all 16 staggered pions.
00033  * 
00034  * Caveats: i) It assumes that the propagators you give 
00035  *             have been computed in some spatially fixed gauge
00036  *             eg the Coulomb Gauge. 
00037  *
00038  *
00039  *         iii) The assumption is that you are working in 4d 
00040  * 
00041  *  Parameters: 
00042  * 
00043  *       quark_props      -- The array of input propagators (Read)
00044  *       pion_corr_fn     -- The 2d array of pion correlation functions
00045  *                           (16, Nt)  (Write)
00046  *
00047  *       j_decay          -- The time direction (has to be Nd-1 for now)
00048  *                           (Read)
00049  */
00050  
00051 
00052 // THis brings the staggered phases alpha and beta into the namespace
00053   using namespace StagPhases;
00054 
00055   void 
00056   g4g5_x_g4g5_local_meson::compute(
00057                                 LatticeStaggeredPropagator& quark_prop_A,
00058                                 LatticeStaggeredPropagator& quark_prop_B,
00059                                 int j_decay)
00060   {
00061 
00062     // Paranoid Checks
00063 
00064     if( Nd != 4 ) { 
00065       QDPIO::cerr << "The no of dimensions should be 4 for now. It is: " 
00066                   << Nd << endl;
00067       QDP_abort(1);
00068     }
00069 
00070     // Also for now we want j_decay to be 3.
00071     switch( j_decay ) { 
00072     case 3:
00073       break;
00074     
00075     default:
00076       QDPIO::cerr << "pions_s: j_decay must be 3 for just now. It is " << j_decay << endl;
00077       QDP_abort(1);
00078     };
00079 
00080     // Get the lattice size.
00081     const multi1d<int>& latt_size = Layout::lattSize();
00082   
00083 
00084     // Correlation functions before spatial sum
00085     LatticeComplex latt_corr_fn;
00086 
00087     // Machinery to do timeslice sums with 
00088     Set timeslice;
00089     timeslice.make(TimeSliceFunc(Nd-1));
00090 
00091     // Counters/Indices
00092     int pion_index = 0;
00093     int i;
00094     int mu, nu, rho;  
00095 
00096     // Goldstone Pion
00097     latt_corr_fn = -  alpha(Nd-1)*trace(adj(quark_prop_A)*quark_prop_B);
00098 
00099     // Slice Sum
00100     corr_fn[ pion_index ] = sumMulti(latt_corr_fn, timeslice);
00101     tag_names[pion_index] = "gamma4gamma5_CROSS_gamma4gamma5" ; 
00102 
00103     pion_index++;
00104 
00105     if( pion_index != no_pions ) { 
00106       QDPIO::cerr << "Panic! Panic! Something has gone horribly wrong" << endl;
00107       QDP_abort(1);
00108     }
00109   }
00110 
00111 }  // end namespace Chroma
00112 

Generated on Mon Mar 15 04:29:27 2010 for CHROMA by  doxygen 1.4.7