CHROMA
baryon_seqsrc_w.cc
Go to the documentation of this file.
1 /*! \file
2  * \brief Construct baryon sequential sources.
3  */
4 
8 
9 namespace Chroma
10 {
11 
12 
13  //! Anonymous namespace
14  /*! @ingroup hadron */
15  namespace
16  {
17  //! Get fermion bc
18  multi1d<int>
19  barSeqSourceGetBC(const multi1d<ForwardProp_t>& forward_headers)
20  {
21  multi1d<int> bc = getFermActBoundary(forward_headers[0].prop_header.fermact);
22 
23  for(int loop=1; loop < forward_headers.size(); ++loop)
24  {
25  multi1d<int> bc_b = getFermActBoundary(forward_headers[loop].prop_header.fermact);
26 
27  // Bummer, I wish qdp++ had a multi1d.operator!=()
28  bool same = true;
29  for(int i=0; i < bc.size(); ++i)
30  {
31  if (bc_b[i] != bc[i])
32  same = false;
33  }
34 
35  if (! same)
36  {
37  QDPIO::cerr << __func__ << ": the bc in the forward props are not all equal"
38  << std::endl;
39  QDP_abort(1);
40  }
41  }
42 
43  return bc;
44  }
45 
46  }
47 
48 
49 
50  // Default versions
51  void
52  BaryonSeqSourceBase::setBC(const multi1d<ForwardProp_t>& forward_headers)
53  {
54  getBC() = barSeqSourceGetBC(forward_headers);
55  }
56 
57 
58 
59  // Combine projection with time-ordering
60  LatticePropagator
62  const multi1d<ForwardProp_t>& forward_headers)
63  {
66 
67  // Multiply in time-ordering phase and project
69  }
70 
71 
72  // Time-ordering phase of source and sink hadron states
74  {
75  Complex phase;
76 
77  int j_decay = getDecayDir();
78  int t_sink = getTSink();
79  int t_source = getTSrce()[j_decay];
80  int bc_spec = getBC()[j_decay];
81 
82  if ( (bc_spec < 0) && (t_source > t_sink) )
83  phase = -1;
84  else
85  phase = 1;
86 
87  return phase;
88  }
89 
90 } // end namespace Chroma
Construct baryon sequential sources.
virtual multi1d< int > & getBC()=0
Set bc.
virtual Complex timeOrder() const
Time-ordering phase of source and sink hadron states.
virtual LatticePropagator projectBaryon(const LatticePropagator &src_prop_tmp, const multi1d< ForwardProp_t > &forward_headers)
Combine projection with time-ordering.
virtual void setBC(const multi1d< ForwardProp_t > &forward_headers)
Convenience function to yank the boundary condition from the forward prop headers.
Definition: baryon_2pt_w.cc:50
virtual int getDecayDir() const=0
Get decay_dir.
virtual multi1d< int > & getTSrce()=0
Set t_srce.
virtual LatticePropagator project(const LatticePropagator &src_prop_tmp) const
Project onto a definite time-slice.
virtual LatticeComplex phases() const
Construct phases.
virtual int getTSink() const=0
Get t_sink.
virtual void setTSrce(const multi1d< ForwardProp_t > &forward_headers)
Convenience function to yank the source location from the forward prop headers.
Gamma5 hermiticity.
LatticePropagator gamma5Herm(const LatticePropagator &source_prop)
Return gamma_5*adj(source)*gamma_f.
int bc_spec
multi1d< int > bc
ForwardProp_t prop_header
int j_decay
Definition: meslate.cc:22
multi1d< ForwardProp_t > & forward_headers
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
int i
Definition: pbg5p_w.cc:55
multi1d< int > getFermActBoundary(const GroupXML_t &fermact)
Given a fermion action in std::string form, return the boundary.
Definition: qprop_io.cc:61
Factory for producing quark prop sinks.