Belle II Software  release-08-01-10
printVXDAlignmentHalfShells.py
1 #!/usr/bin/env python3
2 
3 
10 
11 import sys
12 import ROOT
13 from ROOT import Belle2
14 if len(sys.argv) < 2:
15  sys.exit("No input .root file with VXDAlignment payload specified!")
16 
17 inputroot = sys.argv[1]
18 file = ROOT.TFile(inputroot, "OPEN")
19 vxd = file.Get("VXDAlignment_CORRECTIONS")
20 
21 errfile = ROOT.TFile(str(inputroot).replace('VXDAlignment_CORRECTIONS', 'VXDAlignment_ERRORS'), "OPEN")
22 errvxd = errfile.Get("VXDAlignment_ERRORS")
23 
24 ying = Belle2.VxdID(1, 0, 0, 1)
25 yang = Belle2.VxdID(1, 0, 0, 2)
26 pat = Belle2.VxdID(3, 0, 0, 1)
27 mat = Belle2.VxdID(3, 0, 0, 2)
28 
29 shells = [ying, yang, pat, mat]
30 shellnames = ['PXD Ying', 'PXD Yang', 'SVD Pat', 'SVD Mat']
31 
32 params = [1, 2, 3, 4, 5, 6]
33 paramnames = ['x', 'y', 'z', 'alpha', 'beta', 'gamma']
34 
35 for 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