Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-27 09:14:53

0001 // Spin-1/2 exchange ampltiude from perturbation theory

0002 //

0003 // Author:       Daniel Winney (2020)

0004 // Affiliation:  Joint Physics Analysis Center (JPAC)

0005 // Email:        dwinney@iu.edu

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         // constructor

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         // Setting utility

0035         void set_params(std::vector<double> params)
0036         {
0037             check_nParams(params);
0038             _gGam = params[0];
0039             _gVec = params[1];
0040         };
0041 
0042         // Whether or not to include an form factor (default false)

0043         // FF = 0 (none), 1 (exponential), 2 (monopole)

0044         inline void set_formfactor(int FF, double bb = 0.)
0045         {
0046             _useFF = FF;
0047             _cutoff = bb;
0048         }
0049 
0050         // Assemble the helicity amplitude by contracting the spinor indices

0051         std::complex<double> helicity_amplitude(std::array<int, 4> helicities, double s, double t);
0052 
0053         // debugging options to make either the photon or vector into scalars

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         // only vector and psuedo-scalar kinematics

0065         inline std::vector<std::array<int,2>> allowedJP()
0066         {
0067             return {{1, -1}, {0, -1}};
0068         };
0069 
0070         protected:
0071 
0072         // possibility to set the top and bottom vertices to be scalar type 

0073         // For debugging purposes only

0074         bool _scTOP = false, _scBOT = false;
0075     
0076         // Exchange nucleon mass

0077         double _u;
0078         double _mEx, _mEx2;
0079 
0080         // Form factor parameters

0081         int _useFF = 0;
0082         double _cutoff = 0.;
0083         double form_factor();
0084 
0085         // couplings

0086         double _gGam = 0., _gVec = 0.;
0087 
0088         // Should be exactly u_man(s, zs);

0089         double exchange_mass();
0090 
0091         // Four-momentum of the exhange (u - channel)

0092         std::complex<double> exchange_momentum(int mu);
0093 
0094         // Slashed momentumn

0095         std::complex<double> slashed_exchange_momentum(int i, int j);
0096 
0097         // Slashed polarization vectors

0098         std::complex<double> slashed_eps(int i, int j, double lam, polarization_vector * eps, bool STARRED, double s, double theta);
0099 
0100         // Photon - excNucleon - recNucleon vertex

0101         std::complex<double> top_vertex(int i, int lam_gam, int lam_rec);
0102 
0103         // excNucleon - recNucleon - Vector vertex

0104         std::complex<double> bottom_vertex(int j, int lam_vec, int lam_targ);
0105 
0106         // Spin-1/2 propagator

0107         std::complex<double> dirac_propagator(int i, int j);
0108     };
0109 };
0110 #endif