Skip to content

nhcal_basic_distribution,backwards_ecal: modifications to benchmarks to avoid timeouts #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions benchmarks/backwards_ecal/Snakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def get_n_events(wildcards):
energy = float(wildcards.ENERGY.replace("GeV", "").replace("MeV", "e-3"))
n_events = 1000 if wildcards.PARTICLE == "e-" else 2000
n_events = int(n_events // (energy ** 0.5))
n_events = int(n_events // (energy ** 0.75))
return n_events


Expand Down Expand Up @@ -45,7 +45,7 @@ exec ddsim \

rule backwards_ecal_recon:
input:
"sim_output/backwards_ecal/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.edm4hep.root",
sim="sim_output/backwards_ecal/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.edm4hep.root",
warmup=ancient("warmup/{DETECTOR_CONFIG}.edm4hep.root"),
output:
"sim_output/backwards_ecal/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.eicrecon.edm4eic.root",
Expand All @@ -60,7 +60,7 @@ rule backwards_ecal_recon:
shell: """
set -m # monitor mode to prevent lingering processes
exec env DETECTOR_CONFIG={params.DETECTOR_CONFIG} \
eicrecon {input} -Ppodio:output_file={output} \
eicrecon {input.sim} -Ppodio:output_file={output} \
-Ppodio:output_collections=MCParticles,EcalEndcapNRecHits,EcalEndcapNClusters
"""

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/calo_pid/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ exec ddsim \

rule calo_pid_recon:
input:
"sim_output/calo_pid/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.edm4hep.root",
sim="sim_output/calo_pid/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.edm4hep.root",
warmup=ancient("warmup/{DETECTOR_CONFIG}.edm4hep.root"),
output:
"sim_output/calo_pid/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.eicrecon.edm4eic.root",
Expand All @@ -65,7 +65,7 @@ rule calo_pid_recon:
cache: True
shell: """
DETECTOR_CONFIG={wildcards.DETECTOR_CONFIG} \
exec eicrecon {input} -Ppodio:output_file={output} \
exec eicrecon {input.sim} -Ppodio:output_file={output} \
-Ppodio:output_collections=MCParticles,EcalEndcapNRecHits,EcalEndcapNClusters,EcalEndcapNParticleIDInput_features,EcalEndcapNParticleIDTarget,EcalEndcapNParticleIDOutput_probability_tensor
"""

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/ecal_gaps/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exec ddsim \

rule ecal_gaps_recon:
input:
"sim_output/ecal_gaps/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.edm4hep.root",
sim="sim_output/ecal_gaps/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.edm4hep.root",
warmup=ancient("warmup/{DETECTOR_CONFIG}.edm4hep.root"),
output:
"sim_output/ecal_gaps/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.eicrecon.edm4eic.root",
Expand All @@ -56,7 +56,7 @@ rule ecal_gaps_recon:
shell: """
set -m # monitor mode to prevent lingering processes
exec env DETECTOR_CONFIG={params.DETECTOR_CONFIG} \
eicrecon {input} -Ppodio:output_file={output} \
eicrecon {input.sim} -Ppodio:output_file={output} \
-Ppodio:output_collections=EcalEndcapNRecHits,EcalBarrelScFiRecHits,EcalBarrelImagingRecHits,EcalEndcapPRecHits,MCParticles
"""

Expand Down
4 changes: 3 additions & 1 deletion benchmarks/nhcal_basic_distribution/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ sim:nhcal_basic_distribution_full:
stage: simulate
parallel:
matrix:
- ENERGY: ["0.5GeV", "0.7GeV", "1.0GeV", "2.0GeV", "5.0GeV"]
- ENERGY: ["0.5GeV", "0.7GeV", "1.0GeV", "2.0GeV"]
INDEX_RANGE: ["0 4","5 9"]
- ENERGY: ["5.0GeV"]
INDEX_RANGE: ["0 3", "4 6", "7 9"]
script:
- snakemake $SNAKEMAKE_FLAGS --cores $MAX_CORES_PER_JOB $(for INDEX in $(seq -f '%02.0f' $INDEX_RANGE); do echo sim_output/nhcal_basic_distribution/E${ENERGY}/sim_epic_full.${INDEX}.edm4hep.root; done)

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/tracking_performances_dis/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ddsim \
# Process the files produced in the previous step through EICRecon
rule trk_dis_reco:
input:
"sim_output/tracking_performances_dis/{DETECTOR_CONFIG}/pythia8NCDIS_{EBEAM}x{PBEAM}_minQ2={MINQ2}_beamEffects_xAngle=-0.025_hiDiv_{INDEX}.edm4hep.root",
sim="sim_output/tracking_performances_dis/{DETECTOR_CONFIG}/pythia8NCDIS_{EBEAM}x{PBEAM}_minQ2={MINQ2}_beamEffects_xAngle=-0.025_hiDiv_{INDEX}.edm4hep.root",
warmup=ancient("warmup/{DETECTOR_CONFIG}.edm4hep.root"),
output:
"sim_output/tracking_performances_dis/{DETECTOR_CONFIG}/pythia8NCDIS_{EBEAM}x{PBEAM}_minQ2={MINQ2}_beamEffects_xAngle=-0.025_hiDiv_{INDEX}.edm4eic.root",
Expand All @@ -71,7 +71,7 @@ rule trk_dis_reco:
"""
set -m # monitor mode to prevent lingering processes
exec env DETECTOR_CONFIG={wildcards.DETECTOR_CONFIG} \
eicrecon {input} -Ppodio:output_file={output} \
eicrecon {input.sim} -Ppodio:output_file={output} \
-Ppodio:output_collections=MCParticles,ReconstructedChargedParticles,ReconstructedTruthSeededChargedParticles,CentralCKFTrackAssociations,CentralCKFTruthSeededTrackAssociations,CentralTrackVertices
"""

Expand Down