~kaktusjoe/spacetime/spacetime2.0.0-ubuntu18.05

« back to all changes in this revision

Viewing changes to Spacetime/Current4.h

  • Committer: Joseph F. Boudreau
  • Date: 2018-01-05 17:09:07 UTC
  • Revision ID: boudreau@pitt.edu-20180105170907-jcxsjfkvnvpjdnrw
Tags: upstream-2.0.0
ImportĀ upstreamĀ versionĀ 2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _Current4_h_
 
2
#define _Current4_h_
 
3
#include <Spacetime/DiracSpinor.h>
 
4
#include <Spacetime/Operator4.h>
 
5
#include <Spacetime/FourVector.h>
 
6
#include <memory>
 
7
// ======================================================//
 
8
//                                                       //
 
9
// This class is to be used completely behind the scenes //
 
10
// and facilitiates the following operation:             //
 
11
//                                                       //
 
12
// FourVector jL=uBar*Gamma()*u;                         //
 
13
//                                                       //
 
14
// ======================================================//
 
15
class Current4 {
 
16
 
 
17
 public:
 
18
  
 
19
  operator ComplexFourVector() const;
 
20
  
 
21
 private:
 
22
 
 
23
  std::shared_ptr<const DiracSpinor::Any> spinor;
 
24
  std::shared_ptr<const DiracSpinor::Bar> spinorBar;
 
25
  std::shared_ptr<const AbsOperator4>     op;
 
26
  mutable std::shared_ptr<ComplexFourVector>      current;
 
27
  friend Current4 operator * (const DiracSpinor::Bar &, const AbsOperator4 &);
 
28
  friend Current4 operator * (const Current4         &, const DiracSpinor::Any &    );
 
29
};
 
30
 
 
31
Current4 operator * (const DiracSpinor::Bar &, const AbsOperator4 &);
 
32
Current4 operator * (const Current4         &, const DiracSpinor::Any &    );
 
33
 
 
34
#endif