2#define _USE_MATH_DEFINES
18 mfunname(
"double cos_theta_two_part(...)");
20 double Mp2 = Mp * Mp * c_squared * c_squared;
22 double d0 = Ep0 * Ep0 - Mp2;
24 double d1 = Ep1 * Ep1 - Mp2;
26 double r = (-2.0 * Ep0 * Mt + 2.0 * Ep0 * Ep1 + 2.0 * Mt * Ep1 - 2.0 * Mp2) /
32 double& theta_p,
double& theta_t) {
33 mfunname(
"void theta_two_part(...)");
35 double Mp2 = Mp * Mp * c_squared * c_squared;
37 double d0 = Ep0 * Ep0 - Mp2;
39 double d1 = Ep1 * Ep1 - Mp2;
41 double ctheta = (-2.0 * Ep0 * Mt + 2.0 * Ep0 * Ep1 + 2.0 * Mt * Ep1 -
42 2.0 * Mp2) / (2.0 *
sqrt(d0) *
sqrt(d1));
43 if (ctheta < -1.0) ctheta = -1.0;
44 if (ctheta > 1.0) ctheta = 1.0;
45 theta_p =
acos(ctheta);
50 double Pp1 = Ep1 * Ep1 - Mp2;
55 double d3 = Ep0 + Mt - Ep1;
56 double dd1 = d3 * d3 - Mt * Mt;
58 double dd2 =
sqrt(dd1);
62 double stheta_t = -Pp1 * (
sin(theta_p) / dd2);
64 if (stheta_t < -1.0) stheta_t = -1.0;
65 if (stheta_t > 1.0) stheta_t = 1.0;
66 theta_t =
asin(stheta_t);
DoubleAc asin(const DoubleAc &f)
DoubleAc sqrt(const DoubleAc &f)
DoubleAc sin(const DoubleAc &f)
DoubleAc acos(const DoubleAc &f)
#define check_econd11(a, signb, stream)
double cos_theta_two_part(double Ep0, double Ep1, double Mp, double Mt)
void theta_two_part(double Ep0, double Ep1, double Mp, double Mt, double &theta_p, double &theta_t)