From 161f06c083d5ff7715221868b050eb6299d69feb Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Tue, 22 Feb 2022 00:48:30 -0600
Subject: [PATCH] Use compiled scripts; rename collected sim tracker hits

---
 benchmarks/tracking/central_electrons.sh             |  6 +++---
 benchmarks/tracking/options/track_reconstruction.py  | 12 ++++++------
 .../tracking/scripts/gen_central_electrons.cxx       |  6 ++++--
 benchmarks/tracking/scripts/gen_central_pions.cxx    |  6 ++++--
 benchmarks/tracking/scripts/gen_multiple_tracks.cxx  |  6 ++++--
 .../tracking/scripts/hits_central_electrons.cxx      |  2 ++
 benchmarks/tracking/scripts/hits_central_pions.cxx   |  2 ++
 .../tracking/scripts/rec_central_electrons.cxx       |  2 ++
 benchmarks/tracking/scripts/rec_central_pions.cxx    |  2 ++
 benchmarks/tracking/scripts/rec_multiple_tracks.cxx  |  2 ++
 10 files changed, 31 insertions(+), 15 deletions(-)

diff --git a/benchmarks/tracking/central_electrons.sh b/benchmarks/tracking/central_electrons.sh
index 836518ff..b897a9c1 100644
--- a/benchmarks/tracking/central_electrons.sh
+++ b/benchmarks/tracking/central_electrons.sh
@@ -71,7 +71,7 @@ if [[ -z "${REC_ONLY}" && -z "${ANALYSIS_ONLY}" ]] ;
 then
 
   ## generate the input events
-  root -b -q "benchmarks/tracking/scripts/gen_central_electrons.cxx(${JUGGLER_N_EVENTS}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")"
+  root -b -q "benchmarks/tracking/scripts/gen_central_electrons.cxx+(${JUGGLER_N_EVENTS}, \"${JUGGLER_FILE_NAME_TAG}.hepmc\")"
   if [[ "$?" -ne "0" ]] ; then
     echo "ERROR running script"
     exit 1
@@ -107,13 +107,13 @@ fi
 
 mkdir -p results/tracking
 
-root -b -q "benchmarks/tracking/scripts/rec_central_electrons.cxx(\"${JUGGLER_REC_FILE}\")"
+root -b -q "benchmarks/tracking/scripts/rec_central_electrons.cxx+(\"${JUGGLER_REC_FILE}\")"
 if [[ "$?" -ne "0" ]] ; then
   echo "ERROR running root script"
   exit 1
 fi
 
-#root -b -q "benchmarks/tracking/scripts/hits_central_electrons.cxx(\"${JUGGLER_SIM_FILE}\")"
+#root -b -q "benchmarks/tracking/scripts/hits_central_electrons.cxx+(\"${JUGGLER_SIM_FILE}\")"
 #if [[ "$?" -ne "0" ]] ; then
 #  echo "ERROR running root script"
 #  exit 1
diff --git a/benchmarks/tracking/options/track_reconstruction.py b/benchmarks/tracking/options/track_reconstruction.py
index 11f4862f..729021d2 100644
--- a/benchmarks/tracking/options/track_reconstruction.py
+++ b/benchmarks/tracking/options/track_reconstruction.py
@@ -99,7 +99,7 @@ algorithms.append( podioinput )
 
 trk_b_coll = SimTrackerHitsCollector("trk_b_coll",
         inputSimTrackerHits = tracker_barrel_collections,
-        outputSimTrackerHits = "TrackerBarrelHits")
+        outputSimTrackerHits = "TrackerBarrelAllHits")
 algorithms.append( trk_b_coll )
 trk_b_digi = TrackerDigi("trk_b_digi",
         inputHitCollection = trk_b_coll.outputSimTrackerHits,
@@ -109,7 +109,7 @@ algorithms.append( trk_b_digi )
 
 trk_ec_coll = SimTrackerHitsCollector("trk_ec_coll",
         inputSimTrackerHits = tracker_endcap_collections,
-        outputSimTrackerHits = "TrackerEndcapHits")
+        outputSimTrackerHits = "TrackerEndcapAllHits")
 algorithms.append( trk_ec_coll )
 trk_ec_digi = TrackerDigi("trk_ec_digi",
         inputHitCollection = trk_ec_coll.outputSimTrackerHits,
@@ -119,7 +119,7 @@ algorithms.append( trk_ec_digi )
 
 vtx_b_coll = SimTrackerHitsCollector("vtx_b_coll",
         inputSimTrackerHits = vertex_barrel_collections,
-        outputSimTrackerHits = "VertexBarrelHits")
+        outputSimTrackerHits = "VertexBarrelAllHits")
 algorithms.append( vtx_b_coll )
 vtx_b_digi = TrackerDigi("vtx_b_digi",
         inputHitCollection = vtx_b_coll.outputSimTrackerHits,
@@ -130,7 +130,7 @@ algorithms.append( vtx_b_digi )
 if 'acadia' in detector_version:
     vtx_ec_coll = SimTrackerHitsCollector("vtx_ec_coll",
             inputSimTrackerHits = vertex_endcap_collections,
-            outputSimTrackerHits = "VertexEndcapHits")
+            outputSimTrackerHits = "VertexEndcapAllHits")
     algorithms.append( vtx_ec_coll )
     vtx_ec_digi = TrackerDigi("vtx_ec_digi",
             inputHitCollection = vtx_ec_coll.outputSimTrackerHits,
@@ -140,7 +140,7 @@ if 'acadia' in detector_version:
 else:
     mm_b_coll = SimTrackerHitsCollector("mm_b_coll",
             inputSimTrackerHits = mpgd_barrel_collections,
-            outputSimTrackerHits = "MPGDTrackerBarrelHits")
+            outputSimTrackerHits = "MPGDTrackerBarrelAllHits")
     algorithms.append( mm_b_coll )
     mm_b_digi = TrackerDigi("mm_b_digi",
             inputHitCollection = mm_b_coll.outputSimTrackerHits,
@@ -150,7 +150,7 @@ else:
 
 gem_ec_coll = SimTrackerHitsCollector("gem_ec_coll",
         inputSimTrackerHits = gem_endcap_collections,
-        outputSimTrackerHits = "GEMTrackerEndcapHits")
+        outputSimTrackerHits = "GEMTrackerEndcapAllHits")
 algorithms.append( gem_ec_coll )
 gem_ec_digi = TrackerDigi("gem_ec_digi",
         inputHitCollection = gem_ec_coll.outputSimTrackerHits,
diff --git a/benchmarks/tracking/scripts/gen_central_electrons.cxx b/benchmarks/tracking/scripts/gen_central_electrons.cxx
index 3e9d8c01..455c799d 100644
--- a/benchmarks/tracking/scripts/gen_central_electrons.cxx
+++ b/benchmarks/tracking/scripts/gen_central_electrons.cxx
@@ -3,9 +3,11 @@
 #include "HepMC3/WriterAscii.h"
 #include "HepMC3/Print.h"
 
+#include "TRandom.h"
+
 #include <iostream>
-#include<random>
-#include<cmath>
+#include <random>
+#include <cmath>
 #include <math.h>
 #include <TMath.h>
 
diff --git a/benchmarks/tracking/scripts/gen_central_pions.cxx b/benchmarks/tracking/scripts/gen_central_pions.cxx
index abf691b5..0e314c53 100644
--- a/benchmarks/tracking/scripts/gen_central_pions.cxx
+++ b/benchmarks/tracking/scripts/gen_central_pions.cxx
@@ -3,9 +3,11 @@
 #include "HepMC3/WriterAscii.h"
 #include "HepMC3/Print.h"
 
+#include "TRandom.h"
+
 #include <iostream>
-#include<random>
-#include<cmath>
+#include <random>
+#include <cmath>
 #include <math.h>
 #include <TMath.h>
 
diff --git a/benchmarks/tracking/scripts/gen_multiple_tracks.cxx b/benchmarks/tracking/scripts/gen_multiple_tracks.cxx
index f2684006..a8251f09 100644
--- a/benchmarks/tracking/scripts/gen_multiple_tracks.cxx
+++ b/benchmarks/tracking/scripts/gen_multiple_tracks.cxx
@@ -3,9 +3,11 @@
 #include "HepMC3/WriterAscii.h"
 #include "HepMC3/Print.h"
 
+#include "TRandom.h"
+
 #include <iostream>
-#include<random>
-#include<cmath>
+#include <random>
+#include <cmath>
 #include <math.h>
 #include <TMath.h>
 
diff --git a/benchmarks/tracking/scripts/hits_central_electrons.cxx b/benchmarks/tracking/scripts/hits_central_electrons.cxx
index 493a35a4..f94d3ec6 100644
--- a/benchmarks/tracking/scripts/hits_central_electrons.cxx
+++ b/benchmarks/tracking/scripts/hits_central_electrons.cxx
@@ -2,7 +2,9 @@
 #include "TCanvas.h"
 #include "TLegend.h"
 #include "TH1D.h"
+#include "THStack.h"
 #include "TProfile.h"
+#include "Math/Vector4D.h"
 
 #include <iostream>
 
diff --git a/benchmarks/tracking/scripts/hits_central_pions.cxx b/benchmarks/tracking/scripts/hits_central_pions.cxx
index ef7d3fef..58a3dab3 100644
--- a/benchmarks/tracking/scripts/hits_central_pions.cxx
+++ b/benchmarks/tracking/scripts/hits_central_pions.cxx
@@ -2,7 +2,9 @@
 #include "TCanvas.h"
 #include "TLegend.h"
 #include "TH1D.h"
+#include "THStack.h"
 #include "TProfile.h"
+#include "Math/Vector4D.h"
 
 #include <iostream>
 
diff --git a/benchmarks/tracking/scripts/rec_central_electrons.cxx b/benchmarks/tracking/scripts/rec_central_electrons.cxx
index 4c7a76b6..ad241ebb 100644
--- a/benchmarks/tracking/scripts/rec_central_electrons.cxx
+++ b/benchmarks/tracking/scripts/rec_central_electrons.cxx
@@ -2,7 +2,9 @@
 #include "TCanvas.h"
 #include "TLegend.h"
 #include "TH1D.h"
+#include "THStack.h"
 #include "TProfile.h"
+#include "Math/Vector4D.h"
 
 #include <iostream>
 
diff --git a/benchmarks/tracking/scripts/rec_central_pions.cxx b/benchmarks/tracking/scripts/rec_central_pions.cxx
index 102c7900..588a5a02 100644
--- a/benchmarks/tracking/scripts/rec_central_pions.cxx
+++ b/benchmarks/tracking/scripts/rec_central_pions.cxx
@@ -2,7 +2,9 @@
 #include "TCanvas.h"
 #include "TLegend.h"
 #include "TH1D.h"
+#include "THStack.h"
 #include "TProfile.h"
+#include "Math/Vector4D.h"
 
 #include <iostream>
 
diff --git a/benchmarks/tracking/scripts/rec_multiple_tracks.cxx b/benchmarks/tracking/scripts/rec_multiple_tracks.cxx
index 81904762..99f0ded5 100644
--- a/benchmarks/tracking/scripts/rec_multiple_tracks.cxx
+++ b/benchmarks/tracking/scripts/rec_multiple_tracks.cxx
@@ -2,7 +2,9 @@
 #include "TCanvas.h"
 #include "TLegend.h"
 #include "TH1D.h"
+#include "THStack.h"
 #include "TProfile.h"
+#include "Math/Vector4D.h"
 
 #include <iostream>
 
-- 
GitLab