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:
params:
NEVENTS_GEN=100000,
output:
GEN_FILE="results/lambda/lambda_decay_{P}GeV.hepmc"
GEN_FILE="sim_output/lambda/lambda_decay_{P}GeV.hepmc"
shell:
"""
mkdir -p results/lambda
......@@ -13,11 +13,11 @@ root -l -b -q '{input.script}({params.NEVENTS_GEN},0,"{output.GEN_FILE}",{wildca
rule lambda_simulate:
input:
GEN_FILE="results/lambda/lambda_decay_{P}GeV.hepmc"
GEN_FILE="sim_output/lambda/lambda_decay_{P}GeV.hepmc"
params:
PHYSICS_LIST="FTFP_BERT"
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:
"""
if [[ {wildcards.P} -gt 225 ]]; then
......@@ -36,9 +36,9 @@ npsim \
rule lambda_recon:
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:
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:
"""
if [[ {wildcards.P} -gt 225 ]]; then
......@@ -51,12 +51,12 @@ eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_fil
rule lambda_analysis:
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],
DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]),
script="benchmarks/lambda/analysis/lambda_plots.py",
output:
results_dir=directory("results/lambda/results_{DETECTOR_CONFIG}_lambda_dec"),
results_dir=directory("results/{DETECTOR_CONFIG}/lambda"),
shell:
"""
mkdir -p {output.results_dir}
......
......@@ -18,7 +18,7 @@ import uproot as ur
arrays_sim={}
momenta=100, 125, 150, 175,200,225,250,275
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)
events = ur.open(filename+':events')
arrays_sim[p] = events.arrays()[:-1] #remove last event, which for some reason is blank
......
lambda:simulate:
stage: simulate
extends: .phy_benchmark
......@@ -15,14 +14,21 @@ lambda:simulate:
- P: 275
timeout: 6 hours
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:
max: 2
when:
- 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:
stage: collect
needs: ["lambda:simulate"]
needs: ["lambda:analyze"]
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