Skip to content

Commit

Permalink
lfhcal: scale event count with momentum
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl committed Nov 13, 2024
1 parent bd1cd14 commit aa1e19b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion benchmarks/lfhcal/Snakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
def get_n_events(wildcards):
energy = float(wildcards.ENERGY.replace("GeV", "").replace("MeV", "e-3"))
n_events = 1000
n_events = int(n_events // (energy ** 0.5))
return n_events


rule lfhcal_sim:
input:
steering_file="EPIC/EVGEN/SINGLE/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.steer",
Expand All @@ -12,7 +19,7 @@ rule lfhcal_sim:
PHASE_SPACE="3to50deg",
INDEX="\d{4}",
params:
N_EVENTS=1000
N_EVENTS=get_n_events,
shell:
"""
ddsim \
Expand Down

0 comments on commit aa1e19b

Please sign in to comment.