Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
detector_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
detector_benchmarks
Merge requests
!93
CI job to automatically generate ACTS material scans
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
CI job to automatically generate ACTS material scans
acts-material-maps
into
master
Overview
0
Commits
13
Pipelines
0
Changes
4
Merged
Wouter Deconinck
requested to merge
acts-material-maps
into
master
3 years ago
Overview
0
Commits
13
Pipelines
0
Changes
4
Expand
0
0
Merge request reports
Compare
master
version 13
38bac42d
3 years ago
version 12
803815b2
3 years ago
version 11
83c530b3
3 years ago
version 10
bc8fb048
3 years ago
version 9
99f944e2
3 years ago
version 8
51c294d9
3 years ago
version 7
2ca3ba06
3 years ago
version 6
0bd82322
3 years ago
version 5
f984c47a
3 years ago
version 4
3c43b8ee
3 years ago
version 3
4f3efa06
3 years ago
version 2
8f346aea
3 years ago
version 1
d746743c
3 years ago
master (base)
and
latest version
latest version
43fef8ef
13 commits,
3 years ago
version 13
38bac42d
12 commits,
3 years ago
version 12
803815b2
11 commits,
3 years ago
version 11
83c530b3
10 commits,
3 years ago
version 10
bc8fb048
9 commits,
3 years ago
version 9
99f944e2
8 commits,
3 years ago
version 8
51c294d9
8 commits,
3 years ago
version 7
2ca3ba06
7 commits,
3 years ago
version 6
0bd82322
6 commits,
3 years ago
version 5
f984c47a
5 commits,
3 years ago
version 4
3c43b8ee
4 commits,
3 years ago
version 3
4f3efa06
3 commits,
3 years ago
version 2
8f346aea
2 commits,
3 years ago
version 1
d746743c
1 commit,
3 years ago
4 files
+
247
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
benchmarks/material_maps/scripts/configureMap.py
0 → 100644
+
101
−
0
Options
# This file is part of the Acts project.
#
# Copyright (C) 2020-2021 CERN for the benefit of the Acts project
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import
json
import
sys
# Should be run with Python 3 if possible
# Script that use the json config file to configure the Json surfaces map for the material mapping
# Take two arguments in input : The path to the surfaces map and the path of the json config file
# By default the input is : 'surfaces-map.json' and the output is : 'config-map.json'
# The config file can be used to define a binning for all the surfaces in a given volume
# It can also be used to define the binning for volume mapping
if
sys
.
version_info
[
0
]
<
3
:
print
(
'
Using Python 2
'
)
print
(
'
To obtain the proper ordering in the Json files Python 3 is recomanded
'
)
if
len
(
sys
.
argv
)
<
2
:
inFileName
=
'
geometry-maps.json
'
confFileName
=
'
config-map.json
'
if
len
(
sys
.
argv
)
<
3
:
confFileName
=
'
config-map.json
'
else
:
inFileName
=
sys
.
argv
[
1
]
confFileName
=
sys
.
argv
[
2
]
with
open
(
inFileName
,
'
r+
'
)
as
json_file
:
with
open
(
confFileName
,
'
r
'
)
as
config_file
:
config
=
json
.
load
(
config_file
)
data
=
json
.
load
(
json_file
)
for
entry
in
data
[
'
Surfaces
'
][
'
entries
'
]:
if
'
type
'
not
in
entry
[
'
value
'
][
'
bounds
'
]:
entry
[
'
value
'
][
'
bounds
'
][
'
type
'
]
=
''
if
'
layer
'
in
entry
:
if
'
approach
'
not
in
entry
:
if
'
sensitive
'
not
in
entry
:
for
conf
in
config
[
'
Surfaces
'
][
str
(
entry
[
'
volume
'
])]:
if
'
layer
'
in
conf
and
conf
[
'
layer
'
]
==
'
X
'
and
conf
[
'
value
'
][
'
bounds
'
][
'
type
'
]
==
entry
[
'
value
'
][
'
bounds
'
][
'
type
'
]:
entry
[
'
value
'
][
'
material
'
][
'
mapMaterial
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
mapMaterial
'
]
entry
[
'
value
'
][
'
material
'
][
'
mappingType
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
mappingType
'
]
ibin
=
0
for
bin
in
entry
[
'
value
'
][
'
material
'
][
'
binUtility
'
][
'
binningdata
'
]:
bin
[
'
bins
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
binUtility
'
][
'
binningdata
'
][
ibin
][
'
bins
'
]
ibin
=
ibin
+
1
continue
continue
if
'
boundary
'
in
entry
:
if
'
layer
'
not
in
entry
:
for
conf
in
config
[
'
Surfaces
'
][
str
(
entry
[
'
volume
'
])]:
if
'
boundary
'
in
conf
and
conf
[
'
boundary
'
]
==
entry
[
'
boundary
'
]
and
conf
[
'
value
'
][
'
bounds
'
][
'
type
'
]
==
entry
[
'
value
'
][
'
bounds
'
][
'
type
'
]:
entry
[
'
value
'
][
'
material
'
][
'
mapMaterial
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
mapMaterial
'
]
entry
[
'
value
'
][
'
material
'
][
'
mappingType
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
mappingType
'
]
ibin
=
0
for
bin
in
entry
[
'
value
'
][
'
material
'
][
'
binUtility
'
][
'
binningdata
'
]:
bin
[
'
bins
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
binUtility
'
][
'
binningdata
'
][
ibin
][
'
bins
'
]
ibin
=
ibin
+
1
continue
continue
if
'
approach
'
in
entry
:
if
'
sensitive
'
not
in
entry
:
for
conf
in
config
[
'
Surfaces
'
][
str
(
entry
[
'
volume
'
])]:
if
'
approach
'
in
conf
and
conf
[
'
approach
'
]
==
entry
[
'
approach
'
]
and
conf
[
'
value
'
][
'
bounds
'
][
'
type
'
]
==
entry
[
'
value
'
][
'
bounds
'
][
'
type
'
]:
entry
[
'
value
'
][
'
material
'
][
'
mapMaterial
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
mapMaterial
'
]
entry
[
'
value
'
][
'
material
'
][
'
mappingType
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
mappingType
'
]
ibin
=
0
for
bin
in
entry
[
'
value
'
][
'
material
'
][
'
binUtility
'
][
'
binningdata
'
]:
bin
[
'
bins
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
binUtility
'
][
'
binningdata
'
][
ibin
][
'
bins
'
]
ibin
=
ibin
+
1
continue
continue
if
'
sensitive
'
in
entry
:
if
'
approach
'
not
in
entry
:
for
conf
in
config
[
'
Surfaces
'
][
str
(
entry
[
'
volume
'
])]:
if
'
sensitive
'
in
conf
and
conf
[
'
sensitive
'
]
==
'
X
'
and
conf
[
'
layer
'
]
==
entry
[
'
layer
'
]
and
conf
[
'
value
'
][
'
bounds
'
][
'
type
'
]
==
entry
[
'
value
'
][
'
bounds
'
][
'
type
'
]:
entry
[
'
value
'
][
'
material
'
][
'
mapMaterial
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
mapMaterial
'
]
entry
[
'
value
'
][
'
material
'
][
'
mappingType
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
mappingType
'
]
ibin
=
0
for
bin
in
entry
[
'
value
'
][
'
material
'
][
'
binUtility
'
][
'
binningdata
'
]:
bin
[
'
bins
'
]
=
conf
[
'
value
'
][
'
material
'
][
'
binUtility
'
][
'
binningdata
'
][
ibin
][
'
bins
'
]
ibin
=
ibin
+
1
continue
continue
data
[
'
Volumes
'
]
=
config
[
'
Volumes
'
]
json_file
.
seek
(
0
)
json
.
dump
(
data
,
json_file
,
indent
=
4
)
json_file
.
truncate
()
Loading