CHROMA
simple_meson_2pt_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Construct meson 2pt correlators.
4  */
5 
6 #ifndef __simple_meson_2pt_w_h__
7 #define __simple_meson_2pt_w_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Name and registration
15  /*! @ingroup hadron */
16  namespace SimpleMeson2PtEnv
17  {
18  bool registerAll();
19 
20 
21  //! Simple meson 2pt parameters
22  /*! @ingroup hadron */
23  struct Params
24  {
25  Params();
26  Params(XMLReader& in, const std::string& path);
27  void writeXML(XMLWriter& in, const std::string& path) const;
28 
29  int mom2_max; /*!< (mom - mom_origin)^2 <= mom2_max */
30  multi1d<int> mom_origin; /*!< Origin for the momentum */
31  bool avg_equiv_mom; /*!< average over equivalent momenta */
32 
33  std::string first_id; /*!< First/light quark id */
34  std::string second_id; /*!< Second/heavy quark id */
35  };
36 
37 
38  //! Simple meson 2pt construction - all simple mesons
39  /*! @ingroup hadron
40  *
41  * Create all the 16 (Ns=4) simple diagonal meson 2pt correlators
42  */
44  {
45  public:
46  //! Full constructor
48 
49  //! Default destructor
51 
52  //! Construct the correlators
53  std::list< Handle<HadronContractResult_t> > operator()(const multi1d<LatticeColorMatrix>& u,
54  const std::string& xml_group,
55  const std::string& id_tag);
56 
57  private:
58  //! Hide partial constructor
60 
61  private:
62  Params params; /*!< The common params */
63  };
64 
65  } // end namespace
66 
67 
68  //! Reader
69  /*! @ingroup hadron */
70  void read(XMLReader& xml, const std::string& path, SimpleMeson2PtEnv::Params& param);
71 
72  //! Writer
73  /*! @ingroup hadron */
74  void write(XMLWriter& xml, const std::string& path, const SimpleMeson2PtEnv::Params& param);
75 
76 
77 } // end namespace Chroma
78 
79 #endif
Construct hadron 2pt correlators.
Definition: hadron_2pt.h:50
Simple meson 2pt construction - all simple mesons.
DiagGammaMesonCorrs(const Params &p)
Full constructor.
std::list< Handle< HadronContractResult_t > > operator()(const multi1d< LatticeColorMatrix > &u, const std::string &xml_group, const std::string &id_tag)
Construct the correlators.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams &param)
Writer parameters.
Construct hadron 2pt correlators.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Simple meson 2pt parameters.
void writeXML(XMLWriter &in, const std::string &path) const