From 8f14f3171ebe59f935943c59404d6f840aae550f Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Fri, 11 Oct 2024 03:37:06 -0400 Subject: [PATCH] benchmarks/femc_*: use spaces consistently --- benchmarks/femc_electron/Snakefile | 72 +++++++++++++++--------------- benchmarks/femc_photon/Snakefile | 72 +++++++++++++++--------------- benchmarks/femc_pi0/Snakefile | 72 +++++++++++++++--------------- 3 files changed, 108 insertions(+), 108 deletions(-) diff --git a/benchmarks/femc_electron/Snakefile b/benchmarks/femc_electron/Snakefile index c2a8369..13e8b73 100644 --- a/benchmarks/femc_electron/Snakefile +++ b/benchmarks/femc_electron/Snakefile @@ -6,30 +6,30 @@ def get_n_events(wildcards): rule femc_electron_generate: - input: - script="benchmarks/femc_electron/analysis/gen_particles.cxx", - params: - N_EVENTS=get_n_events, - th_max=28, - th_min=2.0 - output: - GEN_FILE="sim_output/femc_electron/e-_{P}GeV.hepmc" - shell: - """ + input: + script="benchmarks/femc_electron/analysis/gen_particles.cxx", + params: + N_EVENTS=get_n_events, + th_max=28, + th_min=2.0 + output: + GEN_FILE="sim_output/femc_electron/e-_{P}GeV.hepmc" + shell: + """ mkdir -p sim_output/femc_electron root -l -b -q '{input.script}({params.N_EVENTS},"{output.GEN_FILE}", "e-", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})' """ rule femc_electron_simulate: - input: - GEN_FILE="sim_output/femc_electron/e-_{P}GeV.hepmc" - params: - N_EVENTS=get_n_events, - PHYSICS_LIST="FTFP_BERT" - output: - SIM_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root" - shell: - """ + input: + GEN_FILE="sim_output/femc_electron/e-_{P}GeV.hepmc" + params: + N_EVENTS=get_n_events, + PHYSICS_LIST="FTFP_BERT" + output: + SIM_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root" + shell: + """ # Running simulation npsim \ --compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \ @@ -40,27 +40,27 @@ npsim \ """ rule femc_electron_recon: - input: - SIM_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root" - output: - REC_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_rec_e-_{P}GeV.edm4eic.root" - params: - N_EVENTS=get_n_events, - shell: - """ + input: + SIM_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root" + output: + REC_FILE="sim_output/femc_electron/{DETECTOR_CONFIG}_rec_e-_{P}GeV.edm4eic.root" + params: + N_EVENTS=get_n_events, + shell: + """ eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_files=$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml -Ppodio:output_collections=MCParticles,HcalEndcapPInsertRecHits,HcalEndcapPInsertClusters,HcalEndcapPInsertSubcellHits,EcalEndcapPInsertRecHits,EcalEndcapPInsertClusters,EcalEndcapPInsertRecHits,EcalEndcapPClusters -Pjana:nevents={params.N_EVENTS} """ rule femc_electron_analysis: - input: - expand("sim_output/femc_electron/{DETECTOR_CONFIG}_rec_e-_{P}GeV.edm4eic.root", - P=[10, 20, 30, 40, 50, 60, 70, 80], - DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]), - script="benchmarks/femc_electron/analysis/femc_electron_plots.py", - output: - results_dir=directory("results/{DETECTOR_CONFIG}/femc_electron"), - shell: - """ + input: + expand("sim_output/femc_electron/{DETECTOR_CONFIG}_rec_e-_{P}GeV.edm4eic.root", + P=[10, 20, 30, 40, 50, 60, 70, 80], + DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]), + script="benchmarks/femc_electron/analysis/femc_electron_plots.py", + output: + results_dir=directory("results/{DETECTOR_CONFIG}/femc_electron"), + shell: + """ mkdir -p {output.results_dir} python {input.script} {output.results_dir} """ diff --git a/benchmarks/femc_photon/Snakefile b/benchmarks/femc_photon/Snakefile index cf97604..d92a3cd 100644 --- a/benchmarks/femc_photon/Snakefile +++ b/benchmarks/femc_photon/Snakefile @@ -6,30 +6,30 @@ def get_n_events(wildcards): rule femc_photon_generate: - input: - script="benchmarks/femc_photon/analysis/gen_particles.cxx", - params: - N_EVENTS=get_n_events, - th_max=28, - th_min=2.0 - output: - GEN_FILE="sim_output/femc_photon/photon_{P}GeV.hepmc" - shell: - """ + input: + script="benchmarks/femc_photon/analysis/gen_particles.cxx", + params: + N_EVENTS=get_n_events, + th_max=28, + th_min=2.0 + output: + GEN_FILE="sim_output/femc_photon/photon_{P}GeV.hepmc" + shell: + """ mkdir -p sim_output/femc_photon root -l -b -q '{input.script}({params.N_EVENTS},"{output.GEN_FILE}", "gamma", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})' """ rule femc_photon_simulate: - input: - GEN_FILE="sim_output/femc_photon/photon_{P}GeV.hepmc" - params: - N_EVENTS=get_n_events, - PHYSICS_LIST="FTFP_BERT" - output: - SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root" - shell: - """ + input: + GEN_FILE="sim_output/femc_photon/photon_{P}GeV.hepmc" + params: + N_EVENTS=get_n_events, + PHYSICS_LIST="FTFP_BERT" + output: + SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root" + shell: + """ # Running simulation npsim \ --compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \ @@ -40,27 +40,27 @@ npsim \ """ rule femc_photon_recon: - input: - SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root" - output: - REC_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_rec_photon_{P}GeV.edm4eic.root" - params: - N_EVENTS=get_n_events, - shell: - """ + input: + SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root" + output: + REC_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_rec_photon_{P}GeV.edm4eic.root" + params: + N_EVENTS=get_n_events, + shell: + """ eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_files=$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml -Ppodio:output_collections=MCParticles,HcalEndcapPInsertRecHits,HcalEndcapPInsertClusters,HcalEndcapPInsertSubcellHits,EcalEndcapPInsertRecHits,EcalEndcapPInsertClusters,EcalEndcapPInsertRecHits,EcalEndcapPClusters -Pjana:nevents={params.N_EVENTS} """ rule femc_photon_analysis: - input: - expand("sim_output/femc_photon/{DETECTOR_CONFIG}_rec_photon_{P}GeV.edm4eic.root", - P=[10, 20, 30, 40, 50, 60, 70, 80], - DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]), - script="benchmarks/femc_photon/analysis/femc_photon_plots.py", - output: - results_dir=directory("results/{DETECTOR_CONFIG}/femc_photon"), - shell: - """ + input: + expand("sim_output/femc_photon/{DETECTOR_CONFIG}_rec_photon_{P}GeV.edm4eic.root", + P=[10, 20, 30, 40, 50, 60, 70, 80], + DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]), + script="benchmarks/femc_photon/analysis/femc_photon_plots.py", + output: + results_dir=directory("results/{DETECTOR_CONFIG}/femc_photon"), + shell: + """ mkdir -p {output.results_dir} python {input.script} {output.results_dir} """ diff --git a/benchmarks/femc_pi0/Snakefile b/benchmarks/femc_pi0/Snakefile index 49497f0..9b8713a 100644 --- a/benchmarks/femc_pi0/Snakefile +++ b/benchmarks/femc_pi0/Snakefile @@ -6,30 +6,30 @@ def get_n_events(wildcards): rule femc_pi0_generate: - input: - script="benchmarks/femc_pi0/analysis/gen_particles.cxx", - params: - N_EVENTS=get_n_events, - th_max=28, - th_min=2.0 - output: - GEN_FILE="sim_output/femc_pi0/pi0_{P}GeV.hepmc" - shell: - """ + input: + script="benchmarks/femc_pi0/analysis/gen_particles.cxx", + params: + N_EVENTS=get_n_events, + th_max=28, + th_min=2.0 + output: + GEN_FILE="sim_output/femc_pi0/pi0_{P}GeV.hepmc" + shell: + """ mkdir -p sim_output/femc_pi0 root -l -b -q '{input.script}({params.N_EVENTS},"{output.GEN_FILE}", "pi0", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})' """ rule femc_pi0_simulate: - input: - GEN_FILE="sim_output/femc_pi0/pi0_{P}GeV.hepmc" - params: - N_EVENTS=get_n_events, - PHYSICS_LIST="FTFP_BERT" - output: - SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root" - shell: - """ + input: + GEN_FILE="sim_output/femc_pi0/pi0_{P}GeV.hepmc" + params: + N_EVENTS=get_n_events, + PHYSICS_LIST="FTFP_BERT" + output: + SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root" + shell: + """ # Running simulation npsim \ --compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \ @@ -40,27 +40,27 @@ npsim \ """ rule femc_pi0_recon: - input: - SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root" - output: - REC_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_rec_pi0_{P}GeV.edm4eic.root" - params: - N_EVENTS=get_n_events, - shell: - """ + input: + SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root" + output: + REC_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_rec_pi0_{P}GeV.edm4eic.root" + params: + N_EVENTS=get_n_events, + shell: + """ eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_files=$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml -Ppodio:output_collections=MCParticles,HcalEndcapPInsertRecHits,HcalEndcapPInsertClusters,HcalEndcapPInsertSubcellHits,EcalEndcapPInsertRecHits,EcalEndcapPInsertClusters,EcalEndcapPInsertRecHits,EcalEndcapPClusters -Pjana:nevents={params.N_EVENTS} """ rule femc_pi0_analysis: - input: - expand("sim_output/femc_pi0/{DETECTOR_CONFIG}_rec_pi0_{P}GeV.edm4eic.root", - P=[10, 20, 30, 40, 50, 60, 70, 80], - DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]), - script="benchmarks/femc_pi0/analysis/femc_pi0_plots.py", - output: - results_dir=directory("results/{DETECTOR_CONFIG}/femc_pi0"), - shell: - """ + input: + expand("sim_output/femc_pi0/{DETECTOR_CONFIG}_rec_pi0_{P}GeV.edm4eic.root", + P=[10, 20, 30, 40, 50, 60, 70, 80], + DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]), + script="benchmarks/femc_pi0/analysis/femc_pi0_plots.py", + output: + results_dir=directory("results/{DETECTOR_CONFIG}/femc_pi0"), + shell: + """ mkdir -p {output.results_dir} python {input.script} {output.results_dir} """