CHROMA
inline_genprop_matelem_da_colorvec_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 /*! \file
4  * \brief Compute the matrix element of LatticeColorVector*M^-1*Gamma*displace*M^-1**LatticeColorVector
5  *
6  * Generalized propagator calculation on a colorstd::vector for meson distribution amplitudes and parton dstribution functions
7  */
8 
9 #ifndef __inline_genprop_matelem_da_colorvec_h__
10 #define __inline_genprop_matelem_da_colorvec_h__
11 
13 #include "io/xml_group_reader.h"
14 
15 namespace Chroma
16 {
17  /*! \ingroup inlinehadron */
18  namespace InlineGenPropMatElemDAColorVecEnv
19  {
20  bool registerAll();
21 
22  //! Parameter structure
23  /*! \ingroup inlinehadron */
24  struct Params
25  {
26  Params();
27  Params(XMLReader& xml_in, const std::string& path);
28  void writeXML(XMLWriter& xml_out, const std::string& path) const;
29 
30  unsigned long frequency;
31 
32  struct Param_t
33  {
34  int t_source ; /*!< Source time slice for props */
35  int t_sink ; /*!< Sink time slice for props */
36  int mom_max ; /*!< (mom) <= mom_max */
37  int boost_dir ; /*!< Direction of the boost */
38  int num_vecs ; /*!< Number of color vectors to use */
39  int decay_dir ; /*!< Decay direction */
40  std::string mass_label ; /*!< Some kind of mass label */
41  int gamma ; /*!< The gamma matrix for this displacement */
43  };
44 
46  {
47  std::string gauge_id; /*!< Gauge field */
48  std::string sm_gauge_id; /*!< smeared Gauge field */
49  std::string source_prop_id; /*!< Id for input propagator solutions */
50  std::string sink_prop_id; /*!< Id for input propagator solutions */
51  std::string genprop_op_file; /*!< File for generalized propagators operators */
52  };
53 
54  Param_t param; /*!< Parameters */
55  NamedObject_t named_obj; /*!< Named objects */
56  std::string xml_file; /*!< Alternate XML file pattern */
57  };
58 
59 
60  //! Compute the matrix element of LatticeColorVector*M^-1*Gamma*M^-1**LatticeColorVector
61  /*! \ingroup inlinehadron */
63  {
64  public:
66  InlineMeas(const Params& p) : params(p) {}
68 
69  unsigned long getFrequency(void) const {return params.frequency;}
70 
71  //! Do the measurement
72  void operator()(const unsigned long update_no,
73  XMLWriter& xml_out);
74 
75  protected:
76  //! Do the measurement
77  void func(const unsigned long update_no,
78  XMLWriter& xml_out);
79 
80  private:
82  };
83 
84  } // namespace InlineGenPropMatElemDAColorVecEnv
85 }
86 
87 #endif
Abstract inline measurements.
Compute the matrix element of LatticeColorVector*M^-1*Gamma*M^-1**LatticeColorVector.
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
unsigned long getFrequency(void) const
Tell me how often I should measure this beastie.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
void writeXML(XMLWriter &xml_out, const std::string &path) const
Read an XML group as a std::string.