25 namespace InlineStaticLightSpecEnv
59 XMLReader paramtop(xml, path);
62 read(paramtop,
"version", version);
70 QDPIO::cerr <<
"Input parameter version " << version <<
" unsupported." << std::endl;
88 write(xml,
"version", version);
102 XMLReader inputtop(xml, path);
123 XMLReader inputtop(xml, path);
151 XMLReader paramtop(xml_in, path);
153 if (paramtop.count(
"Frequency") == 1)
165 if (paramtop.count(
"xml_file") != 0)
172 QDPIO::cerr << __func__ <<
": Caught Exception reading XML: " << e << std::endl;
196 struct SinkPropContainer_t
212 struct AllSinkProps_t
220 void readSinkProp(SinkPropContainer_t&
s,
const std::string&
id)
225 const LatticePropagator& foo =
229 s.quark_propagator_id = id;
232 XMLReader prop_file_xml, prop_record_xml;
240 read(prop_record_xml,
"/SinkSmear",
s.prop_header);
242 read(prop_record_xml,
"/SinkSmear/PropSource/Source/SourceType",
s.source_type);
243 xpath =
"/SinkSmear/PropSource/Source/Displacement/DisplacementType";
244 if (prop_record_xml.count(xpath) != 0)
245 read(prop_record_xml, xpath,
s.source_disp_type);
249 read(prop_record_xml,
"/SinkSmear/PropSink/Sink/SinkType",
s.sink_type);
250 xpath =
"/SinkSmear/PropSink/Sink/Displacement/DisplacementType";
251 if (prop_record_xml.count(xpath) != 0)
252 read(prop_record_xml, xpath,
s.sink_disp_type);
257 catch( std::bad_cast )
275 QDPIO::cout <<
"Try action and mass" << std::endl;
276 s.Mass =
getMass(
s.prop_header.prop_header.fermact);
279 QDPIO::cout <<
"FermAct = " <<
s.prop_header.prop_header.fermact.id << std::endl;
280 QDPIO::cout <<
"Mass = " <<
s.Mass << std::endl;
285 void readAllSinks(AllSinkProps_t&
s,
286 InlineStaticLightSpecParams::NamedObject_t::Props_t sink_pair)
288 QDPIO::cout <<
"Attempt to parse forward propagator = " << sink_pair.first_id << std::endl;
289 readSinkProp(
s.sink_prop_1, sink_pair.first_id);
290 QDPIO::cout <<
"Forward propagator successfully parsed" << std::endl;
292 QDPIO::cout <<
"Attempt to parse forward propagator = " << sink_pair.second_id << std::endl;
293 readSinkProp(
s.sink_prop_2, sink_pair.second_id);
294 QDPIO::cout <<
"Forward propagator successfully parsed" << std::endl;
311 push(xml_out,
"StaticLightSpec");
312 write(xml_out,
"update_no", update_no);
313 write(xml_out,
"xml_file", xml_file);
316 XMLFileWriter xml(xml_file);
317 func(update_no, xml);
321 func(update_no, xml_out);
338 XMLBufferWriter gauge_xml;
344 catch( std::bad_cast )
356 const multi1d<LatticeColorMatrix>&
u =
359 push(xml_out,
"StaticLightSpec");
360 write(xml_out,
"update_no", update_no);
362 QDPIO::cout <<
" StaticLightSpec: Spectroscopy for Wilson-like fermions" ;
363 QDPIO::cout << std::endl;
364 QDPIO::cout << std::endl <<
" Gauge group: SU(" << Nc <<
")" << std::endl;
365 QDPIO::cout <<
" volume: " << Layout::lattSize()[0];
366 for (
int i=1;
i<
Nd; ++
i) {
367 QDPIO::cout <<
" x " << Layout::lattSize()[
i];
369 QDPIO::cout << std::endl;
377 write(xml_out,
"Config_info", gauge_xml);
379 push(xml_out,
"Output_version");
380 write(xml_out,
"out_version", 14);
385 MesPlq(xml_out,
"Observables",
u);
388 push(xml_out,
"Wilson_hadron_measurements");
395 push(xml_out,
"elem");
397 AllSinkProps_t all_sinks;
398 readAllSinks(all_sinks, named_obj);
402 = all_sinks.sink_prop_1.prop_header.source_header.getTSrce();
404 = all_sinks.sink_prop_2.prop_header.source_header.getTSrce();
406 int j_decay = all_sinks.sink_prop_1.prop_header.source_header.j_decay;
407 int t0 = all_sinks.sink_prop_1.prop_header.source_header.t_source;
412 if (all_sinks.sink_prop_2.prop_header.source_header.j_decay !=
j_decay)
414 QDPIO::cerr <<
"Error!! j_decay must be the same for all propagators " << std::endl;
419 QDPIO::cerr <<
"Error!! bc must be the same for all propagators " << std::endl;
422 if (all_sinks.sink_prop_2.prop_header.source_header.t_source !=
423 all_sinks.sink_prop_1.prop_header.source_header.t_source)
425 QDPIO::cerr <<
"Error!! t_source must be the same for all propagators " << std::endl;
428 if (all_sinks.sink_prop_1.source_type != all_sinks.sink_prop_2.source_type)
430 QDPIO::cerr <<
"Error!! source_type must be the same in a pair " << std::endl;
433 if (all_sinks.sink_prop_1.sink_type != all_sinks.sink_prop_2.sink_type)
435 QDPIO::cerr <<
"Error!! source_type must be the same in a pair " << std::endl;
442 write(xml_out,
"Mass_1", all_sinks.sink_prop_1.Mass);
443 write(xml_out,
"Mass_2", all_sinks.sink_prop_2.Mass);
450 push(xml_out,
"Forward_prop_headers");
451 write(xml_out,
"First_forward_prop", all_sinks.sink_prop_1.prop_header);
452 write(xml_out,
"Second_forward_prop", all_sinks.sink_prop_2.prop_header);
457 push(xml_out,
"Forward_prop_correlator");
470 push(xml_out,
"SourceSinkType");
472 QDPIO::cout <<
"Source_type_1 = " << all_sinks.sink_prop_1.source_type << std::endl;
473 QDPIO::cout <<
"Sink_type_1 = " << all_sinks.sink_prop_1.sink_type << std::endl;
474 QDPIO::cout <<
"Source_type_2 = " << all_sinks.sink_prop_2.source_type << std::endl;
475 QDPIO::cout <<
"Sink_type_2 = " << all_sinks.sink_prop_2.sink_type << std::endl;
477 write(xml_out,
"source_type_1", all_sinks.sink_prop_1.source_type);
478 write(xml_out,
"source_disp_type_1", all_sinks.sink_prop_1.source_disp_type);
479 write(xml_out,
"sink_type_1", all_sinks.sink_prop_1.sink_type);
480 write(xml_out,
"sink_disp_type_1", all_sinks.sink_prop_1.sink_disp_type);
482 write(xml_out,
"source_type_2", all_sinks.sink_prop_2.source_type);
483 write(xml_out,
"source_disp_type_2", all_sinks.sink_prop_2.source_disp_type);
484 write(xml_out,
"sink_type_2", all_sinks.sink_prop_2.sink_type);
485 write(xml_out,
"sink_disp_type_2", all_sinks.sink_prop_2.sink_disp_type);
499 if (all_sinks.sink_prop_1.source_type ==
"POINT_SOURCE")
501 else if (all_sinks.sink_prop_1.source_type ==
"SHELL_SOURCE")
503 else if (all_sinks.sink_prop_1.source_type ==
"WALL_SOURCE")
507 QDPIO::cerr <<
"Unsupported source type = " << all_sinks.sink_prop_1.source_type << std::endl;
512 if (all_sinks.sink_prop_1.sink_type ==
"POINT_SINK")
514 else if (all_sinks.sink_prop_1.sink_type ==
"SHELL_SINK")
516 else if (all_sinks.sink_prop_1.sink_type ==
"WALL_SINK")
520 QDPIO::cerr <<
"Unsupported sink type = " << all_sinks.sink_prop_1.sink_type << std::endl;
524 std::string source_sink_type = src_type +
"_" + snk_type;
525 QDPIO::cout <<
"Source type = " << src_type << std::endl;
526 QDPIO::cout <<
"Sink type = " << snk_type << std::endl;
531 Qlbar(
u,
sink_prop_1, t_src1, phases, xml_out, source_sink_type +
"_Wilson_Qlmeson");
532 if(all_sinks.sink_prop_1.quark_propagator_id!=all_sinks.sink_prop_2.quark_propagator_id)
533 Qlbar(
u,
sink_prop_2, t_src2, phases, xml_out, source_sink_type +
"_Wilson_Qlmeson");
549 xml_out, source_sink_type +
"_Wilson_QlQlPotential");
555 xml_out, source_sink_type +
"_Wilson_QllQllPotential");
566 << snoop.getTimeInSeconds()
567 <<
" secs" << std::endl;
Inline measurement factory.
Heavy Baryon (Qll) 2-pt function : Orginos and Savage.
Inline measurement of static-light quark spectroscopy.
InlineStaticLightSpecParams params
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
Fourier transform phase factor support.
const Set & getSet() const
The set to be used in sumMulti.
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 QlQlPOT(const multi1d< LatticeColorMatrix > &u, const LatticePropagator &quark1, const LatticePropagator &quark2, const multi1d< int > &src1, const multi1d< int > &src2, const SftMom &phases, XMLWriter &xml, const std::string &xml_group)
Heavy-light meson potential.
void Qll(const multi1d< LatticeColorMatrix > &u, const LatticePropagator &quark_prop1, const LatticePropagator &quark_prop2, const multi1d< int > &src_coord, const SftMom &phases, XMLWriter &xml, const std::string &xml_group)
Lambdaq and SigmaQ 2-pt functions.
void QllQllPOT(const multi1d< LatticeColorMatrix > &u, const LatticePropagator &quark1, const LatticePropagator &quark2, const multi1d< int > &src1, const multi1d< int > &src2, const SftMom &phases, XMLWriter &xml, const std::string &xml_group)
Heavy hadron potentials for SU(2) isospin limit.
void Qlbar(const multi1d< LatticeColorMatrix > &u, const LatticePropagator &quark_propagator, const multi1d< int > &src_coord, const SftMom &phases, XMLWriter &xml, const std::string &xml_group, const int bc)
Heavy-light meson 2-pt function.
void proginfo(XMLWriter &xml)
Print out basic information about this program.
std::string makeXMLFileName(std::string xml_file, unsigned long update_no)
Return a xml file name for inline measurements.
Potential between 2 heavy hadrons : Detmold.
std::string source_disp_type
std::string quark_propagator_id
SinkPropContainer_t sink_prop_2
SinkPropContainer_t sink_prop_1
ForwardProp_t prop_header
std::string sink_disp_type
Inline static light spectrum calculations.
Potential between 2 heavy mesons : Orginos and Savage.
Heavy light meson (Qlbar) 2-pt function : Orginos and Savage.
Named object function std::map.
static bool registered
Local registration flag.
bool registerAll()
Register all the factories.
std::string getName()
Return the name.
Asqtad Staggered-Dirac operator.
Real getMass(const GroupXML_t &fermact)
Given a fermion action in std::string form, return the Mass.
static multi1d< LatticeColorMatrix > u
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > const multi1d< Real > & Mass
push(xml_out,"Condensates")
multi1d< int > getFermActBoundary(const GroupXML_t &fermact)
Given a fermion action in std::string form, return the boundary.
void MesPlq(const multi1d< LatticeColorMatrixF3 > &u, multi2d< Double > &plane_plaq, Double &link)
void write(XMLWriter &xml, const std::string &path, const InlineStaticLightSpecParams::NamedObject_t &input)
Propagator output.
multi1d< LatticeFermion > s(Ncb)
Various parameter structs and reader/writers.
Print out basic info about this program.
Routines associated with Chroma propagator IO.
Fourier transform phase factor support.
multi1d< Props_t > sink_pairs
void write(XMLWriter &xml_out, const std::string &path)
struct Chroma::InlineStaticLightSpecParams::Param_t param
InlineStaticLightSpecParams()
struct Chroma::InlineStaticLightSpecParams::NamedObject_t named_obj