CHROMA
inline_mesonspec_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Inline meson spectrum calculations
4  *
5  * Meson spectrum calculations
6  */
7 
8 #ifndef __inline_mesonspec_h__
9 #define __inline_mesonspec_h__
10 
11 #include "chromabase.h"
13 #include "io/xml_group_reader.h"
14 
15 namespace Chroma
16 {
17  /*! \ingroup inlinehadron */
18  namespace InlineMesonSpecEnv
19  {
20  extern const std::string name;
21  bool registerAll();
22  }
23 
24  //! Parameter structure
25  /*! \ingroup inlinehadron */
27  {
29  InlineMesonSpecParams(XMLReader& xml_in, const std::string& path);
30  void write(XMLWriter& xml_out, const std::string& path);
31 
32  unsigned long frequency;
33 
34  struct Param_t
35  {
36  int mom2_max; /*!< (mom)^2 <= mom2_max. mom2_max=7 in szin. */
37  bool avg_equiv_mom; /*!< average over equivalent momenta */
38  } param;
39 
41  {
43 
45  {
46  std::string source_particle; /*!< String to associate with the source */
47  std::string source_wavetype; /*!< String to associate with the source */
48  std::string sink_particle; /*!< String to associate with the sink */
49  std::string sink_wavetype; /*!< String to associate with the sink */
50 
52  {
53  std::string first_id; /*!< first quark */
54  std::string second_id; /*!< second quark (this one is adjointed) */
55 
56  GroupXML_t source_spin_insertion; /*!< xml std::string holding source spin insertion params */
57  GroupXML_t sink_spin_insertion; /*!< xml std::string holding sink spin insertion params */
58 
59  Real factor;
60  };
61 
62  multi1d<CorrelatorTerms_t> correlator_terms;
63  };
64 
65  multi1d<Correlators_t> correlators;
67 
68  std::string xml_file; // Alternate XML file pattern
69  };
70 
71 
72  //! Inline measurement of meson 2-pt functions
73  /*! \ingroup inlinehadron */
75  {
76  public:
80 
81  unsigned long getFrequency(void) const {return params.frequency;}
82 
83  //! Do the measurement
84  void operator()(const unsigned long update_no,
85  XMLWriter& xml_out);
86 
87  protected:
88  //! Do the measurement
89  void func(const unsigned long update_no,
90  XMLWriter& xml_out);
91 
92  private:
94  };
95 
96 }
97 
98 #endif
Abstract inline measurements.
Primary include file for CHROMA library code.
Inline measurement of meson 2-pt functions.
InlineMesonSpecParams params
void operator()(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
InlineMesonSpec(const InlineMesonSpec &p)
void func(const unsigned long update_no, XMLWriter &xml_out)
Do the measurement.
InlineMesonSpec(const InlineMesonSpecParams &p)
unsigned long getFrequency(void) const
Tell me how often I should measure this beastie.
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Hold group xml and type id.
struct Chroma::InlineMesonSpecParams::NamedObject_t named_obj
void write(XMLWriter &xml_out, const std::string &path)
struct Chroma::InlineMesonSpecParams::Param_t param
Read an XML group as a std::string.