Back to home page

EIC code displayed by LXR

 
 

    


Warning, /physics_benchmarks/benchmarks/Jets-HF/jets/Snakefile is written in an unsupported language. File is not indexed.

0001 # Jets-HF benchmark
0002 # Note: The analysis uses podio::CreateDataFrame (works with both TTree and RNTuple),
0003 # but this Snakefile currently expects `.edm4eic.rnt.root` inputs in the rules below.
0004 # For RNTuple files (recommended), generate with:
0005 #   eicrecon input.edm4hep.root -Ppodio:output_file=output.edm4eic.rnt.root -Ppodio:output_backend=rntuple
0006 # For TTree files (legacy), update the `data=` patterns below to `.edm4eic.root`.
0007 
0008 import shutil
0009 
0010 
0011 rule jets_compile:
0012     input:
0013         ROOT_BUILD_DIR_PREFIX + "benchmarks/Jets-HF/jets/analysis/jets_cxx.so",
0014 
0015 
0016 rule jets_generate_config:
0017     input:
0018         data="sim_output/{DETECTOR_CONFIG}/pythia8NCDIS_{EBEAM}x{PBEAM}_minQ2={MINQ2}_beamEffects_xAngle=-0.025_hiDiv_1.0000.eicrecon.edm4eic.rnt.root",
0019     output:
0020         config="results/{DETECTOR_CONFIG}/jets/{EBEAM}on{PBEAM}/minQ2={MINQ2}_config.json",
0021     shell: """
0022 cat > {output.config} <<EOF
0023 {{
0024   "rec_file": "{input.data}",
0025   "detector": "{wildcards.DETECTOR_CONFIG}",
0026   "output_prefix": "results/{wildcards.DETECTOR_CONFIG}/jets/{wildcards.EBEAM}on{wildcards.PBEAM}/minQ2={wildcards.MINQ2}/jets_{wildcards.EBEAM}x{wildcards.PBEAM}_minQ2={wildcards.MINQ2}",
0027   "results_path": "results/{wildcards.DETECTOR_CONFIG}/jets/{wildcards.EBEAM}on{wildcards.PBEAM}/minQ2={wildcards.MINQ2}",
0028   "ebeam": {wildcards.EBEAM},
0029   "pbeam": {wildcards.PBEAM},
0030   "minq2": {wildcards.MINQ2},
0031   "plot_tag": "jets_{wildcards.EBEAM}x{wildcards.PBEAM}_minQ2={wildcards.MINQ2}",
0032   "test_tag": "jets_{wildcards.EBEAM}x{wildcards.PBEAM}_minQ2={wildcards.MINQ2}"
0033 }}
0034 EOF
0035 """
0036 
0037 
0038 rule jets_analysis_jets:
0039     input:
0040         script="benchmarks/Jets-HF/jets/analysis/jets.cxx",
0041         script_compiled=ROOT_BUILD_DIR_PREFIX + "benchmarks/Jets-HF/jets/analysis/jets_cxx.so",
0042         data="sim_output/{DETECTOR_CONFIG}/pythia8NCDIS_{EBEAM}x{PBEAM}_minQ2={MINQ2}_beamEffects_xAngle=-0.025_hiDiv_1.0000.eicrecon.edm4eic.rnt.root",
0043         config="results/{DETECTOR_CONFIG}/jets/{EBEAM}on{PBEAM}/minQ2={MINQ2}_config.json",
0044     output:
0045         results_path=directory("results/{DETECTOR_CONFIG}/jets/{EBEAM}on{PBEAM}/minQ2={MINQ2}"),
0046     wildcard_constraints:
0047         EBEAM=r"\d+",
0048         PBEAM=r"\d+",
0049         MINQ2=r"\d+",
0050     shell: """
0051 mkdir {output.results_path}
0052 root -l -b -q '{input.script}+("{input.config}")'
0053 """