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