//------------------------------------------------------------------ // // alg_nuc3pt.h // // Header file for all alg classes relevant to Wilson-type fermion // nuc3pt' spectrum. The type of glue or fermion is given as // an argument of type Lattice& to the constructor. If the // fermion type is not F_CLASS_WILSON or F_CLASS_CLOVER or // F_CLASS_DWF the QPropW constructors exit with a general error. // //------------------------------------------------------------------ #ifndef INCLUDED_ALG_NUC3PT_H #define INCLUDED_ALG_NUC3PT_H #include #include #include #include #include #include #include #include #include #if TARGET == QCDOC #include #endif CPS_START_NAMESPACE enum DIR { X = 0, Y = 1, Z = 2, T = 3, G5 = -5 } ; //------------------------------------------------------------------ // // AlgNuc3pt is derived from Alg and is relevant to // meson three point functions with Wilson type // fermions (i.e. Wilson, Clover, Dwf). // The type of fermion is determined by the argument to the // constructor. If the fermion type is not F_CLASS_WILSON or // F_CLASS_CLOVER or F_CLASS_DWF the constructors exit with a // general error. // //------------------------------------------------------------------ class AlgNuc3pt : public Alg { private: char* cname; Nuc3ptArg* Nuc3pt_arg ; // The argument structure for the // three point calculation int num_qprop; // the number of the forward propagators needed (added by MFL) QPropW** q_prop ; // Stores the quark propagator (changed by MFL) QPropWMultSeqBar* u_s_prop ; // Stores the up quark sequential propagator QPropWMultSeqBar* d_s_prop ; // Stores the down quark sequential propagator FILE *fp ; // The I/O file pointer void GetThePropagator(int n, int time, Float mass) ; void GetThePropagator(int time, Float mass) { GetThePropagator(0,time,mass); } void GetTheSeqPropagator(int, Float, SourceType, int*, ProjectType) ; //void QIO_SaveProp(QPropW& prop, char*, char*, int) ; //void QIO_ReadProp(QPropW& prop, char*) ; void OpenFile(); void CloseFile() { if(fp != NULL) Fclose(fp); } /*! Computes the Scalar insertion \f[ {\cal O} = \overline{q} q \f] */ void calc_Scalar() { for ( int n = 0; n < num_qprop; n++) { Gamma S; Nuc3ptGamma Scal(S) ; Scal.Calc3pt(*u_s_prop,*q_prop[n]); Scal.Calc3pt(*d_s_prop,*q_prop[n]); OpenFile(); Scal.Print(fp) ; CloseFile(); } } #ifdef _NEDM //! Integration trick for NEDM void calc_NEDM(){ for ( int n = 0; n < num_qprop; n++ ) { Gamma Gt(T); Nuc3ptGammaR NEDM(Gt,Z) ; NEDM.Calc3pt(*u_s_prop,*q_prop[n]); NEDM.Calc3pt(*d_s_prop,*q_prop[n]); OpenFile(); NEDM.Print(fp) ; CloseFile(); } } //! Integration trick for NEDM void calc_NMM(){ for ( int n = 0; n < num_qprop; n++ ) { Gamma Gx(X); Nuc3ptGammaR NMM(Gx,Y) ; NMM.Calc3pt(*u_s_prop,*q_prop[n]); NMM.Calc3pt(*d_s_prop,*q_prop[n]); OpenFile(); NMM.Print(fp) ; CloseFile(); } } #endif /*! Computes the vector current using the \f[ {\cal O}_\mu = \overline{q} \gamma_\mu q \f] all possible mometa are inserted */ void calc_Vector(const ThreeMom& q) ; /*! Computes the Axial vector current using the \f[ {\cal O}_{5\mu} = i \overline{q} \gamma_5 \gamma_\mu q \f] all possible mometa are inserted */ void calc_Axial(const ThreeMom& q) ; /*! Computes the Axial vector current using the \f[ {\cal O}_{5} = \overline{q} \gamma_5 q \f] all possible mometa are inserted */ void calc_PScalar(const ThreeMom& q) ; /*! Computes the energy momentum form factor \f[ {\cal O}_{14} = \overline{q} \left[ \gamma_1 \stackrel{\displaystyle \leftrightarrow}{D}_4 +\gamma_4 \stackrel{\displaystyle \leftrightarrow}{D}_1 \right] q \f] with polarized projector */ void calc_EnergyMomentum(const ThreeMom& mom) ; //UnPolarized /*! Computes the vector current using the \f[ {\cal O}_4 = \overline{q} \gamma_4 q \f] */ void calc_Vector() { for ( int n = 0; n < num_qprop; n++ ) { Gamma Gt(T); Nuc3ptGamma VectCurr(Gt) ; VectCurr.Calc3pt(*u_s_prop,*q_prop[n]); VectCurr.Calc3pt(*d_s_prop,*q_prop[n]); OpenFile(); VectCurr.Print(fp) ; CloseFile(); } } /*! Computes the first unpolarized moment \f[ \langle x\rangle_q^{(a)} \f] \f[ {\cal O}_{14} = \overline{q} \left[ \gamma_1 \stackrel{\displaystyle \leftrightarrow}{D}_4 +\gamma_4 \stackrel{\displaystyle \leftrightarrow}{D}_1 \right] q \f] The operator needs non-zero momentum \f$P_1\$ in order to be computed. */ void calc_X_q_a() { for ( int n = 0; n < num_qprop; n++ ) { Gamma Gx(X); Gamma Gt(T); Derivative Der_t(T); Derivative Der_x(T); Nuc3ptStru Xq_xt(Gx, Der_t); Xq_xt.Calc3pt(*u_s_prop, *q_prop[n]); Xq_xt.Calc3pt(*d_s_prop, *q_prop[n]); Nuc3ptStru Xq_tx(Gt,Der_x); Xq_tx.Calc3pt(*u_s_prop, *q_prop[n]); Xq_tx.Calc3pt(*d_s_prop, *q_prop[n]); Xq_xt += Xq_tx ; OpenFile(); Fprintf(fp,"The next is: 14 + 41\n"); Xq_xt.Print(fp) ; CloseFile(); } } /*! Computes the first unpolarized moment \f[ \langle x\rangle_q^{(b)} \f] \f[ {\cal O}_{44} = \overline{q} \left[ \gamma_4 \stackrel{\displaystyle \leftrightarrow}{D}_4 -\frac{1}{3} \sum_{k=1}^3 \gamma_k \stackrel{\displaystyle \leftrightarrow}{D}_k \right] q \f] The operator does not need non-zero momentum to by computed. */ void calc_X_q_b() { for ( int n = 0; n < num_qprop; n++ ) { Gamma Gt(T) ; Derivative Der_t(T) ; Nuc3ptStru Xq_tt(Gt,Der_t) ; Xq_tt.Calc3pt(*u_s_prop,*q_prop[n]); Xq_tt.Calc3pt(*d_s_prop,*q_prop[n]); for(int k(X);k