From 1afd75075c0f78df4ffcb1750a75306db2603721 Mon Sep 17 00:00:00 2001
From: Sylvester Joosten <sjoosten@anl.gov>
Date: Tue, 10 Aug 2021 17:56:07 +0000
Subject: [PATCH] fix benchmarks for new dd4pod

---
 benchmarks/dvcs/scripts/dvcs_tests.cxx | 6 +++---
 benchmarks/dvmp/analysis/dvmp.h        | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/benchmarks/dvcs/scripts/dvcs_tests.cxx b/benchmarks/dvcs/scripts/dvcs_tests.cxx
index 0ba36c6b..8364dffc 100644
--- a/benchmarks/dvcs/scripts/dvcs_tests.cxx
+++ b/benchmarks/dvcs/scripts/dvcs_tests.cxx
@@ -30,7 +30,7 @@ auto p_track = [](std::vector<eic::TrackParametersData> const& in) {
 auto pt  = [](std::vector<dd4pod::Geant4ParticleData> const& in){
   std::vector<float> result;
   for (size_t i = 0; i < in.size(); ++i) {
-    result.push_back(std::sqrt(in[i].psx * in[i].psx + in[i].psy * in[i].psy));
+    result.push_back(std::sqrt(in[i].ps.x * in[i].ps.x + in[i].ps.y * in[i].ps.y));
   }
   return result;
 };
@@ -53,7 +53,7 @@ auto fourvec = [](ROOT::VecOps::RVec<dd4pod::Geant4ParticleData> const& in) {
   std::vector<ROOT::Math::PxPyPzMVector> result;
   ROOT::Math::PxPyPzMVector lv;
   for (size_t i = 0; i < in.size(); ++i) {
-    lv.SetCoordinates(in[i].psx, in[i].psy, in[i].psz, in[i].mass);
+    lv.SetCoordinates(in[i].ps.x, in[i].ps.y, in[i].ps.z, in[i].mass);
     result.push_back(lv);
   }
   return result;
@@ -94,7 +94,7 @@ void dvcs_tests(const char* fname = "rec_dvcs.root"){
   auto eprime = [](ROOT::VecOps::RVec<dd4pod::Geant4ParticleData> const& in) {
     for(const auto& p : in){
       if(p.pdgID == 11 ) {
-        return PxPyPzMVector(p.psx,p.psy,p.psz,p.mass);
+        return PxPyPzMVector(p.ps.x,p.ps.y,p.ps.z,p.mass);
       }
     }
     return PxPyPzMVector(0,0,0,0);
diff --git a/benchmarks/dvmp/analysis/dvmp.h b/benchmarks/dvmp/analysis/dvmp.h
index 0fce3416..015ba110 100644
--- a/benchmarks/dvmp/analysis/dvmp.h
+++ b/benchmarks/dvmp/analysis/dvmp.h
@@ -28,9 +28,9 @@ namespace util {
     std::vector<ROOT::Math::PxPyPzMVector> momenta{7};
     int order_map[7] = {0, 3, 2, 6, 5, 7, 8};
     for(int i = 0 ; i < 7 ; i++){
-      double px = parts[order_map[i]].psx;
-      double py = parts[order_map[i]].psy;
-      double pz = parts[order_map[i]].psz;
+      double px = parts[order_map[i]].ps.x;
+      double py = parts[order_map[i]].ps.y;
+      double pz = parts[order_map[i]].ps.z;
       double mass = parts[order_map[i]].mass;
       double e = sqrt(px*px + py*py + pz*pz + mass*mass);
       momenta[i].SetPxPyPzE(px, py, pz, e);
-- 
GitLab