File indexing completed on 2026-09-27 09:14:54
0001
0002
0003
0004
0005
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
0019
0020
0021
0022
0023
0024
0025
0026
0027 namespace jpacPhoto
0028 {
0029 class two_body_state
0030 {
0031 private:
0032
0033 double _mV2;
0034 double _mB2;
0035
0036 public:
0037
0038
0039 two_body_state(double mV2, double mB2)
0040 : _mV2(mV2), _mB2(mB2)
0041 {};
0042
0043
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
0059 inline double get_mV2() { return _mV2; };
0060 inline double get_mB2() { return _mB2; };
0061
0062
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
0074
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
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
0092 std::complex<double> q(int mu, double s, double theta);
0093 std::complex<double> p(int mu, double s, double theta);
0094 };
0095 };
0096
0097 #endif