Belle II Software
development
Toggle main menu visibility
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
Enumerator
c
d
f
p
t
v
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
collApertOverride.py
1
#!/usr/bin/env python3
2
3
10
11
15
16
from
basf2
import
Path, process
17
from
sys
import
argv
18
19
# Create main path
20
main = Path()
21
# Add modules to main path
22
main.add_module(
"EventInfoSetter"
)
23
# Geometry parameter loader
24
gearbox = main.add_module(
"Gearbox"
)
25
# Geometry root file
26
gearbox.param(
'fileName'
,
'/geometry/Belle2.xml'
)
27
# Override collimator displacement
28
gearbox.param(
'override'
, [
29
(
"/DetectorComponent[@name='FarBeamLine']/Content/Collimator[@name='D01H5']/sec[@name='d1']"
,
'-15'
,
'mm'
),
30
(
"/DetectorComponent[@name='FarBeamLine']/Content/Collimator[@name='D01H5']/sec[@name='d2']"
,
'12'
,
'mm'
),
31
])
32
# Geometry builder
33
main.add_module(
"Geometry"
, useDB=
False
,
34
components=[
'FarBeamLine'
],
35
# components=['BeamPipe','Cryostat','VXDService','HeavyMetalShield','FarBeamLine'],
36
)
37
38
# Overlap checker
39
if
len(argv) > 1:
40
main.add_module(
"OverlapChecker"
, points=int(argv[1]))
41
else
:
42
main.add_module(
"OverlapChecker"
)
43
# Save overlaps to file to be able to view them with b2display
44
main.add_module(
"RootOutput"
, outputFileName=
"Overlaps.root"
)
45
# Process one event
46
process(main)
beast
examples
collApertOverride.py
Generated on Wed Apr 9 2025 02:36:25 for Belle II Software by
1.9.6