From 65972e64ea36049e99a4eed3ab18874a965fdd16 Mon Sep 17 00:00:00 2001
From: Alex Jentsch <ajentsch@bnl.gov>
Date: Tue, 14 Sep 2021 13:19:34 +0000
Subject: [PATCH] Hits look good now. Clean up histogram ranges.

---
 .../far_forward/scripts/hits_far_forward_protons.cxx       | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/benchmarks/far_forward/scripts/hits_far_forward_protons.cxx b/benchmarks/far_forward/scripts/hits_far_forward_protons.cxx
index bf525902..1d30f9a5 100644
--- a/benchmarks/far_forward/scripts/hits_far_forward_protons.cxx
+++ b/benchmarks/far_forward/scripts/hits_far_forward_protons.cxx
@@ -20,7 +20,7 @@ using ROOT::RDataFrame;
 using namespace ROOT::VecOps;
 
 double local_x_offset = -833.3878326;
-
+double crossingAngle  = -0.025;
 
 auto p_track = [](std::vector<eic::TrackParametersData> const& in) {
   std::vector<double> result;
@@ -49,7 +49,8 @@ auto momentum = [](std::vector<ROOT::Math::PxPyPzMVector> const& in) {
 auto theta = [](std::vector<ROOT::Math::PxPyPzMVector> const& in) {
   std::vector<double> result;
   for (size_t i = 0; i < in.size(); ++i) {
-   result.push_back(in[i].Theta()*1000);
+   double  unRotateTheta = in[i].Theta() - crossingAngle;
+   result.push_back(unRotateTheta*1000);
   }
   return result;
 };
@@ -148,7 +149,7 @@ int hits_far_forward_protons(const char* fname = "sim_far_forward_protons.root")
                  .Define("y_pos", y_pos, {"xy_hit_pos"})
                  ;
 
-  auto h_local_pos = df0.Histo2D({"h_local_pos", ";x [mm]; y [mm] ", 100, -1200.0, -500.0, 100, -100.0, 100.0}, "x_pos", "y_pos");
+  auto h_local_pos = df0.Histo2D({"h_local_pos", ";x [mm]; y [mm] ", 100, -1000.0, -650.0, 100, -100.0, 100.0}, "x_pos", "y_pos");
 
                  
 
-- 
GitLab