43 static constexpr auto neutron_mass = 938.;
44 static constexpr auto light_speed_sq = 898.75517873681758374;
46 const TVector3 first_hit_distance = second.GetFirstHit().GetPosition() - first.GetFirstHit().GetPosition();
47 const double time_diff = second.GetT() - first.GetT();
49 const double velocity_sq = first_hit_distance.Mag2() / std::pow(time_diff, 2);
50 if (velocity_sq > light_speed_sq ||
51 velocity_sq > first.GetFirstHit().GetPosition().Mag2() / std::pow(first.GetT(), 2))
56 const double gamma = 1. / std::sqrt(1. - (velocity_sq / light_speed_sq));
57 const double kinetic_energy = (
gamma - 1.) * neutron_mass;
58 return kinetic_energy;
112 double target_mass) ->
double
114 const double neutron_m = 938.;
121 const double neutron_energy =
122 (sqrt((pow(scattered_angle, 4) * pow(scattered_neutron_KE, 4) * pow(neutron_m, 2)) -
123 (2 * pow(scattered_angle, 4) * pow(scattered_neutron_KE, 2) * pow(neutron_m, 4)) +
124 (pow(scattered_angle, 4) * pow(neutron_m, 6)) +
125 (pow(scattered_angle, 2) * pow(scattered_neutron_KE, 4) * pow(target_mass, 2)) -
126 (pow(scattered_angle, 2) * pow(scattered_neutron_KE, 4) * pow(neutron_m, 2)) -
127 (2 * pow(scattered_angle, 2) * pow(scattered_neutron_KE, 2) * pow(target_mass, 2) *
129 (2 * pow(scattered_angle, 2) * pow(scattered_neutron_KE, 2) * pow(neutron_m, 4)) +
130 (pow(scattered_angle, 2) * pow(target_mass, 2) * pow(neutron_m, 4)) -
131 (pow(scattered_angle, 2) * pow(neutron_m, 6))) +
132 pow(scattered_neutron_KE, 2) * target_mass - scattered_neutron_KE * pow(target_mass, 2) -
133 scattered_neutron_KE * pow(neutron_m, 2) + target_mass * pow(neutron_m, 2)) /
134 (pow(scattered_angle, 2) * pow(scattered_neutron_KE, 2) - pow(scattered_angle, 2) * pow(neutron_m, 2) -
135 pow(scattered_neutron_KE, 2) + 2 * scattered_neutron_KE * target_mass - pow(target_mass, 2));
137 return neutron_energy - neutron_m;