ATLAS Offline Software
Functions
cscHashToHuman Namespace Reference

Functions

def getSector (phi, tech)
 
def hashToHuman (hash)
 

Function Documentation

◆ getSector()

def cscHashToHuman.getSector (   phi,
  tech 
)

Definition at line 19 of file cscHashToHuman.py.

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

◆ hashToHuman()

def cscHashToHuman.hashToHuman (   hash)

Definition at line 23 of file cscHashToHuman.py.

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 
cscHashToHuman.getSector
def getSector(phi, tech)
Definition: cscHashToHuman.py:19
while
while((inf=(TStreamerInfo *) nextinfo()) !=0)
Definition: liststreamerinfos.cxx:13
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569
cscHashToHuman.hashToHuman
def hashToHuman(hash)
Definition: cscHashToHuman.py:23
str
Definition: BTagTrackIpAccessor.cxx:11