CHROMA
simple_baryon_2pt_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Construct simple baryon 2pt correlators
4  */
5 
6 #ifndef __simple_baryon_2pt_w_h__
7 #define __simple_baryon_2pt_w_h__
8 
10 
11 namespace Chroma
12 {
13 
14  //! Name and registration
15  /*! @ingroup hadron */
16  namespace SimpleBaryon2PtEnv
17  {
18  bool registerAll();
19 
20 
21  //! Simple baryon 2pt 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 decay_dir; /*!< Decay direction */
31  };
32 
33 
34  //! Nucleon-Nucleon 2pt with general projector and Cg5
35  /*! @ingroup hadron
36  *
37  * Create a simple baryon 2pt correlator
38  */
39  class BarNuclTCg5 : public Baryon2PtBase
40  {
41  public:
42  //! Full constructor
43  BarNuclTCg5(const Params& p, const SpinMatrix& spinT, const SpinMatrix& spinCg5) :
44  params(p), T(spinT), Cg5(spinCg5) {}
45 
46  //! Default destructor
48 
49  //! Construct the correlators
50  /*! Default implementation supplied */
51  multi1d<Hadron2PtContraction_t> operator()(const multi1d<LatticeColorMatrix>& u);
52 
53  protected:
54  //! Set bc
55  multi1d<int>& getBC() {return bc;}
56 
57  //! Get bc
58  const multi1d<int>& getBC() const {return bc;}
59 
60  //! Set t_srce
61  multi1d<int>& getTSrce() {return t_srce;}
62 
63  //! Get t_srce
64  const multi1d<int>& getTSrce() const {return t_srce;}
65 
66  //! Get decay_dir
67  int& getDecayDir() {return decay_dir;}
68 
69  //! Get decay_dir
70  int getDecayDir() const {return decay_dir;}
71 
72  private:
73  //! Hide partial constructor
75 
76  private:
77  multi1d<int> t_srce; /*<! Must come from propagator headers */
78  multi1d<int> bc; /*<! Must come from propagator headers */
79  Params params; /*!< Seqsource params */
80  SpinMatrix T; /*!< The spin projector matrix */
81  SpinMatrix Cg5; /*!< The Cg5 at the source and sink */
82  };
83 
84 
85  //! Delta+ - Delta+ 2pt piece with general projector and spin matrix
86  /*! @ingroup hadron
87  *
88  * Create a simple baryon sequential propagator source
89  */
90  class BarDeltaTsp : public Baryon2PtBase
91  {
92  public:
93  //! Full constructor
94  BarDeltaTsp(const Params& p, const SpinMatrix& spinT, const SpinMatrix& spinSP) :
95  params(p), T(spinT), sp(spinSP) {}
96 
97  //! Default destructor
99 
100  //! Construct the source
101  LatticePropagator operator()(const multi1d<LatticeColorMatrix>& u,
102  const multi1d<ForwardProp_t>& forward_headers,
103  const multi1d<LatticePropagator>& forward_props);
104 
105  protected:
106  //! Set bc
107  multi1d<int>& getBC() {return bc;}
108 
109  //! Get bc
110  const multi1d<int>& getBC() const {return bc;}
111 
112  //! Set t_srce
113  multi1d<int>& getTSrce() {return t_srce;}
114 
115  //! Get t_srce
116  const multi1d<int>& getTSrce() const {return t_srce;}
117 
118  //! Get decay_dir
119  const int getDecayDir() const {return params.j_decay;}
120 
121  private:
122  //! Hide partial constructor
124 
125  private:
126  multi1d<int> t_srce; /*<! Must come from propagator headers */
127  multi1d<int> bc; /*<! Must come from propagator headers */
128  Params params; /*!< Seqsource params */
129  SpinMatrix T; /*!< The spin projector matrix */
130  SpinMatrix sp; /*!< The spin at the source and sink */
131  };
132 
133 
134  //! Delta+ - Delta+ 2pt piece with general projector and spin matrix
135  /*! @ingroup hadron
136  *
137  * Create a simple baryon propagator with different source
138  * and sink diquarks
139  */
141  {
142  public:
143  //! Full constructor
144  BarDeltaTspSRCspSNK(const Params& p, const SpinMatrix& spinT, const SpinMatrix& spinSRC, const SpinMatrix& spinSNK, ) :
145  params(p), T(spinT), spSRC(spinSRC),spSNK(spinSNK) {}
146 
147  //! Default destructor
149 
150  //! Construct the source
151  LatticePropagator operator()(const multi1d<LatticeColorMatrix>& u,
152  const multi1d<ForwardProp_t>& forward_headers,
153  const multi1d<LatticePropagator>& forward_props);
154 
155  protected:
156  //! Set bc
157  multi1d<int>& getBC() {return bc;}
158 
159  //! Get bc
160  const multi1d<int>& getBC() const {return bc;}
161 
162  //! Set t_srce
163  multi1d<int>& getTSrce() {return t_srce;}
164 
165  //! Get t_srce
166  const multi1d<int>& getTSrce() const {return t_srce;}
167 
168  //! Get decay_dir
169  const int getDecayDir() const {return params.j_decay;}
170 
171  private:
172  //! Hide partial constructor
174 
175  private:
176  multi1d<int> t_srce; /*<! Must come from propagator headers */
177  multi1d<int> bc; /*<! Must come from propagator headers */
178  Params params; /*!< Seqsource params */
179  SpinMatrix T; /*!< The spin projector matrix */
180  SpinMatrix sp_src; /*!< The spin at the source */
181  SpinMatrix sp_snk; /*!< The sink at the source */
182  };
183 
184  } // end namespace
185 
186 
187  //! Reader
188  /*! @ingroup hadron */
189  void read(XMLReader& xml, const std::string& path, SimpleBaryon2PtEnv::Params& param);
190 
191  //! Writer
192  /*! @ingroup hadron */
193  void write(XMLWriter& xml, const std::string& path, const SimpleBaryon2PtEnv::Params& param);
194 
195 } // end namespace Chroma
196 
197 
198 #endif
Construct baryon 2pt correlators.
Baryon-Baryon seqsources have a time order phase.
Definition: baryon_2pt_w.h:17
Delta+ - Delta+ 2pt piece with general projector and spin matrix.
LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)
Construct the source.
BarDeltaTspSRCspSNK(const Params &p, const SpinMatrix &spinT, const SpinMatrix &spinSRC, const SpinMatrix &spinSNK,)
Full constructor.
const multi1d< int > & getTSrce() const
Get t_srce.
const multi1d< int > & getBC() const
Get bc.
Delta+ - Delta+ 2pt piece with general projector and spin matrix.
LatticePropagator operator()(const multi1d< LatticeColorMatrix > &u, const multi1d< ForwardProp_t > &forward_headers, const multi1d< LatticePropagator > &forward_props)
Construct the source.
const multi1d< int > & getTSrce() const
Get t_srce.
BarDeltaTsp(const Params &p, const SpinMatrix &spinT, const SpinMatrix &spinSP)
Full constructor.
const multi1d< int > & getBC() const
Get bc.
const int getDecayDir() const
Get decay_dir.
multi1d< int > & getTSrce()
Set t_srce.
Nucleon-Nucleon 2pt with general projector and Cg5.
BarNuclTCg5(const Params &p, const SpinMatrix &spinT, const SpinMatrix &spinCg5)
Full constructor.
const multi1d< int > & getTSrce() const
Get t_srce.
const multi1d< int > & getBC() const
Get bc.
multi1d< int > & getTSrce()
Set t_srce.
multi1d< Hadron2PtContraction_t > operator()(const multi1d< LatticeColorMatrix > &u)
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.
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 2pt parameters.
Params(XMLReader &in, const std::string &path)
void writeXML(XMLWriter &in, const std::string &path) const