Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reconstruction_benchmarks
Manage
Activity
Members
Labels
Plan
Issues
22
Issue boards
Milestones
Wiki
Code
Merge requests
21
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
reconstruction_benchmarks
Commits
fad7d667
Commit
fad7d667
authored
3 years ago
by
Shujie Li
Committed by
Wouter Deconinck
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
added eta and theta distribution to performance plot
parent
f74c53a7
No related branches found
Branches containing commit
No related tags found
1 merge request
!184
added eta and theta distribution to performance plot
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
benchmarks/tracking/scripts/tracking_performance.py
+29
-3
29 additions, 3 deletions
benchmarks/tracking/scripts/tracking_performance.py
with
29 additions
and
3 deletions
benchmarks/tracking/scripts/tracking_performance.py
+
29
−
3
View file @
fad7d667
...
...
@@ -139,7 +139,7 @@ if __name__ == '__main__':
df
[
'
theta
'
]
=
df
[
'
direction.theta
'
]
df
[
'
phi
'
]
=
df
[
'
direction.phi
'
]
fig
,
axs
=
plt
.
subplots
(
2
,
2
,
figsize
=
(
16
,
1
2
),
dpi
=
120
)
fig
,
axs
=
plt
.
subplots
(
3
,
2
,
figsize
=
(
16
,
1
8
),
dpi
=
120
)
for
ax
in
axs
.
flat
:
ax
.
tick_params
(
direction
=
'
in
'
,
which
=
'
both
'
,
labelsize
=
20
)
ax
.
grid
(
linestyle
=
'
:
'
)
...
...
@@ -170,7 +170,7 @@ if __name__ == '__main__':
ax
.
errorbar
(
eta_centers
,
track_eff
,
xerr
=
eta_binsize
/
2.
,
yerr
=
[
track_eff_lower
,
track_eff_upper
],
fmt
=
'
o
'
,
capsize
=
3
)
ax
.
set_ylim
(
0.
,
1.
)
ax
.
set_ylim
(
0.
,
1.
1
)
ax
.
set_xlim
(
-
4.5
,
4.5
)
ax
.
set_ylabel
(
'
Tracking Efficiency
'
,
fontsize
=
20
)
ax
.
set_xlabel
(
'
$\eta$
'
,
fontsize
=
20
)
...
...
@@ -212,6 +212,32 @@ if __name__ == '__main__':
ax
.
set_ylabel
(
'
Normalized Counts / {:d} Bins
'
.
format
(
nbins
),
fontsize
=
20
)
ax
.
set_xlabel
(
r
'
$d\phi$ (rad)
'
,
fontsize
=
20
)
fig
.
text
(
0.5
,
0.95
,
'
Barrel Tracker Benchmark (Truth Init.)
'
,
fontsize
=
22
,
ha
=
'
center
'
)
# eta distribution
ax
=
axs
.
flat
[
4
]
sim_eta
=
dfm
.
groupby
(
'
event
'
)[
'
eta
'
].
first
().
values
rec_eta
=
-
np
.
log
(
np
.
tan
(
df
.
groupby
(
'
event
'
)[
'
direction.theta
'
].
first
().
values
/
2.
))
hval
,
hbins
,
_
=
ax
.
hist
(
sim_eta
,
bins
=
np
.
linspace
(
-
4
,
4
,
41
),
ec
=
'
k
'
,
alpha
=
0.3
,
label
=
"
Generated
"
)
hval
,
hbins
,
_
=
ax
.
hist
(
rec_eta
,
bins
=
np
.
linspace
(
-
4
,
4
,
41
),
ec
=
'
k
'
,
alpha
=
0.3
,
label
=
"
Reconstructed
"
)
nbins
=
hbins
.
shape
[
0
]
-
1
ax
.
set_ylabel
(
'
Normalized Counts / {:d} Bins
'
.
format
(
nbins
),
fontsize
=
20
)
ax
.
set_xlabel
(
r
'
$\eta$
'
,
fontsize
=
20
)
ax
.
legend
(
loc
=
"
upper right
"
)
# theta distribution
ax
=
axs
.
flat
[
5
]
sim_th_deg
=
dfm
.
groupby
(
'
event
'
)[
'
theta
'
].
first
().
values
*
180
/
np
.
pi
rec_th_deg
=
df
.
groupby
(
'
event
'
)[
'
direction.theta
'
].
first
().
values
*
180
/
np
.
pi
hval
,
hbins
,
_
=
ax
.
hist
(
sim_th_deg
,
bins
=
np
.
linspace
(
-
0
,
180
,
61
),
ec
=
'
k
'
,
alpha
=
0.3
,
label
=
"
Generated
"
)
hval
,
hbins
,
_
=
ax
.
hist
(
rec_th_deg
,
bins
=
np
.
linspace
(
-
0
,
180
,
61
),
ec
=
'
k
'
,
alpha
=
0.3
,
label
=
"
Reconstructed
"
)
nbins
=
hbins
.
shape
[
0
]
-
1
ax
.
set_ylabel
(
'
Normalized Counts / {:d} Bins
'
.
format
(
nbins
),
fontsize
=
20
)
ax
.
set_xlabel
(
r
'
$\theta (degree)$
'
,
fontsize
=
20
)
fig
.
text
(
0.5
,
0.95
,
'
Tracker Benchmark (Truth Init.)
'
,
fontsize
=
22
,
ha
=
'
center
'
)
fig
.
savefig
(
os
.
path
.
join
(
args
.
outdir
,
'
{}_performance.png
'
.
format
(
args
.
nametag
)))
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