Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Energy and momentum of a two-particle state in the center of mass scattering frame

0002 //

0003 // Author:       Daniel Winney (2019)

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

0005 // Email:        dwinney@iu.edu

0006 // ---------------------------------------------------------------------------

0007 
0008 #ifndef _TWO_BODY_
0009 #define _TWO_BODY_
0010 
0011 #include <string>
0012 #include <complex>
0013 #include <iostream>
0014 
0015 #include "misc_math.hpp"
0016 
0017 // ---------------------------------------------------------------------------

0018 // The two_body_state is the base object for defining a reaction in the

0019 // s-channel center of mass scatering frame.

0020 //

0021 // Two particles of mass mV and mB are defined with momenta opposite along the

0022 // same axis such that the energy and momenta of both particles is entirely

0023 // determined by the center-of-mass energy, s, and the cosing of the angle

0024 // from the z-axis (define to be at theta = 0).

0025 // ---------------------------------------------------------------------------

0026 
0027 namespace jpacPhoto
0028 {
0029   class two_body_state
0030   {
0031         private:
0032 
0033         double _mV2; // Vector mass

0034         double _mB2; // Baryon mass (allowed to be float for N* or Δ)

0035 
0036         public:
0037 
0038         // Constructor

0039         two_body_state(double mV2, double mB2)
0040         : _mV2(mV2), _mB2(mB2)
0041         {};
0042 
0043         // return mass

0044         inline double get_mV() 
0045         { 
0046             if (_mV2 >= 0.) 
0047             {
0048                 return sqrt(_mV2);
0049             }
0050             else
0051             {
0052                 return sqrt(-_mV2);
0053             }
0054         };
0055 
0056         inline double get_mB() { return sqrt(_mB2); };
0057 
0058         // Return mass squared

0059         inline double get_mV2() { return _mV2; };
0060         inline double get_mB2() { return _mB2; };
0061 
0062         // set masses independently

0063         inline void set_mV2(double mV2)
0064         {
0065             _mV2 = mV2;
0066         };
0067 
0068         inline void set_mB2(double mB2)
0069         {
0070             _mB2 = mB2;
0071         };
0072 
0073         // Momenta

0074         // V is always particle 1 in + z direction, 

0075         inline std::complex<double> momentum(double s)
0076         {
0077             return sqrt( Kallen(XR * s, XR *_mV2, XR * _mB2)) / (2. * sqrt(XR * s));
0078         };
0079 
0080         // Energies

0081         inline std::complex<double> energy_V(double s)
0082         {
0083             return (s + _mV2 - _mB2) / (2. * sqrt(XR * s));
0084         };
0085 
0086         inline std::complex<double> energy_B(double s)
0087         {
0088             return (s - _mV2 + _mB2) / (2. * sqrt(XR * s));
0089         };
0090 
0091         // Full 4-momenta 

0092         std::complex<double> q(int mu, double s, double theta); // 4vector of vector, particle 1

0093         std::complex<double> p(int mu, double s, double theta); // 4vector of baryon, particle 2

0094     };
0095 };
0096 
0097 #endif