CHROMA
simple_meson_seqsrc_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Construct meson sequential sources.
4  */
5 
6 #ifndef __simple_meson_seqsrc_w_h__
7 #define __simple_meson_seqsrc_w_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Name and registration
15  /*! @ingroup hadron */
16  namespace SimpleMesonSeqSourceEnv
17  {
18  bool registerAll();
19 
20 
21  //! Simple meson sequential source 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  multi1d<int> sink_mom; /*!< sink momentum */
30  int t_sink; /*!< time slice of sink */
31  int j_decay; /*!< Decay direction */
32  };
33 
34 
35  //! Simple meson sequential source construction
36  /*! @ingroup hadron
37  *
38  * Create a simple meson sequential propagator source
39  */
41  {
42  public:
43  //! Full constructor
44  SimpleMesonSeqSource(const Params& p, int gamma) : params(p), gamma_sink(gamma) {}
45 
46  //! Default destructor
48 
49  //! Construct the source
50  /*!
51  * \param u gauge field ( Read )
52  * \param forward_props array of quark propagators ( Read )
53  * \param forward_headers corresponding array of quark propagators ( Read )
54  *
55  * \return \f$\gamma_5 * \Gamma(gamma_sink)^dag * \gamma_5 * F\$
56  */
57  LatticePropagator operator()(const multi1d<LatticeColorMatrix>& u,
58  const multi1d<ForwardProp_t>& forward_headers,
59  const multi1d<LatticePropagator>& forward_props);
60 
61  //! Compute the 2-pt at the sink
62  Complex twoPtSink(const multi1d<LatticeColorMatrix>& u,
63  const multi1d<ForwardProp_t>& forward_headers,
64  const multi1d<LatticePropagator>& forward_props,
65  int gamma_insertion);
66 
67  protected:
68  //! Set t_srce
69  multi1d<int>& getTSrce() {return t_srce;}
70 
71  //! Get t_srce
72  const multi1d<int>& getTSrce() const {return t_srce;}
73 
74  //! Get t_sink
75  int getTSink() const {return params.t_sink;}
76 
77  //! Get sink_mom
78  const multi1d<int>& getSinkMom() const {return params.sink_mom;}
79 
80  //! Get decay_dir
81  int getDecayDir() const {return params.j_decay;}
82 
83  private:
84  //! Hide partial constructor
86 
87  private:
88  multi1d<int> t_srce; /*<! Must come from propagator headers */
89  Params params; /*!< Seqsource params */
90  int gamma_sink; /*!< The gamma matrix at the sink */
91  };
92 
93 
94  //! Simple meson sequential source construction
95  /*! @ingroup hadron
96  *
97  * Create a simple meson sequential propagator source
98  */
100  {
101  public:
102  //! Full constructor
104 
105  //! Default destructor
107 
108  //! Construct the source
109  /*!
110  * \param u gauge field ( Read )
111  * \param forward_props array of quark propagators ( Read )
112  * \param forward_headers corresponding array of quark propagators ( Read )
113  *
114  * \return \f$\gamma_5 * \Gamma(15)^dag * \gamma_5 * F * \gamma_5\$
115  */
116  LatticePropagator operator()(const multi1d<LatticeColorMatrix>& u,
117  const multi1d<ForwardProp_t>& forward_headers,
118  const multi1d<LatticePropagator>& forward_props);
119 
120  //! Compute the 2-pt at the sink
121  Complex twoPtSink(const multi1d<LatticeColorMatrix>& u,
122  const multi1d<ForwardProp_t>& forward_headers,
123  const multi1d<LatticePropagator>& forward_props,
124  int gamma_insertion);
125 
126  protected:
127  //! Set t_srce
128  multi1d<int>& getTSrce() {return t_srce;}
129 
130  //! Get t_srce
131  const multi1d<int>& getTSrce() const {return t_srce;}
132 
133  //! Get t_sink
134  int getTSink() const {return params.t_sink;}
135 
136  //! Get sink_mom
137  const multi1d<int>& getSinkMom() const {return params.sink_mom;}
138 
139  //! Get decay_dir
140  int getDecayDir() const {return params.j_decay;}
141 
142  private:
143  //! Hide partial constructor
144  PionPionSeqSource() {}
145 
146  private:
147  multi1d<int> t_srce; /*<! Must come from propagator headers */
148  Params params; /*!< Seqsource params */
149  };
150 
151  } // end namespace
152 
153 
154  //! Reader
155  /*! @ingroup hadron */
156  void read(XMLReader& xml, const std::string& path, SimpleMesonSeqSourceEnv::Params& param);
157 
158  //! Writer
159  /*! @ingroup hadron */
160  void write(XMLWriter& xml, const std::string& path, const SimpleMesonSeqSourceEnv::Params& param);
161 
162 
163 } // end namespace Chroma
164 
165 #endif
virtual const multi1d< int > & getSinkMom() const=0
Get sink_mom.
virtual int getDecayDir() const=0
Get decay_dir.
virtual Complex twoPtSink(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props, int gamma_insertion)=0
Compute the 2-pt at the sink.
virtual multi1d< int > & getTSrce()=0
Set t_srce.
virtual int getTSink() const=0
Get t_sink.
Base class for meson sequential source construction.
virtual LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)=0
Construct the source.
Simple meson sequential source construction.
SimpleMesonSeqSource(const Params &p, int gamma)
Full constructor.
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.
multi1d< int > t_srce
Params params
Construct meson sequential sources.
multi1d< ForwardProp_t > & forward_headers
Register all the factories bool registerAll()
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 sequential source parameters.
void writeXML(XMLWriter &in, const std::string &path) const