Skip to content

Commit 8f14f31

Browse files
committed
benchmarks/femc_*: use spaces consistently
1 parent 7fc6552 commit 8f14f31

File tree

3 files changed

+108
-108
lines changed

3 files changed

+108
-108
lines changed

benchmarks/femc_electron/Snakefile

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@ def get_n_events(wildcards):
66

77

88
rule 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+
"""
1919
mkdir -p sim_output/femc_electron
2020
root -l -b -q '{input.script}({params.N_EVENTS},"{output.GEN_FILE}", "e-", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})'
2121
"""
2222

2323
rule 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
3434
npsim \
3535
--compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
@@ -40,27 +40,27 @@ npsim \
4040
"""
4141

4242
rule 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+
"""
5151
eicrecon {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

5454
rule 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+
"""
6464
mkdir -p {output.results_dir}
6565
python {input.script} {output.results_dir}
6666
"""

benchmarks/femc_photon/Snakefile

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@ def get_n_events(wildcards):
66

77

88
rule femc_photon_generate:
9-
input:
10-
script="benchmarks/femc_photon/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_photon/photon_{P}GeV.hepmc"
17-
shell:
18-
"""
9+
input:
10+
script="benchmarks/femc_photon/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_photon/photon_{P}GeV.hepmc"
17+
shell:
18+
"""
1919
mkdir -p sim_output/femc_photon
2020
root -l -b -q '{input.script}({params.N_EVENTS},"{output.GEN_FILE}", "gamma", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})'
2121
"""
2222

2323
rule femc_photon_simulate:
24-
input:
25-
GEN_FILE="sim_output/femc_photon/photon_{P}GeV.hepmc"
26-
params:
27-
N_EVENTS=get_n_events,
28-
PHYSICS_LIST="FTFP_BERT"
29-
output:
30-
SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root"
31-
shell:
32-
"""
24+
input:
25+
GEN_FILE="sim_output/femc_photon/photon_{P}GeV.hepmc"
26+
params:
27+
N_EVENTS=get_n_events,
28+
PHYSICS_LIST="FTFP_BERT"
29+
output:
30+
SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root"
31+
shell:
32+
"""
3333
# Running simulation
3434
npsim \
3535
--compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
@@ -40,27 +40,27 @@ npsim \
4040
"""
4141

4242
rule femc_photon_recon:
43-
input:
44-
SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root"
45-
output:
46-
REC_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_rec_photon_{P}GeV.edm4eic.root"
47-
params:
48-
N_EVENTS=get_n_events,
49-
shell:
50-
"""
43+
input:
44+
SIM_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_sim_photon_{P}GeV.edm4hep.root"
45+
output:
46+
REC_FILE="sim_output/femc_photon/{DETECTOR_CONFIG}_rec_photon_{P}GeV.edm4eic.root"
47+
params:
48+
N_EVENTS=get_n_events,
49+
shell:
50+
"""
5151
eicrecon {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

5454
rule femc_photon_analysis:
55-
input:
56-
expand("sim_output/femc_photon/{DETECTOR_CONFIG}_rec_photon_{P}GeV.edm4eic.root",
57-
P=[10, 20, 30, 40, 50, 60, 70, 80],
58-
DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]),
59-
script="benchmarks/femc_photon/analysis/femc_photon_plots.py",
60-
output:
61-
results_dir=directory("results/{DETECTOR_CONFIG}/femc_photon"),
62-
shell:
63-
"""
55+
input:
56+
expand("sim_output/femc_photon/{DETECTOR_CONFIG}_rec_photon_{P}GeV.edm4eic.root",
57+
P=[10, 20, 30, 40, 50, 60, 70, 80],
58+
DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]),
59+
script="benchmarks/femc_photon/analysis/femc_photon_plots.py",
60+
output:
61+
results_dir=directory("results/{DETECTOR_CONFIG}/femc_photon"),
62+
shell:
63+
"""
6464
mkdir -p {output.results_dir}
6565
python {input.script} {output.results_dir}
6666
"""

benchmarks/femc_pi0/Snakefile

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@ def get_n_events(wildcards):
66

77

88
rule femc_pi0_generate:
9-
input:
10-
script="benchmarks/femc_pi0/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_pi0/pi0_{P}GeV.hepmc"
17-
shell:
18-
"""
9+
input:
10+
script="benchmarks/femc_pi0/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_pi0/pi0_{P}GeV.hepmc"
17+
shell:
18+
"""
1919
mkdir -p sim_output/femc_pi0
2020
root -l -b -q '{input.script}({params.N_EVENTS},"{output.GEN_FILE}", "pi0", {params.th_min}, {params.th_max}, 0., 360., {wildcards.P})'
2121
"""
2222

2323
rule femc_pi0_simulate:
24-
input:
25-
GEN_FILE="sim_output/femc_pi0/pi0_{P}GeV.hepmc"
26-
params:
27-
N_EVENTS=get_n_events,
28-
PHYSICS_LIST="FTFP_BERT"
29-
output:
30-
SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root"
31-
shell:
32-
"""
24+
input:
25+
GEN_FILE="sim_output/femc_pi0/pi0_{P}GeV.hepmc"
26+
params:
27+
N_EVENTS=get_n_events,
28+
PHYSICS_LIST="FTFP_BERT"
29+
output:
30+
SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root"
31+
shell:
32+
"""
3333
# Running simulation
3434
npsim \
3535
--compactFile $DETECTOR_PATH/{wildcards.DETECTOR_CONFIG}.xml \
@@ -40,27 +40,27 @@ npsim \
4040
"""
4141

4242
rule femc_pi0_recon:
43-
input:
44-
SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root"
45-
output:
46-
REC_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_rec_pi0_{P}GeV.edm4eic.root"
47-
params:
48-
N_EVENTS=get_n_events,
49-
shell:
50-
"""
43+
input:
44+
SIM_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_sim_pi0_{P}GeV.edm4hep.root"
45+
output:
46+
REC_FILE="sim_output/femc_pi0/{DETECTOR_CONFIG}_rec_pi0_{P}GeV.edm4eic.root"
47+
params:
48+
N_EVENTS=get_n_events,
49+
shell:
50+
"""
5151
eicrecon {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

5454
rule femc_pi0_analysis:
55-
input:
56-
expand("sim_output/femc_pi0/{DETECTOR_CONFIG}_rec_pi0_{P}GeV.edm4eic.root",
57-
P=[10, 20, 30, 40, 50, 60, 70, 80],
58-
DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]),
59-
script="benchmarks/femc_pi0/analysis/femc_pi0_plots.py",
60-
output:
61-
results_dir=directory("results/{DETECTOR_CONFIG}/femc_pi0"),
62-
shell:
63-
"""
55+
input:
56+
expand("sim_output/femc_pi0/{DETECTOR_CONFIG}_rec_pi0_{P}GeV.edm4eic.root",
57+
P=[10, 20, 30, 40, 50, 60, 70, 80],
58+
DETECTOR_CONFIG=["{DETECTOR_CONFIG}"]),
59+
script="benchmarks/femc_pi0/analysis/femc_pi0_plots.py",
60+
output:
61+
results_dir=directory("results/{DETECTOR_CONFIG}/femc_pi0"),
62+
shell:
63+
"""
6464
mkdir -p {output.results_dir}
6565
python {input.script} {output.results_dir}
6666
"""

0 commit comments

Comments
 (0)