File indexing completed on 2026-09-27 09:14:53
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _PROTON_
0009 #define _PROTON_
0010
0011 #include <string>
0012 #include <vector>
0013 #include <iostream>
0014
0015 #include <iomanip>
0016
0017 #include "amplitude.hpp"
0018
0019 namespace jpacPhoto
0020 {
0021 class dirac_exchange : public amplitude
0022 {
0023 public:
0024
0025
0026 dirac_exchange(reaction_kinematics * xkinem, double mass, std::string name = "dirac_exchange")
0027 : amplitude(xkinem, name),
0028 _mEx(mass), _mEx2(mass*mass)
0029 {
0030 set_nParams(2);
0031 check_JP(xkinem->_jp);
0032 };
0033
0034
0035 void set_params(std::vector<double> params)
0036 {
0037 check_nParams(params);
0038 _gGam = params[0];
0039 _gVec = params[1];
0040 };
0041
0042
0043
0044 inline void set_formfactor(int FF, double bb = 0.)
0045 {
0046 _useFF = FF;
0047 _cutoff = bb;
0048 }
0049
0050
0051 std::complex<double> helicity_amplitude(std::array<int, 4> helicities, double s, double t);
0052
0053
0054 inline void set_debug(int i)
0055 {
0056 switch (i)
0057 {
0058 case 3: _scTOP = true; _scBOT = true; break;
0059 case 2: _scTOP = true; break;
0060 case 1: _scBOT = true; break;
0061 }
0062 }
0063
0064
0065 inline std::vector<std::array<int,2>> allowedJP()
0066 {
0067 return {{1, -1}, {0, -1}};
0068 };
0069
0070 protected:
0071
0072
0073
0074 bool _scTOP = false, _scBOT = false;
0075
0076
0077 double _u;
0078 double _mEx, _mEx2;
0079
0080
0081 int _useFF = 0;
0082 double _cutoff = 0.;
0083 double form_factor();
0084
0085
0086 double _gGam = 0., _gVec = 0.;
0087
0088
0089 double exchange_mass();
0090
0091
0092 std::complex<double> exchange_momentum(int mu);
0093
0094
0095 std::complex<double> slashed_exchange_momentum(int i, int j);
0096
0097
0098 std::complex<double> slashed_eps(int i, int j, double lam, polarization_vector * eps, bool STARRED, double s, double theta);
0099
0100
0101 std::complex<double> top_vertex(int i, int lam_gam, int lam_rec);
0102
0103
0104 std::complex<double> bottom_vertex(int j, int lam_vec, int lam_targ);
0105
0106
0107 std::complex<double> dirac_propagator(int i, int j);
0108 };
0109 };
0110 #endif