Skip to content

Commit 481b934

Browse files
author
Michał Sieczczyński
committed
Merge remote-tracking branch 'origin/master' into pr/nhcal_acceptance
2 parents de6e52c + 2ce151d commit 481b934

File tree

8 files changed

+783
-1
lines changed

8 files changed

+783
-1
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ get_data:
126126
include:
127127
- local: 'benchmarks/backgrounds/config.yml'
128128
- local: 'benchmarks/backwards_ecal/config.yml'
129+
- local: 'benchmarks/beamline/config.yml'
129130
- local: 'benchmarks/calo_pid/config.yml'
130131
- local: 'benchmarks/ecal_gaps/config.yml'
131132
- local: 'benchmarks/tracking_detectors/config.yml'
@@ -163,6 +164,7 @@ deploy_results:
163164
- "collect_results:backwards_ecal"
164165
- "collect_results:barrel_ecal"
165166
- "collect_results:barrel_hcal"
167+
- "collect_results:beamline"
166168
- "collect_results:calo_pid"
167169
- "collect_results:ecal_gaps"
168170
- "collect_results:lfhcal"

Snakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def find_epic_libraries():
3333
include: "benchmarks/backgrounds/Snakefile"
3434
include: "benchmarks/backwards_ecal/Snakefile"
3535
include: "benchmarks/barrel_ecal/Snakefile"
36+
include: "benchmarks/beamline/Snakefile"
3637
include: "benchmarks/calo_pid/Snakefile"
3738
include: "benchmarks/ecal_gaps/Snakefile"
3839
include: "benchmarks/material_scan/Snakefile"

benchmarks/backwards_ecal/backwards_ecal.org

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ study.
147147

148148
#+begin_src jupyter-python
149149
e_over_p_hist = {}
150-
e_over_p_axis = bh.axis.Regular(101, 0., 1.01)
150+
e_over_p_axis = bh.axis.Regular(110, 0., 1.10)
151151

152152
for ix, energy in enumerate(energies):
153153
for particle_name, dataset in [("e-", e_eval[energy]), ("pi-", pi_eval[energy])]:

benchmarks/beamline/Snakefile

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
SIMOUTDIR="sim_output/beamline/"
2+
ANALYSISDIR=SIMOUTDIR+"analysis/"
3+
4+
rule beamline_steering_sim:
5+
input:
6+
macro=workflow.source_path("beamlineGPS.mac"),
7+
output:
8+
SIMOUTDIR+"beamlineTest{CAMPAIGN}.edm4hep.root",
9+
shell:
10+
"""
11+
exec npsim \
12+
--runType run \
13+
--enableG4GPS \
14+
--macroFile {input.macro} \
15+
--compactFile $DETECTOR_PATH/epic_ip6_extended.xml \
16+
--outputFile {output} \
17+
"""
18+
19+
rule beamline_steering_analysis:
20+
params:
21+
xml=os.getenv("DETECTOR_PATH")+"/epic_ip6_extended.xml",
22+
input:
23+
script=workflow.source_path("beamlineAnalysis.C"),
24+
header=workflow.source_path("shared_functions.h"),
25+
data=SIMOUTDIR+"beamlineTest{CAMPAIGN}.edm4hep.root",
26+
output:
27+
rootfile=ANALYSISDIR+"beamlineTestAnalysis{CAMPAIGN}.root",
28+
beamspot_canvas=ANALYSISDIR+"beamspot_{CAMPAIGN}.png",
29+
x_px_canvas=ANALYSISDIR+"x_px_{CAMPAIGN}.png",
30+
y_py_canvas=ANALYSISDIR+"y_py_{CAMPAIGN}.png",
31+
fitted_position_means_stdevs_canvas=ANALYSISDIR+"fitted_position_means_stdevs_{CAMPAIGN}.png",
32+
fitted_momentum_means_stdevs_canvas=ANALYSISDIR+"fitted_momentum_means_stdevs_{CAMPAIGN}.png",
33+
pipe_parameter_canvas=ANALYSISDIR+"pipe_parameter_{CAMPAIGN}.png",
34+
shell:
35+
"""
36+
root -l -b -q '{input.script}("{input.data}", "{output.rootfile}", "{params.xml}",
37+
"{output.beamspot_canvas}", "{output.x_px_canvas}", "{output.y_py_canvas}",
38+
"{output.fitted_position_means_stdevs_canvas}", "{output.fitted_momentum_means_stdevs_canvas}",
39+
"{output.pipe_parameter_canvas}")'
40+
"""
41+
42+
rule beamline:
43+
input:
44+
ANALYSISDIR+"beamlineTestAnalysis{CAMPAIGN}.root",
45+
ANALYSISDIR+"beamspot_{CAMPAIGN}.png",
46+
ANALYSISDIR+"x_px_{CAMPAIGN}.png",
47+
ANALYSISDIR+"y_py_{CAMPAIGN}.png",
48+
ANALYSISDIR+"fitted_position_means_stdevs_{CAMPAIGN}.png",
49+
ANALYSISDIR+"fitted_momentum_means_stdevs_{CAMPAIGN}.png",
50+
ANALYSISDIR+"pipe_parameter_{CAMPAIGN}.png",
51+
output:
52+
directory("results/beamline/{CAMPAIGN}/")
53+
shell:
54+
"""
55+
mkdir {output}
56+
cp {input} {output}
57+
"""
58+
59+
rule beamline_local:
60+
input:
61+
"results/beamline/local/"

0 commit comments

Comments
 (0)