71 multi1d<WallFormFac_bar_t>
bar;
80 read(xml, path, wallff_str);
81 if (wallff_str ==
"PION")
83 else if (wallff_str ==
"RHO")
85 else if (wallff_str ==
"RHO_PI")
87 else if (wallff_str ==
"NUCL")
89 else if (wallff_str ==
"NUCL_CT")
91 else if (wallff_str ==
"DELTA")
93 else if (wallff_str ==
"DELTA_P")
97 QDPIO::cerr <<
"Unsupported wallformfac type" << std::endl;
112 wallff_str =
"RHO_PI";
116 wallff_str =
"NUCL_CT";
118 wallff_str =
"DELTA";
120 wallff_str =
"DELTA_P";
123 QDPIO::cerr <<
"Unsupported formfac type" << std::endl;
126 write(xml, path, wallff_str);
133 XMLReader inputtop(xml, path);
143 XMLReader paramtop(xml, path);
146 read(paramtop,
"version", version);
162 QDPIO::cerr <<
"Input parameter version " << version
163 <<
" unsupported." << std::endl;
177 XMLReader inputtop(xml, path);
186 read(inputtop,
"Cfg", input.
cfg);
225 int main(
int argc,
char *argv[])
242 read(xml_in,
"/WallFormFac", input);
248 QDPIO::cout <<
" WALLFORMFAC: Form factors for Wilson-like fermions" << std::endl;
249 QDPIO::cout << std::endl <<
" Gauge group: SU(" << Nc <<
")" << std::endl;
250 QDPIO::cout <<
" volume: " << input.
param.
nrow[0];
251 for (
int i=1;
i<
Nd; ++
i) {
254 QDPIO::cout << std::endl;
257 QDPIO::cout <<
"Attempt to initialize the gauge field" << std::endl;
259 multi1d<LatticeColorMatrix>
u(
Nd);
260 XMLReader gauge_file_xml, gauge_xml;
268 QDPIO::cout <<
"Gauge field successfully initialized" << std::endl;
274 push(xml_out,
"wallFormFac");
279 write(xml_out,
"Input", xml_in);
282 write(xml_out,
"Config_info", gauge_xml);
284 push(xml_out,
"Output_version");
285 write(xml_out,
"out_version", 4);
289 MesPlq(xml_out,
"Observables",
u);
296 XMLReader forwprop_file_xml, forwprop_record_xml;
297 LatticePropagator forward_quark_prop;
301 QDPIO::cout <<
"Attempt to read forward propagator" << std::endl;
303 forwprop_record_xml, forward_quark_prop,
305 QDPIO::cout <<
"Forward propagator successfully read" << std::endl;
311 read(forwprop_record_xml,
"/Propagator/ForwardProp", forward_prop_header);
312 read(forwprop_record_xml,
"/Propagator/PropSource", forward_source_header);
316 QDPIO::cerr <<
"Error extracting forward_prop header: " << e << std::endl;
324 QDPIO::cerr <<
"Wallformfac: wall_source flag set but not a wall source forward prop" << std::endl;
338 multi1d<Double> forward_prop_corr = sumMulti(localNorm2(forward_quark_prop),
341 push(xml_out,
"Forward_prop_correlator");
342 write(xml_out,
"forward_prop_corr", forward_prop_corr);
347 push(xml_out,
"ForwardPropHeaders");
348 write(xml_out,
"ForwardProp", forward_prop_header);
349 write(xml_out,
"PropSource", forward_source_header);
354 XMLReader backprop_file_xml, backprop_record_xml;
355 LatticePropagator backward_quark_prop;
359 QDPIO::cout <<
"Attempt to read backward propagator" << std::endl;
361 backprop_record_xml, backward_quark_prop,
368 read(backprop_record_xml,
"/Propagator/ForwardProp", backward_prop_header);
369 read(backprop_record_xml,
"/Propagator/PropSource", backward_source_header);
373 QDPIO::cerr <<
"Error extracting backward_prop header: " << e << std::endl;
377 QDPIO::cout <<
"Backward propagator successfully read" << std::endl;
382 QDPIO::cerr <<
"Wallformfac: wall_source flag false but not a wall source backward prop" << std::endl;
387 int t_sink = backward_source_header.
t_source;
395 multi1d<Double> backward_prop_corr = sumMulti(localNorm2(backward_quark_prop),
398 push(xml_out,
"Backward_prop_correlator");
399 write(xml_out,
"backward_prop_corr", backward_prop_corr);
404 push(xml_out,
"BackwardPropHeaders");
405 write(xml_out,
"ForwardProp", backward_prop_header);
406 write(xml_out,
"PropSource", backward_source_header);
434 Propagator forward_quark_x2;
440 LatticePropagator forward_quark_tmp = forward_quark_prop;
445 std::istringstream xml_s(backward_source_header.
source.
xml);
446 XMLReader sinktop(xml_s);
447 QDPIO::cout <<
"Source = " << backward_source_header.
source.
id << std::endl;
454 (*sinkSmearing)(forward_quark_tmp);
458 QDPIO::cerr <<
"wallformfac: Caught Exception creating sink smear: " << e << std::endl;
464 if (backward_source_header.
source.
id ==
"SHELL_SOURCE")
466 sink_smear2(
u, forward_quark_tmp,
467 backward_source_header.sourceSmearParam.wvf_kind,
468 backward_source_header.sourceSmearParam.wvf_param,
469 backward_source_header.sourceSmearParam.wvfIntPar,
475 multi1d<int> t_snk = backward_source_header.
getTSrce();
476 forward_quark_x2 = peekSite(forward_quark_tmp, t_snk);
482 forward_quark_x2 =
sum(forward_quark_prop, phases.
getSet()[t_sink]);
497 multi1d<std::string> wallformfac_names(7);
498 wallformfac_names[0] =
"PION";
499 wallformfac_names[1] =
"RHO";
500 wallformfac_names[2] =
"RHO_PI";
501 wallformfac_names[3] =
"NUCL";
502 wallformfac_names[4] =
"NUCL_CT";
503 wallformfac_names[5] =
"DELTA";
504 wallformfac_names[6] =
"DELTA_P";
511 push(xml_seq_src,
"Wilson_3Pt_fn_measurements");
514 <<
" kinds of form-factors" << std::endl;
517 for (
int formfac_ctr = 0; formfac_ctr < input.
param.
formfac_type.size(); ++formfac_ctr)
520 int formfac_value = int(formfac_type);
523 write(xml_seq_src,
"formfac_ctr", formfac_ctr);
524 write(xml_seq_src,
"formfac_value", formfac_value);
525 write(xml_seq_src,
"formfac_type", formfac_type);
527 form.
bar[formfac_ctr].formfac_value = formfac_value;
528 form.
bar[formfac_ctr].formfac_type = wallformfac_names[formfac_value];
530 QDPIO::cout <<
"Measurements for formfac_value = " << formfac_value << std::endl;
532 switch (formfac_type)
537 forward_quark_prop, backward_quark_prop,
538 forward_quark_prop, backward_quark_prop,
539 forward_quark_x2, forward_quark_x2,
547 forward_quark_prop, backward_quark_prop,
548 forward_quark_prop, backward_quark_prop,
549 forward_quark_x2, forward_quark_x2,
559 LatticePropagator qf_tmp = - (Gamma(7) * forward_quark_prop * Gamma(7));
560 LatticePropagator qb_tmp = - (Gamma(7) * backward_quark_prop * Gamma(7));
566 forward_quark_x2, forward_quark_x2,
576 forward_quark_prop, backward_quark_prop,
577 forward_quark_prop, backward_quark_prop,
578 forward_quark_x2, forward_quark_x2,
586 forward_quark_prop, backward_quark_prop,
587 forward_quark_prop, backward_quark_prop,
588 forward_quark_x2, forward_quark_x2,
596 forward_quark_prop, backward_quark_prop,
597 forward_quark_prop, backward_quark_prop,
598 forward_quark_x2, forward_quark_x2,
606 forward_quark_prop, backward_quark_prop,
607 forward_quark_prop, backward_quark_prop,
608 forward_quark_x2, forward_quark_x2,
614 QDPIO::cerr <<
"Unknown value of formfac_ctr " << formfac_ctr << std::endl;
627 BinaryFileWriter bin_out(
"wallformfac.dat");
628 write(bin_out, form);
Primary include file for CHROMA in application codes.
Class for counted reference semantics.
Fourier transform phase factor support.
const Set & getSet() const
The set to be used in sumMulti.
Concrete class for all gauge actions with simple boundary conditions.
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.
void unitarityCheck(const multi1d< LatticeColorMatrixF3 > &u)
Check the unitarity of color matrix in SU(N)
void gaugeStartup(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u, Cfg_t &cfg)
Initialize the gauge fields.
void wallRhoPiFormFac(WallFormFac_formfacs_t &form, const multi1d< LatticeColorMatrix > &u, const LatticePropagator &forw_u_prop, const LatticePropagator &back_u_prop, const LatticePropagator &forw_d_prop, const LatticePropagator &back_d_prop, const Propagator &u_x2, const Propagator &d_x2, const SftMom &phases, int t0, bool wall_source)
Wall-sink rho^+ <-> gamma+pi^+ form-factors.
void wallPionFormFac(WallFormFac_formfacs_t &form, const multi1d< LatticeColorMatrix > &u, const LatticePropagator &forw_u_prop, const LatticePropagator &back_u_prop, const LatticePropagator &forw_d_prop, const LatticePropagator &back_d_prop, const Propagator &u_x2, const Propagator &d_x2, const SftMom &phases, int t0, bool wall_source)
Compute contractions for current insertion 3-point functions.
void wallDeltaPFormFac(WallFormFac_formfacs_t &form, const multi1d< LatticeColorMatrix > &u, const LatticePropagator &forw_u_prop, const LatticePropagator &back_u_prop, const LatticePropagator &forw_d_prop, const LatticePropagator &back_d_prop, const Propagator &u_x2, const Propagator &d_x2, const SftMom &phases, int t0, bool wall_source)
Wall-sink delta <-> gamma+delta form-factors.
void wallDeltaFormFac(WallFormFac_formfacs_t &form, const multi1d< LatticeColorMatrix > &u, const LatticePropagator &forw_u_prop, const LatticePropagator &back_u_prop, const LatticePropagator &forw_d_prop, const LatticePropagator &back_d_prop, const Propagator &u_x2, const Propagator &d_x2, const SftMom &phases, int t0, bool wall_source)
Wall-sink delta-> gamma+delta form-factors.
void wallNuclFormFac(WallFormFac_formfacs_t &form, const multi1d< LatticeColorMatrix > &u, const LatticePropagator &forw_u_prop, const LatticePropagator &back_u_prop, const LatticePropagator &forw_d_prop, const LatticePropagator &back_d_prop, const Propagator &u_x2, const Propagator &d_x2, const SftMom &phases, int t0, bool wall_source)
Wall-sink nucleon-> gamma+nucleon form-factors.
void wallRhoFormFac(WallFormFac_formfacs_t &form, const multi1d< LatticeColorMatrix > &u, const LatticePropagator &forw_u_prop, const LatticePropagator &back_u_prop, const LatticePropagator &forw_d_prop, const LatticePropagator &back_d_prop, const Propagator &u_x2, const Propagator &d_x2, const SftMom &phases, int t0, bool wall_source)
Wall-sink rho-> gamma+rho form-factors.
void proginfo(XMLWriter &xml)
Print out basic information about this program.
Asqtad Staggered-Dirac operator.
QDP_error_exit("too many BiCG iterations", n_count, rsd_sq, cp, c, re_rvr, im_rvr, re_a, im_a, re_b, im_b)
static multi1d< LatticeColorMatrix > u
push(xml_out,"Condensates")
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
void finalize(void)
Chroma finalization routine.
void readQprop(XMLReader &file_xml, XMLReader &record_xml, LatticePropagator &quark_prop, const std::string &file, QDP_serialparallel_t serpar)
Read a Chroma propagator.
std::string getXMLInputFileName()
Get input file name.
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
XMLFileWriter & getXMLOutputInstance()
Get xml output instance.
Gauge configuration structure.
Propagator source construction parameters.
multi1d< int > getTSrce() const
Parameters for running program.
multi1d< WallFormFacType > formfac_type
std::string backprop_file
std::string forwprop_file