Warning, /detector_benchmarks/benchmarks/zdc_pi0/Snakefile is written in an unsupported language. File is not indexed.
0001 rule zdc_pi0_generate:
0002 input:
0003 script="benchmarks/zdc_pi0/analysis/gen_pi0_decay.cxx",
0004 params:
0005 NEVENTS_GEN=1000,
0006 output:
0007 GEN_FILE="sim_output/zdc_pi0/zdc_pi0_{P}GeV.hepmc"
0008 shell:
0009 """
0010 mkdir -p sim_output/zdc_pi0
0011 root -l -b -q '{input.script}({params.NEVENTS_GEN},0,"{output.GEN_FILE}",{wildcards.P},{wildcards.P})'
0012 """
0013
0014 rule zdc_pi0_simulate:
0015 input:
0016 GEN_FILE="sim_output/zdc_pi0/zdc_pi0_{P}GeV.hepmc"
0017 params:
0018 PHYSICS_LIST="FTFP_BERT"
0019 output:
0020 SIM_FILE="sim_output/zdc_pi0/{DETECTOR_CONFIG}_sim_zdc_pi0_{P}GeV.edm4hep.root"
0021 shell:
0022 """
0023 NEVENTS_SIM=1000
0024 # Running simulation
0025 npsim \
0026 --compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
0027 --numberOfEvents $NEVENTS_SIM \
0028 --physicsList {params.PHYSICS_LIST} \
0029 --inputFiles {input.GEN_FILE} \
0030 --outputFile {output.SIM_FILE}
0031 """
0032
0033 rule zdc_pi0_recon:
0034 input:
0035 SIM_FILE="sim_output/zdc_pi0/{DETECTOR_CONFIG}_sim_zdc_pi0_{P}GeV.edm4hep.root"
0036 output:
0037 REC_FILE="sim_output/zdc_pi0/{DETECTOR_CONFIG}_rec_zdc_pi0_{P}GeV.edm4hep.root"
0038 shell:
0039 """
0040 NEVENTS_REC=1000
0041 eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_files=$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml -Ppodio:output_collections=MCParticles,HcalFarForwardZDCRecHits,HcalFarForwardZDCClusters,HcalFarForwardZDCSubcellHits -Pjana:nevents=$NEVENTS_REC
0042 """
0043
0044 rule zdc_pi0_analysis:
0045 input:
0046 expand("sim_output/zdc_pi0/{DETECTOR_CONFIG}_rec_zdc_pi0_{P}GeV.edm4hep.root",
0047 P=[60, 80, 100, 130, 160],
0048 DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]),
0049 script="benchmarks/zdc_pi0/analysis/zdc_pi0_plots.py",
0050 output:
0051 results_dir=directory("results/{DETECTOR_CONFIG}/zdc_pi0"),
0052 shell:
0053 """
0054 mkdir -p {output.results_dir}
0055 python {input.script} {output.results_dir}
0056 """