Skip to content
Snippets Groups Projects
Commit e245ba64 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin
Browse files

lambda/Snakefile: adjust output paths, don't upload edm4hep files to artifacts

parent 7df12ae2
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ rule lambda_generate: ...@@ -4,7 +4,7 @@ rule lambda_generate:
params: params:
NEVENTS_GEN=100000, NEVENTS_GEN=100000,
output: output:
GEN_FILE="results/lambda/lambda_decay_{P}GeV.hepmc" GEN_FILE="sim_output/lambda/lambda_decay_{P}GeV.hepmc"
shell: shell:
""" """
mkdir -p results/lambda mkdir -p results/lambda
...@@ -13,11 +13,11 @@ root -l -b -q '{input.script}({params.NEVENTS_GEN},0,"{output.GEN_FILE}",{wildca ...@@ -13,11 +13,11 @@ root -l -b -q '{input.script}({params.NEVENTS_GEN},0,"{output.GEN_FILE}",{wildca
rule lambda_simulate: rule lambda_simulate:
input: input:
GEN_FILE="results/lambda/lambda_decay_{P}GeV.hepmc" GEN_FILE="sim_output/lambda/lambda_decay_{P}GeV.hepmc"
params: params:
PHYSICS_LIST="FTFP_BERT" PHYSICS_LIST="FTFP_BERT"
output: output:
SIM_FILE="results/lambda/{DETECTOR_CONFIG}_sim_lambda_dec_{P}GeV.edm4hep.root" SIM_FILE="sim_output/lambda/{DETECTOR_CONFIG}_sim_lambda_dec_{P}GeV.edm4hep.root"
shell: shell:
""" """
if [[ {wildcards.P} -gt 225 ]]; then if [[ {wildcards.P} -gt 225 ]]; then
...@@ -36,9 +36,9 @@ npsim \ ...@@ -36,9 +36,9 @@ npsim \
rule lambda_recon: rule lambda_recon:
input: input:
SIM_FILE="results/lambda/{DETECTOR_CONFIG}_sim_lambda_dec_{P}GeV.edm4hep.root" SIM_FILE="sim_output/lambda/{DETECTOR_CONFIG}_sim_lambda_dec_{P}GeV.edm4hep.root"
output: output:
REC_FILE="results/lambda/{DETECTOR_CONFIG}_rec_lambda_dec_{P}GeV.edm4hep.root" REC_FILE="sim_output/lambda/{DETECTOR_CONFIG}_rec_lambda_dec_{P}GeV.edm4hep.root"
shell: shell:
""" """
if [[ {wildcards.P} -gt 225 ]]; then if [[ {wildcards.P} -gt 225 ]]; then
...@@ -51,12 +51,12 @@ eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_fil ...@@ -51,12 +51,12 @@ eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_fil
rule lambda_analysis: rule lambda_analysis:
input: input:
expand("results/lambda/{DETECTOR_CONFIG}_rec_lambda_dec_{P}GeV.edm4hep.root", expand("sim_output/lambda/{DETECTOR_CONFIG}_rec_lambda_dec_{P}GeV.edm4hep.root",
P=[100, 125, 150,175, 200, 225, 250, 275], P=[100, 125, 150,175, 200, 225, 250, 275],
DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]), DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]),
script="benchmarks/lambda/analysis/lambda_plots.py", script="benchmarks/lambda/analysis/lambda_plots.py",
output: output:
results_dir=directory("results/lambda/results_{DETECTOR_CONFIG}_lambda_dec"), results_dir=directory("results/{DETECTOR_CONFIG}/lambda"),
shell: shell:
""" """
mkdir -p {output.results_dir} mkdir -p {output.results_dir}
......
...@@ -18,7 +18,7 @@ import uproot as ur ...@@ -18,7 +18,7 @@ import uproot as ur
arrays_sim={} arrays_sim={}
momenta=100, 125, 150, 175,200,225,250,275 momenta=100, 125, 150, 175,200,225,250,275
for p in momenta: for p in momenta:
filename=f'results/lambda/epic_zdc_sipm_on_tile_only_rec_lambda_dec_{p}GeV.edm4hep.root' filename=f'sim_output/lambda/epic_zdc_sipm_on_tile_only_rec_lambda_dec_{p}GeV.edm4hep.root'
print("opening file", filename) print("opening file", filename)
events = ur.open(filename+':events') events = ur.open(filename+':events')
arrays_sim[p] = events.arrays()[:-1] #remove last event, which for some reason is blank arrays_sim[p] = events.arrays()[:-1] #remove last event, which for some reason is blank
......
lambda:simulate: lambda:simulate:
stage: simulate stage: simulate
extends: .phy_benchmark extends: .phy_benchmark
...@@ -15,14 +14,21 @@ lambda:simulate: ...@@ -15,14 +14,21 @@ lambda:simulate:
- P: 275 - P: 275
timeout: 6 hours timeout: 6 hours
script: script:
- snakemake --cores 1 results/lambda/epic_zdc_sipm_on_tile_only_rec_lambda_dec_${P}GeV.edm4hep.root - snakemake --cores 1 sim_output/lambda/epic_zdc_sipm_on_tile_only_rec_lambda_dec_${P}GeV.edm4hep.root
retry: retry:
max: 2 max: 2
when: when:
- runner_system_failure - runner_system_failure
lambda:analyze:
stage: analyze
extends: .phy_benchmark
needs: ["lambda:simulate"]
script:
- snakemake --cores 1 results/epic_zdc_sipm_on_tile_only/lambda
lambda:results: lambda:results:
stage: collect stage: collect
needs: ["lambda:simulate"] needs: ["lambda:analyze"]
script: script:
- python benchmarks/lambda/analysis/lambda_plots.py results/lambda/results_epic_zdc_sipm_on_tile_only_lambda_dec - ls -al
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment