Belle II Software development
misalignVXDRandom.py
1#!/usr/bin/env python3
2
3
10
11"""
12Generate alignment payload for VXD
13
14"""
15
16import basf2 as b2
17
18from alignment.utils import AlignmentGeneratorConfig
19
20alignment = AlignmentGeneratorConfig()
21# 100 um normal distribution for all shifts
22alignment.gen_u_gaus('0.0.0', 0.01)
23alignment.gen_v_gaus('0.0.0', 0.01)
24alignment.gen_w_gaus('0.0.0', 0.01)
25# -1 mrad to +1 mrad uniform distribution for all angles
26alignment.gen_alpha_uniform('0.0.0', 0.001)
27alignment.gen_beta_uniform('0.0.0', 0.001)
28alignment.gen_gamma_uniform('0.0.0', 0.001)
29
30alignment.set_all('1.1.1', 0.0)
31
32main = b2.create_path()
33main.add_module('EventInfoSetter')
34main.add_module('Gearbox')
35main.add_module('Geometry', components=['PXD', 'SVD'])
36main.add_module('AlignmentGenerator', payloadIov=[0, 0, -1, -1], payloadName="", data=alignment.get_data(), createPayload=True)
37main.add_module('Progress')
38
39b2.process(main)
40print(b2.statistics)