CHROMA
meson_spec_2pt_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Construct meson 2pt correlators leaving all spin indices open
4  */
5 
6 #ifndef __meson_spec_2pt_w_h__
7 #define __meson_spec_2pt_w_h__
8 
9 #error "STILL WORKING ON THIS"
10 
11 #include "meas/hadron/hadron_2pt.h"
12 
13 namespace Chroma
14 {
15 
16  //! Name and registration
17  /*! @ingroup hadron */
18  namespace MesonSpec2PtEnv
19  {
20  bool registerAll();
21 
22 
23  //! Simple meson 2pt parameters
24  /*! @ingroup hadron */
25  struct Params
26  {
27  Params();
28  Params(XMLReader& in, const std::string& path);
29  void writeXML(XMLWriter& in, const std::string& path) const;
30 
31  int mom2_max; /*!< (mom - mom_origin)^2 <= mom2_max */
32  multi1d<int> mom_origin; /*!< Origin for the momentum */
33  bool avg_equiv_mom; /*!< average over equivalent momenta */
34 
35  std::string first_id; /*!< First/light quark id */
36  std::string second_id; /*!< Second/heavy quark id */
37  };
38 
39 
40  //! 2pt-mesons but with all 4 spin indices open
41  /*! @ingroup hadron
42  *
43  * Contract mesons but leave source and sink spin indices open
44  */
46  {
47  public:
48  //! Full constructor
49  MesonSpecCorrs(const Params& p) : params(p) {}
50 
51  //! Default destructor
53 
54  //! Construct the correlators
55  std::list< Handle<HadronContractResult_t> > operator()(const multi1d<LatticeColorMatrix>& u,
56  const std::string& xml_group,
57  const std::string& id_tag);
58 
59  protected:
60  private:
61  //! Hide partial constructor
63 
64  private:
65  Params params; /*!< The common params */
66  };
67 
68  } // end namespace
69 
70 
71  //! Reader
72  /*! @ingroup hadron */
73  void read(XMLReader& xml, const std::string& path, MesonSpec2PtEnv::Params& param);
74 
75  //! Writer
76  /*! @ingroup hadron */
77  void write(XMLWriter& xml, const std::string& path, const MesonSpec2PtEnv::Params& param);
78 
79 
80 } // end namespace Chroma
81 
82 #endif
Construct hadron 2pt correlators.
Definition: hadron_2pt.h:50
2pt-mesons but with all 4 spin indices open
MesonSpecCorrs()
Hide partial constructor.
MesonSpecCorrs(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