@@ -6,30 +6,30 @@ def get_n_events(wildcards):
66
77
88rule femc_electron_generate :
9- input :
10- script = "benchmarks/femc_electron/analysis/gen_particles.cxx" ,
11- params :
12- N_EVENTS = get_n_events ,
13- th_max = 28 ,
14- th_min = 2.0
15- output :
16- GEN_FILE = "sim_output/femc_electron/e-_{P}GeV.hepmc"
17- shell :
18- """
9+ input :
10+ script = "benchmarks/femc_electron/analysis/gen_particles.cxx" ,
11+ params :
12+ N_EVENTS = get_n_events ,
13+ th_max = 28 ,
14+ th_min = 2.0
15+ output :
16+ GEN_FILE = "sim_output/femc_electron/e-_{P}GeV.hepmc"
17+ shell :
18+ """
1919mkdir -p sim_output/femc_electron
2020root -l -b -q '{input.script}({params.N_EVENTS},"{output.GEN_FILE}", "e-", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})'
2121"""
2222
2323rule femc_electron_simulate :
24- input :
25- GEN_FILE = "sim_output/femc_electron/e-_{P}GeV.hepmc"
26- params :
27- N_EVENTS = get_n_events ,
28- PHYSICS_LIST = "FTFP_BERT"
29- output :
30- SIM_FILE = "sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root"
31- shell :
32- """
24+ input :
25+ GEN_FILE = "sim_output/femc_electron/e-_{P}GeV.hepmc"
26+ params :
27+ N_EVENTS = get_n_events ,
28+ PHYSICS_LIST = "FTFP_BERT"
29+ output :
30+ SIM_FILE = "sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root"
31+ shell :
32+ """
3333# Running simulation
3434npsim \
3535 --compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
@@ -40,27 +40,27 @@ npsim \
4040"""
4141
4242rule femc_electron_recon :
43- input :
44- SIM_FILE = "sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root"
45- output :
46- REC_FILE = "sim_output/femc_electron/{DETECTOR_CONFIG}_rec_e-_{P}GeV.edm4eic.root"
47- params :
48- N_EVENTS = get_n_events ,
49- shell :
50- """
43+ input :
44+ SIM_FILE = "sim_output/femc_electron/{DETECTOR_CONFIG}_sim_e-_{P}GeV.edm4hep.root"
45+ output :
46+ REC_FILE = "sim_output/femc_electron/{DETECTOR_CONFIG}_rec_e-_{P}GeV.edm4eic.root"
47+ params :
48+ N_EVENTS = get_n_events ,
49+ shell :
50+ """
5151eicrecon {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}
5252"""
5353
5454rule femc_electron_analysis :
55- input :
56- expand ("sim_output/femc_electron/{DETECTOR_CONFIG}_rec_e-_{P}GeV.edm4eic.root" ,
57- P = [10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 ],
58- DETECTOR_CONFIG = ["{DETECTOR_CONFIG}" ]),
59- script = "benchmarks/femc_electron/analysis/femc_electron_plots.py" ,
60- output :
61- results_dir = directory ("results/{DETECTOR_CONFIG}/femc_electron" ),
62- shell :
63- """
55+ input :
56+ expand ("sim_output/femc_electron/{DETECTOR_CONFIG}_rec_e-_{P}GeV.edm4eic.root" ,
57+ P = [10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 ],
58+ DETECTOR_CONFIG = ["{DETECTOR_CONFIG}" ]),
59+ script = "benchmarks/femc_electron/analysis/femc_electron_plots.py" ,
60+ output :
61+ results_dir = directory ("results/{DETECTOR_CONFIG}/femc_electron" ),
62+ shell :
63+ """
6464mkdir -p {output.results_dir}
6565python {input.script} {output.results_dir}
6666"""
0 commit comments