Skip to content
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

lfhcal: scale event count with momentum #102

Merged
merged 1 commit into from
Nov 13, 2024
Merged
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
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