Belle II Software development
printVXDAlignmentHalfShells.py
1#!/usr/bin/env python3
2
3
10
11import sys
12import ROOT
13from ROOT import Belle2
14if len(sys.argv) < 2:
15 sys.exit("No input .root file with VXDAlignment payload specified!")
16
17inputroot = sys.argv[1]
18file = ROOT.TFile(inputroot, "OPEN")
19vxd = file.Get("VXDAlignment_CORRECTIONS")
20
21errfile = ROOT.TFile(str(inputroot).replace('VXDAlignment_CORRECTIONS', 'VXDAlignment_ERRORS'), "OPEN")
22errvxd = errfile.Get("VXDAlignment_ERRORS")
23
24ying = Belle2.VxdID(1, 0, 0, 1)
25yang = Belle2.VxdID(1, 0, 0, 2)
26pat = Belle2.VxdID(3, 0, 0, 1)
27mat = Belle2.VxdID(3, 0, 0, 2)
28
29shells = [ying, yang, pat, mat]
30shellnames = ['PXD Ying', 'PXD Yang', 'SVD Pat', 'SVD Mat']
31
32params = [1, 2, 3, 4, 5, 6]
33paramnames = ['x', 'y', 'z', 'alpha', 'beta', 'gamma']
34
35for ishell, shell in enumerate(shells):
36 print('Half-shell: ', shellnames[ishell])
37 for ipar, param in enumerate(params):
38 print(paramnames[ipar], ' = ', vxd.get(shell.getID(), param), ' +/- ', errvxd.get(shell.getID(), param))
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33