From 2e5a87b422a09afb9f0a48dcdb14fe1520027f85 Mon Sep 17 00:00:00 2001
From: Barak Schmookler <bschmookler1@gmail.com>
Date: Thu, 19 Sep 2024 08:55:04 -0400
Subject: [PATCH] Update

---
 Snakefile                                     |  1 +
 .../Snakefile                                 | 20 +++++++++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/Snakefile b/Snakefile
index d153297c..b1f969b6 100644
--- a/Snakefile
+++ b/Snakefile
@@ -6,6 +6,7 @@ include: "benchmarks/barrel_ecal/Snakefile"
 include: "benchmarks/ecal_gaps/Snakefile"
 include: "benchmarks/material_scan/Snakefile"
 include: "benchmarks/tracking_performances/Snakefile"
+include: "benchmarks/tracking_performances_efficiency/Snakefile"
 include: "benchmarks/zdc_lyso/Snakefile"
 
 use_s3 = config["remote_provider"].lower() == "s3"
diff --git a/benchmarks/tracking_performances_efficiency/Snakefile b/benchmarks/tracking_performances_efficiency/Snakefile
index 683d64ee..2bdc7cf4 100644
--- a/benchmarks/tracking_performances_efficiency/Snakefile
+++ b/benchmarks/tracking_performances_efficiency/Snakefile
@@ -42,9 +42,25 @@ npsim \
   --enableGun --gun.distribution 'eta' --gun.thetaMax 3.106 --gun.thetaMin 0.036 \
   --gun.momentumMin "{wildcards.MINP}*GeV" --gun.momentumMax "{wildcards.MAXP}*GeV" \
   --gun.position {wildcards.XGEN},{wildcards.YGEN},{wildcards.ZGEN} \
-  --numberOfEvents {params.num_events} \
-  --inputFiles {input.hepmcfile} \
+  --numberOfEvents {params.N_EVENTS} \
   --outputFile {output}
 """
 
 
+# Process the files produced in the previous step through EICRecon
+rule trk_eff_reco:
+    input:
+        "sim_output/tracking_performances_efficiency/{DETECTOR_CONFIG}/single_mu-_minP={MINP}_maxP={MAXP}_xgen={XGEN}_ygen={YGEN}_zgen={ZGEN}.edm4hep.root",
+    output:
+        "sim_output/tracking_performances_efficiency/{DETECTOR_CONFIG}/single_mu-_minP={MINP}_maxP={MAXP}_xgen={XGEN}_ygen={YGEN}_zgen={ZGEN}.edm4eic.root",
+    shell:
+        """
+set -m # monitor mode to prevent lingering processes
+exec env DETECTOR_CONFIG={wildcards.DETECTOR_CONFIG} \
+  eicrecon {input} -Ppodio:output_file={output} \
+  -Ppodio:output_collections=MCParticles,CentralTrackSeedingResults,CentralCKFTrackParameters,CentralCKFTruthSeededTrackParameters
+"""
+
+
+# Process the reconstructed files through the analysis/plotting script
+
-- 
GitLab