formfac_w.cc

Go to the documentation of this file.
00001 // $Id: formfac_w.cc,v 3.1 2006/05/05 03:07:20 edwards Exp $
00002 /*! \file
00003  *  \brief Form-factors 
00004  *
00005  *  Form factors constructed from a quark and a sequential quark propagator
00006  */
00007 
00008 #include "chromabase.h"
00009 #include "util/ft/sftmom.h"
00010 #include "meas/hadron/formfac_w.h"
00011 
00012 namespace Chroma 
00013 {
00014 
00015   /*!
00016    * Structures for hadron parts
00017    *
00018    * \ingroup hadron
00019    *
00020    * @{
00021    */
00022 
00023   // Read a momenta struct
00024   void read(BinaryReader& bin, FormFac_momenta_t& mom)
00025   {
00026     read(bin, mom.magic);
00027     if (mom.magic != 20301)
00028     {
00029       QDPIO::cerr << "read(FormFac_momenta_t): magic number invalid" << endl;
00030       QDP_abort(1);
00031     }
00032     read(bin, mom.inser_mom);
00033     read(bin, mom.local_current);
00034     read(bin, mom.nonlocal_current);
00035   }
00036 
00037   // 
00038   void read(BinaryReader& bin, FormFac_insertion_t& mes)
00039   {
00040     read(bin, mes.gamma_value);
00041     read(bin, mes.momenta);
00042   }
00043 
00044   // 
00045   void read(BinaryReader& bin, FormFac_insertions_t& form)
00046   {
00047     read(bin, form.output_version);
00048     read(bin, form.formFac);
00049   }
00050 
00051   // Write a momenta struct
00052   void write(BinaryWriter& bin, const FormFac_momenta_t& mom)
00053   {
00054     int magic = 20301;
00055     write(bin, magic);
00056     write(bin, mom.inser_mom);
00057     write(bin, mom.local_current);
00058     write(bin, mom.nonlocal_current);
00059   }
00060 
00061   // 
00062   void write(BinaryWriter& bin, const FormFac_insertion_t& mes)
00063   {
00064     write(bin, mes.gamma_value);
00065     write(bin, mes.momenta);
00066   }
00067 
00068   // 
00069   void write(BinaryWriter& bin, const FormFac_insertions_t& form)
00070   {
00071     write(bin, form.output_version);
00072     write(bin, form.formFac);
00073   }
00074 
00075   /*! @} */  // end of group hadron
00076 
00077 
00078   //! Compute contractions for current insertion 3-point functions.
00079   /*!
00080    * \ingroup hadron
00081    *
00082    * This routine is specific to Wilson fermions!
00083    *
00084    * \param form               structures holding formfactors ( Write )
00085    * \param u                  gauge fields (used for non-local currents) ( Read )
00086    * \param quark_propagator   quark propagator ( Read )
00087    * \param seq_quark_prop     sequential quark propagator ( Read )
00088    * \param gamma_insertion    extra gamma insertion at source ( Read )
00089    * \param phases             fourier transform phase factors ( Read )
00090    * \param t0                 cartesian coordinates of the source ( Read )
00091    */
00092 
00093   void FormFac(FormFac_insertions_t& form,
00094                const multi1d<LatticeColorMatrix>& u, 
00095                const LatticePropagator& quark_propagator,
00096                const LatticePropagator& seq_quark_prop, 
00097                int gamma_insertion,
00098                const SftMom& phases,
00099                int t0)
00100   {
00101     START_CODE();
00102 
00103     // Length of lattice in j_decay direction and 3pt correlations fcns
00104     int length = phases.numSubsets();
00105 
00106     int G5 = Ns*Ns-1;
00107   
00108     // Construct the anti-quark propagator from the seq. quark prop.
00109     LatticePropagator anti_quark_prop = Gamma(G5) * seq_quark_prop * Gamma(G5);
00110 
00111     // Rough timings (arbitrary units):
00112     //   Variant 1: 120
00113     //   Variant 2: 140
00114     // See previous cvs versions (before 1.10) for Variant 2 - only keeping Variant 1
00115 
00116     form.formFac.resize(Nd*Nd);
00117 
00118     // Loop over gamma matrices of the insertion current of insertion current
00119     for(int gamma_value = 0; gamma_value < Nd*Nd; ++gamma_value)
00120     {
00121       //  For the case where the gamma value indicates we are evaluating either
00122       //  the vector or axial vector currents, we will also evaluate
00123       //  the non-local currents.  The non-local vector current is the conserved
00124       //  current.  The non-local axial vector current would be partially
00125       //  conserved but for the Wilson term.  In these cases we will set
00126       //  mu = corresponding direction.  In all other cases, we will set mu = -1.
00127 
00128       bool compute_nonlocal;
00129       int mu;
00130 
00131       switch(gamma_value){
00132       case  1:
00133       case 14:
00134         mu = 0;
00135         compute_nonlocal = true;
00136         break;
00137       case  2:
00138       case 13:
00139         mu = 1;
00140         compute_nonlocal = true;
00141         break;
00142       case  4:
00143       case 11:
00144         mu = 2;
00145         compute_nonlocal = true;
00146         break;
00147       case  8:
00148       case  7:
00149         mu = 3;
00150         compute_nonlocal = true;
00151         break;
00152       default:
00153         mu = -1;
00154         compute_nonlocal = false;
00155       }
00156 
00157       // The local non-conserved vector-current matrix element 
00158       LatticeComplex corr_local_fn =
00159         trace(adj(anti_quark_prop) * Gamma(gamma_value) * quark_propagator * Gamma(gamma_insertion));
00160 
00161       multi2d<DComplex> hsum, hsum_nonlocal;
00162       hsum = phases.sft(corr_local_fn);
00163 
00164       // Construct the non-local current matrix element 
00165       //
00166       // The form of J_mu = (1/2)*[psibar(x+mu)*U^dag_mu*(1+gamma_mu)*psi(x) -
00167       //                           psibar(x)*U_mu*(1-gamma_mu)*psi(x+mu)]
00168       // NOTE: the 1/2  is included down below in the sumMulti stuff
00169       LatticeComplex corr_nonlocal_fn;
00170       if(compute_nonlocal){
00171         corr_nonlocal_fn =
00172           trace(adj(u[mu] * shift(anti_quark_prop, FORWARD, mu)) *
00173                 (quark_propagator + Gamma(gamma_value) * quark_propagator) * Gamma(gamma_insertion));
00174         LatticePropagator tmp_prop1 = u[mu] *
00175           shift(quark_propagator, FORWARD, mu);
00176         corr_nonlocal_fn -= trace(adj(anti_quark_prop) *
00177                                   (tmp_prop1 - Gamma(gamma_value) * tmp_prop1) * Gamma(gamma_insertion));
00178 
00179         hsum_nonlocal = phases.sft(corr_nonlocal_fn);
00180       }
00181 
00182   
00183       form.formFac[gamma_value].gamma_value = gamma_value;
00184       form.formFac[gamma_value].momenta.resize(phases.numMom());  // hold momenta output
00185 
00186       // Loop over insertion momenta and print out results
00187       for(int inser_mom_num=0; inser_mom_num<phases.numMom(); ++inser_mom_num) 
00188       {
00189         form.formFac[gamma_value].momenta[inser_mom_num].inser_mom = phases.numToMom(inser_mom_num);
00190 
00191         multi1d<Complex> local_cur3ptfn(length); // always compute
00192         multi1d<Complex> nonlocal_cur3ptfn;
00193         if (compute_nonlocal)
00194           nonlocal_cur3ptfn.resize(length);      // possibly compute
00195 
00196         for (int t=0; t < length; ++t) 
00197         {
00198           int t_eff = (t - t0 + length) % length;
00199 
00200           local_cur3ptfn[t_eff] = Complex(hsum[inser_mom_num][t]);
00201           if (compute_nonlocal)
00202             nonlocal_cur3ptfn[t_eff] = 0.5 * Complex(hsum_nonlocal[inser_mom_num][t]);
00203 
00204         } // end for(t)
00205 
00206         form.formFac[gamma_value].momenta[inser_mom_num].local_current    = local_cur3ptfn;
00207         form.formFac[gamma_value].momenta[inser_mom_num].nonlocal_current = nonlocal_cur3ptfn;
00208 
00209       } // end for(inser_mom_num)
00210     } // end for(gamma_value)
00211                             
00212     END_CODE();
00213   }
00214 
00215 }  // end namespace Chroma

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