diff --git a/benchmarks/far_forward/scripts/hits_far_forward_protons.cxx b/benchmarks/far_forward/scripts/hits_far_forward_protons.cxx index c5c56e781f9996a79cd7333050d0952d089f3adb..5f91d0efae149c02b23336b34f10f5537f4b08ea 100644 --- a/benchmarks/far_forward/scripts/hits_far_forward_protons.cxx +++ b/benchmarks/far_forward/scripts/hits_far_forward_protons.cxx @@ -48,9 +48,17 @@ auto momentum = [](std::vector<ROOT::Math::PxPyPzMVector> const& in) { }; auto theta = [](std::vector<ROOT::Math::PxPyPzMVector> const& in) { std::vector<double> result; + ROOT::Math::PxPyPzMVector transFourVect; for (size_t i = 0; i < in.size(); ++i) { - in[i].RotationY(-crossingAngle); - result.push_back(in[i].Theta()*1000); + Double_t s = std::sin(-crossingAngle); + Double_t c = std::cos(-crossingAngle); + Double_t zz = in[i].Pz(); + Double_t xx = in[i].Px(); + pz = c*zz - s*xx; + px = s*zz + c*xx; + transFourVect.SetPxPyPzE(in[i].Px(), in[i].Py(), in[i].Pz, in[i].E()); + + result.push_back(transFourVect.Theta()*1000); } return result; };