Back to home page

EIC code displayed by LXR

 
 

    


Warning, /detector_benchmarks/benchmarks/zdc_sigma/Snakefile is written in an unsupported language. File is not indexed.

0001 rule zdc_sigma_generate:
0002         input:
0003                 script="benchmarks/zdc_sigma/analysis/gen_sigma_decay.cxx",
0004         params:
0005                 NEVENTS_GEN=100000,
0006         output:
0007                 GEN_FILE="sim_output/zdc_sigma/sigma_decay_{P}GeV.hepmc"
0008         shell:
0009                 """
0010 root -l -b -q '{input.script}({params.NEVENTS_GEN},0,"{output.GEN_FILE}",{wildcards.P},{wildcards.P})'
0011 """
0012 
0013 rule zdc_sigma_simulate:
0014         input:
0015                 GEN_FILE="sim_output/zdc_sigma/sigma_decay_{P}GeV.hepmc"
0016         params:
0017                 PHYSICS_LIST="FTFP_BERT"
0018         output:
0019                 SIM_FILE="sim_output/zdc_sigma/{DETECTOR_CONFIG}_sim_sigma_dec_{P}GeV.edm4hep.root"
0020         shell:
0021                 """
0022 if [[ {wildcards.P} -gt 220 ]]; then
0023    NEVENTS_SIM=500
0024 else
0025    NEVENTS_SIM=1000
0026 fi
0027 # Running simulation
0028 npsim \
0029    --compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
0030    --numberOfEvents $NEVENTS_SIM \
0031    --physicsList {params.PHYSICS_LIST} \
0032    --inputFiles {input.GEN_FILE} \
0033    --outputFile {output.SIM_FILE}
0034 """
0035 
0036 rule zdc_sigma_recon:
0037         input:
0038                 SIM_FILE="sim_output/zdc_sigma/{DETECTOR_CONFIG}_sim_sigma_dec_{P}GeV.edm4hep.root"
0039         output:
0040                 REC_FILE="sim_output/zdc_sigma/{DETECTOR_CONFIG}_rec_sigma_dec_{P}GeV.edm4eic.root"
0041         shell:
0042                 """
0043 if [[ {wildcards.P} -gt 220 ]]; then
0044    NEVENTS_REC=500
0045 else
0046    NEVENTS_REC=1000
0047 fi
0048 eicrecon {input.SIM_FILE} -Ppodio:output_file={output.REC_FILE} -Pdd4hep:xml_files=$DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml -Ppodio:output_collections=MCParticles,HcalFarForwardZDCClusters,HcalFarForwardZDCRecHits,HcalFarForwardZDCSubcellHits  -Pjana:nevents=$NEVENTS_REC
0049 """
0050 
0051 rule zdc_sigma_analysis:
0052         input:
0053                 expand("sim_output/zdc_sigma/{DETECTOR_CONFIG}_rec_sigma_dec_{P}GeV.edm4eic.root",
0054                     P=[100, 125, 150,175, 200, 225, 250, 275],
0055                     DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]),
0056                 script="benchmarks/zdc_sigma/analysis/sigma_plots.py",
0057         output:
0058                 results_dir=directory("results/{DETECTOR_CONFIG}/zdc_sigma"),
0059         shell:
0060                 """
0061 mkdir -p {output.results_dir}
0062 python {input.script} {output.results_dir}
0063 """