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
create_fieldmap.py
1
#!/usr/bin/env python3
2
3
10
11
15
16
import
os
17
import
math
18
from
basf2
import
Path, process
19
import
subprocess
20
21
commit = subprocess.check_output([
"git"
, f
"--git-dir={os.environ['BELLE2_LOCAL_DIR']}/.git"
,
22
"rev-parse"
,
"--short"
,
"HEAD"
]).decode().strip()
23
24
path = Path()
25
path.add_module(
"EventInfoSetter"
)
26
path.add_module(
"CreateFieldMap"
, **{
27
# Filename for the histograms
28
'filename'
: f
'FieldMap-{commit}.root'
,
29
# type of the scan: along xy, zx or zy
30
"type"
:
"zx"
,
31
# number of steps along the first coordinate, in the case of a zx scan this
32
# would be z
33
"nU"
: 1600,
34
# start of the first coordinate in cm
35
"minU"
: -350,
36
# end of the first coordinate in cm
37
"maxU"
: 450,
38
# number of steps along the second coordinate, in the case of a zx scan
39
# this would be x
40
"nV"
: 1600,
41
# start of the second coordinate in cm
42
"minV"
: -400,
43
# end of the second coordinate in cm
44
"maxV"
: 400,
45
# rotation the plane for the scan around the global z axis: a value of
46
# pi/2 will convert a zx in a zy scan
47
"phi"
: math.pi / 4,
48
# offset of the plane with respect to the global origin
49
"wOffset"
: 0,
50
# number of steps in phi for zr scan
51
"nPhi"
: 720,
52
# if true here store all sampled points in a TTree
53
"saveAllPoints"
:
False
,
54
})
55
process(path)
geometry
examples
create_fieldmap.py
Generated on Wed Apr 9 2025 02:42:10 for Belle II Software by
1.9.6