From aa749aa37a387792bdd77e1b9e4bf0a63084300d Mon Sep 17 00:00:00 2001
From: Alex Jentsch <ajentsch@bnl.gov>
Date: Tue, 14 Sep 2021 14:01:27 +0000
Subject: [PATCH] I miss the TLorentzVectors from Root5. Sigh.

---
 .../far_forward/scripts/hits_far_forward_protons.cxx | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/benchmarks/far_forward/scripts/hits_far_forward_protons.cxx b/benchmarks/far_forward/scripts/hits_far_forward_protons.cxx
index c5c56e78..5f91d0ef 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;
 };
-- 
GitLab