diff --git a/Snakefile b/Snakefile index 7389e85f5fa876d5115cc9607d0b017f07b72b70..b01ad5e21b0c9e6cb1747bb6baa4920ba987423e 100644 --- a/Snakefile +++ b/Snakefile @@ -17,4 +17,17 @@ rule compile_analysis: root -l -b -q -e '.L {input}+' """ +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 +""" + include: "benchmarks/diffractive_vm/Snakefile" diff --git a/benchmarks/diffractive_vm/Snakefile b/benchmarks/diffractive_vm/Snakefile index 602212c2a3dee3b4052ca0e3a083e7180ab8d0e0..917169e6d4c2b69f68c08bc1afe00716e8397654 100644 --- a/benchmarks/diffractive_vm/Snakefile +++ b/benchmarks/diffractive_vm/Snakefile @@ -40,7 +40,8 @@ ln {input} {output} rule diffractive_vm_sim: input: - "input/diffractive_vm/sartre_{PARTICLE}_{INDEX}.hepmc", + hepmc="input/diffractive_vm/sartre_{PARTICLE}_{INDEX}.hepmc", + warmup="warmup/{DETECTOR_CONFIG}.edm4hep.root", output: "sim/{DETECTOR_CONFIG}/sartre_{PARTICLE}_{INDEX}.edm4hep.root", params: @@ -54,7 +55,7 @@ ddsim \ -v WARNING \ --numberOfEvents {params.N_EVENTS} \ --compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \ - --inputFiles {input} \ + --inputFiles {input.hepmc} \ --outputFile {output} """