Warning, /tutorial-developing-benchmarks/files/Snakefile is written in an unsupported language. File is not indexed.
0001 import os
0002
0003 rule your_benchmark_campaign_reco_get:
0004 output:
0005 f"sim_output/rho_10x100_uChannel_Q2of0to10_hiDiv.{% raw %}{{INDEX}}{% endraw %}.eicrecon.tree.edm4eic.root",
0006 retries: 3
0007 shell: """
0008 xrdcp root://dtn-eic.jlab.org//volatile/eic/EPIC/RECO/24.07.0/epic_craterlake/EXCLUSIVE/UCHANNEL_RHO/10x100/rho_10x100_uChannel_Q2of0to10_hiDiv.{wildcards.INDEX}.eicrecon.tree.edm4eic.root {output}
0009 """
0010
0011 rule your_benchmark_analysis:
0012 input:
0013 script=workflow.source_path("analysis/uchannelrho.cxx"),
0014 data=f"sim_output/rho_10x100_uChannel_Q2of0to10_hiDiv.{% raw %}{{INDEX}}{% endraw %}.eicrecon.tree.edm4eic.root",
0015 output:
0016 plots=f"sim_output/campaign_24.07.0_{% raw %}{{INDEX}}{% endraw %}.eicrecon.tree.edm4eic/plots.root",
0017 shell:
0018 """
0019 mkdir -p $(dirname "{output.plots}")
0020 root -l -b -q '{input.script}+("{input.data}","{output.plots}")'
0021 """
0022
0023 rule your_benchmark_combine:
0024 input:
0025 lambda wildcards: expand(
0026 f"sim_output/campaign_24.07.0_{% raw %}{{INDEX:04d}}{% endraw %}.eicrecon.tree.edm4eic/plots.root",
0027 INDEX=range(int(wildcards.N)),
0028 ),
0029 wildcard_constraints:
0030 N="\d+",
0031 output:
0032 f"sim_output/campaign_24.07.0_combined_{% raw %}{{N}}{% endraw %}files.eicrecon.tree.edm4eic.plots.root",
0033 shell:
0034 """
0035 hadd {output} {input}
0036 """
0037
0038 rule your_benchmark_plots:
0039 input:
0040 script=workflow.source_path("macros/plot_rho_physics_benchmark.C"),
0041 plots=f"sim_output/campaign_24.07.0_combined_{% raw %}{{N}}{% endraw %}files.eicrecon.tree.edm4eic.plots.root",
0042 output:
0043 f"sim_output/campaign_24.07.0_combined_{% raw %}{{N}}{% endraw %}files.eicrecon.tree.edm4eic.plots_figures/benchmark_rho_mass.pdf",
0044 shell:
0045 """
0046 if [ ! -d "{input.plots}_figures" ]; then
0047 mkdir "{input.plots}_figures"
0048 echo "{input.plots}_figures directory created successfully."
0049 else
0050 echo "{input.plots}_figures directory already exists."
0051 fi
0052 root -l -b -q '{input.script}("{input.plots}")'
0053 """