ATLAS Offline Software
Loading...
Searching...
No Matches
cscHashToHuman Namespace Reference

Functions

 getSector (phi, tech)
 hashToHuman (hash)

Variables

 hash = input('Enter a hash ID (negative to quit): ')

Function Documentation

◆ getSector()

cscHashToHuman.getSector ( phi,
tech )

Definition at line 19 of file cscHashToHuman.py.

19def getSector(phi,tech):
20 return(2*phi + 50 - tech)
21
22

◆ hashToHuman()

cscHashToHuman.hashToHuman ( hash)

Definition at line 23 of file cscHashToHuman.py.

23def hashToHuman(hash):
24 nhash = hash #nhash =newhash
25
26 #tech
27 techCut = 30720
28 if(nhash >= techCut):
29 tech = 51 #CSL
30 else:
31 tech = 50 #CSS
32
33 nhash = nhash % techCut
34
35 #Precision
36 precCut = 24576
37 if(nhash >= precCut):
38 prec = "Y"
39 range = techCut - precCut +1
40 else:
41 prec = "X"
42 range = precCut
43
44 nhash = nhash % precCut
45
46 #Eta
47 etaCut = range/2
48 if(nhash >= etaCut):
49 eta = 1
50 else:
51 eta = -1
52
53 nhash = nhash % etaCut
54 range = range/2
55
56 #phi
57 phiDiv = range/8
58 phi = nhash/phiDiv +1
59
60 nhash = nhash % phiDiv
61 range = range/8
62
63 #chamLay
64 chamCut = range/2
65 if(nhash >= chamCut):
66 chamLay = 2
67 else:
68 chamLay =1
69
70 nhash = nhash % chamCut
71 range = range /2
72
73 #wireLay
74 wireDiv = range/4
75 wireLay = nhash/wireDiv +1
76
77 nhash = nhash % wireDiv
78 range = range/4
79
80 #strip
81 strip = nhash +1
82
83 sector = getSector(phi,tech)
84
85 if(chamLay != 2):
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#Start the program proper
93
if(febId1==febId2)

Variable Documentation

◆ hash

cscHashToHuman.hash = input('Enter a hash ID (negative to quit): ')

Definition at line 96 of file cscHashToHuman.py.