CHROMA
simple_hadron_operator_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Construct simple hadron operators
4  */
5 
6 #ifndef __simple_hadron_operator_w_h__
7 #define __simple_hadron_operator_w_h__
8 
9 #include "handle.h"
11 #include "io/xml_group_reader.h"
12 
13 namespace Chroma
14 {
15 
16  //! Name and registration
17  /*! @ingroup hadron */
18  namespace SimpleHadronOperatorEnv
19  {
20  extern const std::string name;
21  bool registerAll();
22 
23 
24  //! Construct baryon operators
25  /*! @ingroup hadron
26  *
27  */
28  template<typename T>
30  {
31  public:
32  //! Virtual destructor to help with cleanup;
33  virtual ~HadronOperator() {}
34 
35  //! Construct the operator (do the contractions)
36  virtual multi1d<LatticeComplex> operator()(const multi1d<T>& quarks,
37  enum PlusMinus isign) const = 0;
38 
40  std::istringstream xml_l(xml.xml);
41  XMLReader xmltop(xml_l);
42  read(xmltop,"File",file);
43  read(xmltop,"Name",name);
44  read(xmltop,"Type",type);
45  }
47  private:
51  };
52 
53 
54  //! Baryon Operator
55  /*! @ingroup hadron
56  *
57  * Create a simple baryon
58  */
59  class Baryon : public HadronOperator<LatticeFermion>{
60  public:
61  //! Full constructor
62  Baryon(const GroupXML_t& p);
63  // Just hand in an identifying std::string that tells us the diquark operator
64  // The permutations are going to be done at post processing.
65 
66  //! Compute the operator (no permutations are done)
67  multi1d<LatticeComplex> operator()(const multi1d<LatticeFermion>& quarks,
68  enum PlusMinus isign) const;
69 
70 
71  private:
72  //! Hide partial constructor
73  Baryon() {}
74 
75  private:
76  // std::string name ;
77  SpinMatrix DiqGamma ;
78  };
79 
80  } // end namespace
81 
82 
83 } // end namespace Chroma
84 
85 
86 #endif
multi1d< LatticeComplex > operator()(const multi1d< LatticeFermion > &quarks, enum PlusMinus isign) const
Compute the operator (no permutations are done)
Baryon(const GroupXML_t &p)
Full constructor.
virtual multi1d< LatticeComplex > operator()(const multi1d< T > &quarks, enum PlusMinus isign) const =0
Construct the operator (do the contractions)
virtual ~HadronOperator()
Virtual destructor to help with cleanup;.
void read(XMLReader &xml, const std::string &path, AsqtadFermActParams &param)
Read parameters.
Class for counted reference semantics.
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
::std::string string
Definition: gtest.h:1979
Quark smearing.
Hold group xml and type id.
Read an XML group as a std::string.