CHROMA
simple_baryon_seqsrc_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Construct baryon sequential sources.
4  */
5 
6 #ifndef __simple_baryon_seqsrc_w_h__
7 #define __simple_baryon_seqsrc_w_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Name and registration
15  /*! @ingroup hadron */
16  namespace SimpleBaryonSeqSourceEnv
17  {
18  bool registerAll();
19 
20 
21  //! Simple baryon 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  //! Nucleon-Nucleon U piece with general projector and Cg5
36  /*! @ingroup hadron
37  *
38  * Create a simple baryon sequential propagator source
39  */
41  {
42  public:
43  //! Full constructor
44  BarNuclUTCg5(const Params& p, const SpinMatrix& spinT, const SpinMatrix& spinCg5) :
45  params(p), T(spinT), Cg5(spinCg5) {}
46 
47  //! Default destructor
49 
50  //! Construct the source
51  LatticePropagator operator()(const multi1d<LatticeColorMatrix>& u,
52  const multi1d<ForwardProp_t>& forward_headers,
53  const multi1d<LatticePropagator>& forward_props);
54 
55  //! Compute the 2-pt at the sink
56  Complex twoPtSink(const multi1d<LatticeColorMatrix>& u,
57  const multi1d<ForwardProp_t>& forward_headers,
58  const multi1d<LatticePropagator>& forward_props,
59  int gamma_insertion);
60 
61  protected:
62  //! Set bc
63  multi1d<int>& getBC() {return bc;}
64 
65  //! Get bc
66  const multi1d<int>& getBC() const {return bc;}
67 
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  multi1d<int> bc; /*<! Must come from propagator headers */
90  Params params; /*!< Seqsource params */
91  SpinMatrix T; /*!< The spin projector matrix */
92  SpinMatrix Cg5; /*!< The Cg5 at the source and sink */
93  };
94 
95 
96  //! Nucleon-Nucleon D piece with general projector and Cg5
97  /*! @ingroup hadron
98  *
99  * Create a simple baryon sequential propagator source
100  */
102  {
103  public:
104  //! Full constructor
105  BarNuclDTCg5(const Params& p, const SpinMatrix& spinT, const SpinMatrix& spinCg5) :
106  params(p), T(spinT), Cg5(spinCg5) {}
107 
108  //! Default destructor
110 
111  //! Construct the source
112  LatticePropagator operator()(const multi1d<LatticeColorMatrix>& u,
113  const multi1d<ForwardProp_t>& forward_headers,
114  const multi1d<LatticePropagator>& forward_props);
115 
116  //! Compute the 2-pt at the sink
117  Complex twoPtSink(const multi1d<LatticeColorMatrix>& u,
118  const multi1d<ForwardProp_t>& forward_headers,
119  const multi1d<LatticePropagator>& forward_props,
120  int gamma_insertion);
121 
122  protected:
123  //! Set bc
124  multi1d<int>& getBC() {return bc;}
125 
126  //! Get bc
127  const multi1d<int>& getBC() const {return bc;}
128 
129  //! Set t_srce
130  multi1d<int>& getTSrce() {return t_srce;}
131 
132  //! Get t_srce
133  const multi1d<int>& getTSrce() const {return t_srce;}
134 
135  //! Get t_sink
136  int getTSink() const {return params.t_sink;}
137 
138  //! Get sink_mom
139  const multi1d<int>& getSinkMom() const {return params.sink_mom;}
140 
141  //! Get decay_dir
142  int getDecayDir() const {return params.j_decay;}
143 
144  private:
145  //! Hide partial constructor
147 
148  private:
149  multi1d<int> t_srce; /*<! Must come from propagator headers */
150  multi1d<int> bc; /*<! Must come from propagator headers */
151  Params params; /*!< Seqsource params */
152  SpinMatrix T; /*!< The spin projector matrix */
153  SpinMatrix Cg5; /*!< The Cg5 at the source and sink */
154  };
155 
156 
157  //! Delta+ - Delta+ U piece with general projector and spin matrix
158  /*! @ingroup hadron
159  *
160  * Create a simple baryon sequential propagator source
161  */
163  {
164  public:
165  //! Full constructor
166  BarDeltaUTsp(const Params& p, const SpinMatrix& spinT, const SpinMatrix& spinSP) :
167  params(p), T(spinT), sp(spinSP) {}
168 
169  //! Default destructor
171 
172  //! Construct the source
173  LatticePropagator operator()(const multi1d<LatticeColorMatrix>& u,
174  const multi1d<ForwardProp_t>& forward_headers,
175  const multi1d<LatticePropagator>& forward_props);
176 
177  //! Compute the 2-pt at the sink
178  Complex twoPtSink(const multi1d<LatticeColorMatrix>& u,
179  const multi1d<ForwardProp_t>& forward_headers,
180  const multi1d<LatticePropagator>& forward_props,
181  int gamma_insertion);
182 
183  protected:
184  //! Set bc
185  multi1d<int>& getBC() {return bc;}
186 
187  //! Get bc
188  const multi1d<int>& getBC() const {return bc;}
189 
190  //! Set t_srce
191  multi1d<int>& getTSrce() {return t_srce;}
192 
193  //! Get t_srce
194  const multi1d<int>& getTSrce() const {return t_srce;}
195 
196  //! Get t_sink
197  int getTSink() const {return params.t_sink;}
198 
199  //! Get sink_mom
200  const multi1d<int>& getSinkMom() const {return params.sink_mom;}
201 
202  //! Get decay_dir
203  int getDecayDir() const {return params.j_decay;}
204 
205  private:
206  //! Hide partial constructor
208 
209  private:
210  multi1d<int> t_srce; /*<! Must come from propagator headers */
211  multi1d<int> bc; /*<! Must come from propagator headers */
212  Params params; /*!< Seqsource params */
213  SpinMatrix T; /*!< The spin projector matrix */
214  SpinMatrix sp; /*!< The spin at the source and sink */
215  };
216 
217  //! Delta+ - Delta+ D piece with general projector and spin matrix
218  /*! @ingroup hadron
219  *
220  * Create a simple baryon sequential propagator source
221  */
223  {
224  public:
225  //! Full constructor
226  BarDeltaDTsp(const Params& p, const SpinMatrix& spinT, const SpinMatrix& spinSP) :
227  params(p), T(spinT), sp(spinSP) {}
228 
229  //! Default destructor
231 
232  //! Construct the source
233  LatticePropagator operator()(const multi1d<LatticeColorMatrix>& u,
234  const multi1d<ForwardProp_t>& forward_headers,
235  const multi1d<LatticePropagator>& forward_props);
236 
237  //! Compute the 2-pt at the sink
238  Complex twoPtSink(const multi1d<LatticeColorMatrix>& u,
239  const multi1d<ForwardProp_t>& forward_headers,
240  const multi1d<LatticePropagator>& forward_props,
241  int gamma_insertion);
242 
243  protected:
244  //! Set bc
245  multi1d<int>& getBC() {return bc;}
246 
247  //! Get bc
248  const multi1d<int>& getBC() const {return bc;}
249 
250  //! Set t_srce
251  multi1d<int>& getTSrce() {return t_srce;}
252 
253  //! Get t_srce
254  const multi1d<int>& getTSrce() const {return t_srce;}
255 
256  //! Get t_sink
257  int getTSink() const {return params.t_sink;}
258 
259  //! Get sink_mom
260  const multi1d<int>& getSinkMom() const {return params.sink_mom;}
261 
262  //! Get decay_dir
263  int getDecayDir() const {return params.j_decay;}
264 
265  private:
266  //! Hide partial constructor
268 
269  private:
270  multi1d<int> t_srce; /*<! Must come from propagator headers */
271  multi1d<int> bc; /*<! Must come from propagator headers */
272  Params params; /*!< Seqsource params */
273  SpinMatrix T; /*!< The spin projector matrix */
274  SpinMatrix sp; /*!< The spin at the source and sink */
275  };
276 
277  } // end namespace
278 
279 
280  //! Reader
281  /*! @ingroup hadron */
282  void read(XMLReader& xml, const std::string& path, SimpleBaryonSeqSourceEnv::Params& param);
283 
284  //! Writer
285  /*! @ingroup hadron */
286  void write(XMLWriter& xml, const std::string& path, const SimpleBaryonSeqSourceEnv::Params& param);
287 
288 } // end namespace Chroma
289 
290 
291 #endif
Construct baryon sequential sources.
Baryon-Baryon seqsources have a time order phase.
Delta+ - Delta+ D piece with general projector and spin matrix.
const multi1d< int > & getBC() const
Get bc.
const multi1d< int > & getSinkMom() const
Get sink_mom.
const multi1d< int > & getTSrce() const
Get t_srce.
Complex twoPtSink(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props, int gamma_insertion)
Compute the 2-pt at the sink.
BarDeltaDTsp(const Params &p, const SpinMatrix &spinT, const SpinMatrix &spinSP)
Full constructor.
LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)
Construct the source.
Delta+ - Delta+ U piece with general projector and spin matrix.
const multi1d< int > & getTSrce() const
Get t_srce.
BarDeltaUTsp(const Params &p, const SpinMatrix &spinT, const SpinMatrix &spinSP)
Full constructor.
const multi1d< int > & getSinkMom() const
Get sink_mom.
LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)
Construct the source.
const multi1d< int > & getBC() const
Get bc.
Complex twoPtSink(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props, int gamma_insertion)
Compute the 2-pt at the sink.
Nucleon-Nucleon D piece with general projector and Cg5.
const multi1d< int > & getBC() const
Get bc.
BarNuclDTCg5(const Params &p, const SpinMatrix &spinT, const SpinMatrix &spinCg5)
Full constructor.
const multi1d< int > & getSinkMom() const
Get sink_mom.
LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)
Construct the source.
Complex twoPtSink(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props, int gamma_insertion)
Compute the 2-pt at the sink.
const multi1d< int > & getTSrce() const
Get t_srce.
Nucleon-Nucleon U piece with general projector and Cg5.
const multi1d< int > & getBC() const
Get bc.
const multi1d< int > & getTSrce() const
Get t_srce.
LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)
Construct the source.
const multi1d< int > & getSinkMom() const
Get sink_mom.
BarNuclUTCg5(const Params &p, const SpinMatrix &spinT, const SpinMatrix &spinCg5)
Full constructor.
Complex twoPtSink(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props, int gamma_insertion)
Compute the 2-pt at the sink.
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.
bool registerAll()
Register all the factories.
multi1d< ForwardProp_t > & forward_headers
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
LinOpSysSolverMGProtoClover::T T
static QDP_ColorVector * in
::std::string string
Definition: gtest.h:1979
Simple baryon sequential source parameters.
void writeXML(XMLWriter &in, const std::string &path) const