ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonDQA
MuonCalibMonitoring
python
cscHashToHuman.py
Go to the documentation of this file.
1
#!/afs/cern.ch/sw/lcg/external/Python/2.5/slc4_ia32_gcc34/bin/python
2
3
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
4
16
17
from
math
import
*
18
19
def
getSector
(phi,tech):
20
return(2*phi + 50 - tech)
21
22
23
def
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
94
while
(1):
95
print
'\n'
96
hash = input(
'Enter a hash ID (negative to quit): '
)
97
if
(hash < 0):
98
break
99
hashToHuman
(hash)
100
101
102
103
104
if
if(febId1==febId2)
Definition
LArRodBlockPhysicsV0.cxx:567
while
while((inf=(TStreamerInfo *) nextinfo()) !=0)
Definition
liststreamerinfos.cxx:13
cscHashToHuman.getSector
getSector(phi, tech)
Definition
cscHashToHuman.py:19
cscHashToHuman.hashToHuman
hashToHuman(hash)
Definition
cscHashToHuman.py:23
Generated on
for ATLAS Offline Software by
1.14.0