23def hashToHuman(hash):
24 nhash = hash
25
26
27 techCut = 30720
29 tech = 51
30 else:
31 tech = 50
32
33 nhash = nhash % techCut
34
35
36 precCut = 24576
38 prec = "Y"
39 range = techCut - precCut +1
40 else:
41 prec = "X"
42 range = precCut
43
44 nhash = nhash % precCut
45
46
47 etaCut = range/2
49 eta = 1
50 else:
51 eta = -1
52
53 nhash = nhash % etaCut
54 range = range/2
55
56
57 phiDiv = range/8
58 phi = nhash/phiDiv +1
59
60 nhash = nhash % phiDiv
61 range = range/8
62
63
64 chamCut = range/2
66 chamLay = 2
67 else:
68 chamLay =1
69
70 nhash = nhash % chamCut
71 range = range /2
72
73
74 wireDiv = range/4
75 wireLay = nhash/wireDiv +1
76
77 nhash = nhash % wireDiv
78 range = range/4
79
80
81 strip = nhash +1
82
83 sector = getSector(phi,tech)
84
86 print '\n****Warning! Chamber layer = ' + str(chamLay) + '. 2 expected!****\n'
87 print 'chamLay: ' + str(chamLay) + ', eta: ' + str(eta) + \
88 ', sector ' + str(sector) + ', wireLayer ' + str(wireLay) + \
89 ', direction: ' + prec + ', strip: ' + str(strip)
90 return
91
92
93