Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
physics_benchmarks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
physics_benchmarks
Commits
a96f4670
Commit
a96f4670
authored
2 years ago
by
Tooba Ali
Committed by
Wouter Deconinck
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Truth reconstruction error
parent
25ae90f0
No related branches found
No related tags found
1 merge request
!205
Truth reconstruction error
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/dis/analysis/truth_reconstruction.py
+7
-8
7 additions, 8 deletions
benchmarks/dis/analysis/truth_reconstruction.py
with
7 additions
and
8 deletions
benchmarks/dis/analysis/truth_reconstruction.py
+
7
−
8
View file @
a96f4670
...
...
@@ -224,13 +224,11 @@ for i in range(len(MC_list)): #Repeat the following steps for each variable (mom
if
i
==
0
:
# for momentum
ax1
.
set_ylim
(
1
-
(
Y_error
[
0
][
4
]
*
10
),
1
+
(
Y_error
[
0
][
4
]
*
10
))
center
=
1
shift
=
0
else
:
# for angles
ax1
.
set_ylim
(
0
-
(
Y_error
[
0
][
4
]
*
10
),
0
+
(
Y_error
[
0
][
4
]
*
10
))
center
=
0
shift
=
0.1
for
each_bin
in
range
(
len
(
Y_error
[
0
][
0
])):
ax1
.
text
(
x
=
Y_error
[
0
][
0
][
each_bin
]
-
shift
,
y
=
center
+
Y_error
[
0
][
4
]
*
7
,
s
=
'
\u03BC
= %.3f
\n\u03C3
= %.3f
'
%
(
Y_error
[
0
][
1
][
each_bin
],
Y_error
[
0
][
3
][
each_bin
]),
size
=
text_size
)
ax1
.
text
(
x
=
Y_error
[
0
][
0
][
each_bin
],
y
=
center
+
Y_error
[
0
][
4
]
*
7
,
s
=
'
\u03BC
= %.3f
\n\u03C3
= %.3f
'
%
(
Y_error
[
0
][
1
][
each_bin
],
Y_error
[
0
][
3
][
each_bin
]),
size
=
text_size
,
horizontalalignment
=
'
center
'
,
verticalalignment
=
'
top
'
)
ax1
.
set_title
(
'
%s %s with error bars %s %s events
\n
DETECTOR_CONFIG: %s
'
%
(
title_list
[
i
],
title
,
config
,
Nevents
,
Dconfig
))
plt
.
savefig
(
os
.
path
.
join
(
r_path
,
'
%s_%s_error_%s.png
'
%
(
title_list
[
i
],
title
,
config
)))
...
...
@@ -294,7 +292,7 @@ for i in range(len(MC_list)): #Repeat the following steps for each variable (mom
ax1
.
set_ylim
(
0
-
(
Y_error
[
0
][
4
]
*
10
),
0
+
(
Y_error
[
0
][
4
]
*
10
))
for
each_bin
in
range
(
len
(
Y_error
[
0
][
0
])):
ax1
.
text
(
x
=
Y_error
[
0
][
0
][
each_bin
],
y
=
0
+
Y_error
[
0
][
4
]
*
7
,
s
=
'
\u03BC
= %.3f
\n\u03C3
= %.3f
'
%
(
Y_error
[
0
][
1
][
each_bin
],
Y_error
[
0
][
3
][
each_bin
]),
size
=
text_size
)
s
=
'
\u03BC
= %.3f
\n\u03C3
= %.3f
'
%
(
Y_error
[
0
][
1
][
each_bin
],
Y_error
[
0
][
3
][
each_bin
]),
size
=
text_size
,
horizontalalignment
=
'
center
'
,
verticalalignment
=
'
top
'
)
ax1
.
set_title
(
'
%s %s with error bars %s %s events
\n
DETECTOR_CONFIG: %s
'
%
(
title_list
[
i
],
title
,
config
,
Nevents
,
Dconfig
))
plt
.
savefig
(
os
.
path
.
join
(
r_path
,
'
%s_difference_vs_momentum_error_%s.png
'
%
(
title_list
[
i
],
config
)))
else
:
...
...
@@ -398,13 +396,14 @@ def particle_plots(boolean_particle):
ax2
.
errorbar
(
-
Y_error
[
1
][
0
],
Y_error
[
1
][
1
],
yerr
=
Y_error
[
1
][
3
],
xerr
=
Y_error
[
1
][
2
]
,
fmt
=
'
None
'
,
ecolor
=
'
orange
'
,
elinewidth
=
1
)
ax3
.
errorbar
(
-
Y_error
[
0
][
0
],
Y_error
[
0
][
1
],
yerr
=
Y_error
[
0
][
3
],
xerr
=
Y_error
[
0
][
2
]
,
fmt
=
'
None
'
,
ecolor
=
'
orange
'
,
elinewidth
=
1
)
ax4
.
errorbar
(
-
Y_error
[
1
][
0
],
Y_error
[
1
][
1
],
yerr
=
Y_error
[
1
][
3
],
xerr
=
Y_error
[
1
][
2
]
,
fmt
=
'
None
'
,
ecolor
=
'
orange
'
,
elinewidth
=
1
)
y_limits
=
ax3
.
get_ylim
()
for
each_bin
in
range
(
len
(
Y_error
[
0
][
0
])):
if
not
np
.
isnan
(
Y_error
[
0
][
1
][
each_bin
]):
ax3
.
text
(
x
=-
Y_error
[
0
][
0
][
each_bin
]
-
0.1
,
y
=
0
-
Y_error
[
0
][
4
]
*
50
,
s
=
'
\u03BC
= %.3f
\n\u03C3
= %.3f
'
%
(
Y_error
[
0
][
1
][
each_bin
],
Y_error
[
0
][
3
][
each_bin
]),
size
=
text_size
)
ax3
.
text
(
x
=-
Y_error
[
0
][
0
][
each_bin
]
,
y
=
y_limits
[
1
]
,
s
=
'
\u03BC
= %.3f
\n\u03C3
= %.3f
'
%
(
Y_error
[
0
][
1
][
each_bin
],
Y_error
[
0
][
3
][
each_bin
]),
size
=
text_size
,
horizontalalignment
=
'
center
'
,
verticalalignment
=
'
top
'
)
if
not
np
.
isnan
(
Y_error
[
1
][
1
][
each_bin
]):
ax4
.
text
(
x
=-
Y_error
[
1
][
0
][
each_bin
]
-
0.1
,
y
=
0
-
Y_error
[
1
][
4
]
*
50
,
s
=
'
\u03BC
= %.3f
\n\u03C3
= %.3f
'
%
(
Y_error
[
1
][
1
][
each_bin
],
Y_error
[
1
][
3
][
each_bin
]),
size
=
text_size
)
ax4
.
text
(
x
=-
Y_error
[
1
][
0
][
each_bin
]
,
y
=
y_limits
[
1
]
,
s
=
'
\u03BC
= %.3f
\n\u03C3
= %.3f
'
%
(
Y_error
[
1
][
1
][
each_bin
],
Y_error
[
1
][
3
][
each_bin
]),
size
=
text_size
,
horizontalalignment
=
'
center
'
,
verticalalignment
=
'
top
'
)
if
not
np
.
isnan
(
Y_error
[
0
][
4
]):
ax1
.
set_ylim
(
0
-
(
Y_error
[
1
][
4
]
*
10
),
0
+
(
Y_error
[
1
][
4
]
*
10
))
ax2
.
set_ylim
(
0
-
(
Y_error
[
1
][
4
]
*
10
),
0
+
(
Y_error
[
1
][
4
]
*
10
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment