30 namespace PhotonRhoSeqSourceEnv
73 sink_mom.resize(
Nd-1);
81 XMLReader paramtop(xml, path);
84 read(paramtop,
"version", version);
92 QDPIO::cerr << __func__ <<
": parameter version " << version
93 <<
" unsupported." << std::endl;
97 read(paramtop,
"Q_sq", Q_sq);
98 read(paramtop,
"c_sq", c_sq);
99 read(paramtop,
"xi", xi);
102 read(paramtop,
"sink_mom", sink_mom);
114 write(xml,
"version", version);
116 write(xml,
"Q_sq", Q_sq);
117 write(xml,
"c_sq", c_sq);
118 write(xml,
"xi", xi);
123 write(xml,
"t_sink", t_sink);
124 write(xml,
"sink_mom", sink_mom);
137 QDPIO::cout <<
"Photon sequential source " << std::endl;
142 QDPIO::cerr << __func__ <<
": expect only 1 prop" << std::endl;
148 QDPIO::cerr << __func__ <<
": j_decay out of bounds: j_decay = " <<
params.j_decay << std::endl;
154 QDPIO::cerr << __func__ <<
": pol_dir out of bounds: pol_dir = " <<
params.
pol_dir << std::endl;
159 LatticePropagator seq_src_tmp;
165 seq_src_tmp = Gamma(15) * adj(
tmp) * Gamma(15);
169 LatticeComplex exp_p_dot_x;
172 LatticeReal p_dot_x =
zero;
173 multi1d<Real> pp_f(
Nd-1);
181 p_dot_x += (Layout::latticeCoordinate(
mu) -
getTSrce()[
mu]) * pp_f[
j];
188 exp_p_dot_x = cmplx(cos(p_dot_x),sin(p_dot_x));
193 Real norm2_ppf =
zero;
194 for(
int i=0;
i < pp_f.size(); ++
i)
195 norm2_ppf += pp_f[
i] * pp_f[
i];
199 Real xi_sq = xi * xi;
201 omega = sqrt( Real(c_sq/xi_sq)*norm2_ppf -
params.Q_sq );
203 QDPIO::cout << __func__ <<
": omega= " <<
omega << std::endl;
207 exp_p_dot_x *= exp(
omega * Layout::latticeCoordinate(
params.j_decay));
217 LatticePropagator fin = where(mask,
218 exp_p_dot_x * seq_src_tmp,
219 LatticePropagator(
zero));
235 QDPIO::cout <<
"Point split photon sequential source " << std::endl;
240 QDPIO::cerr << __func__ <<
": expect only 1 prop" << std::endl;
246 QDPIO::cerr << __func__ <<
": j_decay out of bounds: j_decay = " <<
params.j_decay << std::endl;
252 QDPIO::cerr << __func__ <<
": pol_dir out of bounds: pol_dir = " <<
params.
pol_dir << std::endl;
257 LatticePropagator seq_src_f, seq_src_b;
260 SpinMatrix P_plus, P_minus;
262 SpinMatrix g_one = 1.0;
265 P_plus = 0.5*(g_one + (Gamma(jd) * g_one));
266 P_minus = 0.5*(g_one - (Gamma(jd) * g_one));
275 LatticeComplex exp_p_dot_x_f, exp_p_dot_x_b;
277 LatticeReal p_dot_x =
zero;
278 multi1d<Real> pp_f(
Nd-1);
286 p_dot_x += (Layout::latticeCoordinate(
mu) -
getTSrce()[
mu]) * pp_f[
j];
293 LatticeComplex exp_p_dot_x = cmplx(cos(p_dot_x),sin(p_dot_x));
298 Real norm2_ppf =
zero;
299 for(
int i=0;
i < pp_f.size(); ++
i)
300 norm2_ppf += pp_f[
i] * pp_f[
i];
304 Real xi_sq = xi * xi;
306 omega = sqrt( Real(c_sq/xi_sq)*norm2_ppf -
params.Q_sq );
308 QDPIO::cout << __func__ <<
": omega= " <<
omega << std::endl;
312 exp_p_dot_x *= exp(
omega * Layout::latticeCoordinate(
params.j_decay));
317 exp_p_dot_x, LatticeComplex(
zero));
319 exp_p_dot_x_b = exp_p_dot_x_f;
326 exp_p_dot_x_b *= cmplx(cos(pp_f),sin(pp_f));
331 exp_p_dot_x_b *= exp(-
omega);
338 LatticePropagator fin = (exp_p_dot_x_f * seq_src_f - exp_p_dot_x_b * seq_src_b) * Gamma(
G5);
354 mesPionPhotonSeqSrc);
358 mesPionPointSplitPhotonSeqSrc);
virtual void setTSrce(const multi1d< ForwardProp_t > &forward_headers)
Convenience function to yank the source location from the forward prop headers.
Construct the source LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)
Construct the source.
Set t_srce multi1d< int > & getTSrce()
Set t_srce.
Construct the source LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)
Construct the source.
Set t_srce multi1d< int > & getTSrce()
Set t_srce.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams ¶m)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
multi1d< ForwardProp_t > & forward_headers
multi1d< LatticePropagator > & quark_propagators
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
Construct a photon sequential sources via LSZ reduction.
Factory for producing quark prop sinks.
Construct a photon sequential sources via LSZ reduction.
void writeXML(XMLWriter &in, const std::string &path) const