44 static constexpr auto neutron_mass = 938.;
45 static constexpr auto light_speed_sq = 898.75517873681758374;
47 const TVector3 first_hit_distance = second.GetFirstHit().GetPosition() - first.GetFirstHit().GetPosition();
48 const double time_diff = second.GetT() - first.GetT();
50 const double velocity_sq = first_hit_distance.Mag2() / std::pow(time_diff, 2);
51 if (velocity_sq > light_speed_sq ||
52 velocity_sq > first.GetFirstHit().GetPosition().Mag2() / std::pow(first.GetT(), 2))
57 const double gamma = 1. / std::sqrt(1. - (velocity_sq / light_speed_sq));
58 const double kinetic_energy = (gamma - 1.) * neutron_mass;
59 return kinetic_energy;
113 double target_mass) ->
double
115 const double neutron_m = 938.;
122 const double neutron_energy =
123 (sqrt((pow(scattered_angle, 4) * pow(scattered_neutron_KE, 4) * pow(neutron_m, 2)) -
124 (2 * pow(scattered_angle, 4) * pow(scattered_neutron_KE, 2) * pow(neutron_m, 4)) +
125 (pow(scattered_angle, 4) * pow(neutron_m, 6)) +
126 (pow(scattered_angle, 2) * pow(scattered_neutron_KE, 4) * pow(target_mass, 2)) -
127 (pow(scattered_angle, 2) * pow(scattered_neutron_KE, 4) * pow(neutron_m, 2)) -
128 (2 * pow(scattered_angle, 2) * pow(scattered_neutron_KE, 2) * pow(target_mass, 2) *
130 (2 * pow(scattered_angle, 2) * pow(scattered_neutron_KE, 2) * pow(neutron_m, 4)) +
131 (pow(scattered_angle, 2) * pow(target_mass, 2) * pow(neutron_m, 4)) -
132 (pow(scattered_angle, 2) * pow(neutron_m, 6))) +
133 pow(scattered_neutron_KE, 2) * target_mass - scattered_neutron_KE * pow(target_mass, 2) -
134 scattered_neutron_KE * pow(neutron_m, 2) + target_mass * pow(neutron_m, 2)) /
135 (pow(scattered_angle, 2) * pow(scattered_neutron_KE, 2) - pow(scattered_angle, 2) * pow(neutron_m, 2) -
136 pow(scattered_neutron_KE, 2) + 2 * scattered_neutron_KE * target_mass - pow(target_mass, 2));
138 return neutron_energy - neutron_m;