diff --git a/Snakefile b/Snakefile index d72b6952..62c31acd 100644 --- a/Snakefile +++ b/Snakefile @@ -21,6 +21,21 @@ include: "benchmarks/backgrounds/Snakefile" include: "benchmarks/barrel_ecal/Snakefile" include: "benchmarks/ecal_gaps/Snakefile" + +rule warmup_run: + output: + "warmup/{DETECTOR_CONFIG}.edm4hep.root", + message: "Ensuring that calibrations/fieldmaps are available for {wildcards.DETECTOR_CONFIG}" + shell: """ +ddsim \ + --runType batch \ + --numberOfEvents 1 \ + --compactFile "$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml" \ + --outputFile "{output}" \ + --enableGun +""" + + rule matplotlibrc: output: ".matplotlibrc", diff --git a/benchmarks/backgrounds/Snakefile b/benchmarks/backgrounds/Snakefile index f8991097..300e38b0 100644 --- a/benchmarks/backgrounds/Snakefile +++ b/benchmarks/backgrounds/Snakefile @@ -34,7 +34,8 @@ rule backgrounds_get_DIS: rule backgrounds_sim: input: - "input/backgrounds/{NAME}.hepmc", + hepmc="input/backgrounds/{NAME}.hepmc", + warmup="warmup/{DETECTOR_CONFIG}.edm4hep.root", output: "sim_output/{DETECTOR_CONFIG}/backgrounds/{NAME}.edm4hep.root", log: @@ -50,7 +51,7 @@ ddsim \ -v WARNING \ --numberOfEvents {params.N_EVENTS} \ --compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \ - --inputFiles {input} \ + --inputFiles {input.hepmc} \ --outputFile {output} """ diff --git a/benchmarks/ecal_gaps/Snakefile b/benchmarks/ecal_gaps/Snakefile index 2cf76ec8..a312ac1e 100644 --- a/benchmarks/ecal_gaps/Snakefile +++ b/benchmarks/ecal_gaps/Snakefile @@ -4,6 +4,7 @@ import os rule ecal_gaps_sim: input: steering_file=provider.remote(remote_path("EPIC/EVGEN/SINGLE/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.steer")), + warmup="warmup/{DETECTOR_CONFIG}.edm4hep.root", output: "sim_output/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.edm4hep.root", log: