ATLAS Offline Software
zebraShift.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 # This script genrates a json file containing the Micromegas cabling correction map
4 
5 import json
6 
7 def zebraChannels(zebra):
8  '''
9  Returns a tuple with the first and the last channel in a MM zebra connector.
10 
11  Parameters:
12  zebra (int) identifies the zebra connector number within a layer. Counting from 0 to 31
13 
14  Returns:
15  tuple containing the first and the last strip of a given zebra connector
16  '''
17 
18  # One zebra connector covers 256 channels
19  # The athena channel numbering starts from 1
20  # The athena channel numbering restarts from 1 for the second quadruplet (zebra connectors 20 to 31)
21 
22  if(zebra>19): zebra -= 20 # zebra counting covers a full layer of a sector while the channel numbering restarts in the second quadruplet
23  firstChannel = zebra*256 + 1
24  lastChannel = (zebra+1)*256
25  return (firstChannel, lastChannel)
26 
27 def MMFE8Channels(mmfe8):
28  '''
29  Returns a tuple with the first and the last channel in an MMFE (Micromegas front end board).
30 
31  Parameters:
32  mmfe8 (int) identifies the zebra connector number within a layer. Counting from 0 to 15
33 
34  Returns:
35  tuple containing the first and the last strip of a given MMFE8
36  '''
37 
38  # One MMFE8 covers 512 channels
39  # The athena channel numbering starts from 1
40  # The athena channel numbering restarts from 1 for the second quadruplet (MMFE8s 10 to 15)
41 
42  if(mmfe8>9): mmfe8 -= 10 # MMFE8 counting covers a full layer of a sector while the channel numbering restarts in the second quadruplet
43  firstChannel = mmfe8*512 + 1
44  lastChannel = (mmfe8+1)*512
45  return (firstChannel, lastChannel)
46 
47 
48 
49 def addZebra(side, sector, layer, zebra, shift):
50  '''
51  Returns a dictionary which represents a shift of a zebra connector
52 
53  Parameters:
54  side (string) identifies the wheel: possible values "A" and "C"
55  sector (int) identifies the sector counting from 1 to 16
56  layer (int) identifies the detector layer whithin a given sector. Counts from 1 to 8
57  zebra (int) identifies the zebra connector number within a layer. Counting from 0 to 31
58  shift (int) indicates by how much and in which direction the channels in a given connector should be moved
59 
60  Returns:
61  dictionary with the fields that the NSW cabling alg will use to apply the shift
62  '''
63  ret = dict()
64  ret["station"] = ("MML" if sector%2==1 else "MMS") # the even sectors are the small ones
65  ret["eta"] = (-1 if side == "C" else 1) * (1 if zebra < 20 else 2) # side C is indicated by a negative station eta while side A by a positive one. The first station eta (or quadruplet) consist of 5 PCBs per layer which corresponds to zebra connectors 0 to 19. Connector 20 to 31 are reading out abs(stationEta) 2
66  ret["phi"] = (sector-1)//2 + 1
67  ret["multilayer"] = (1 if layer <=4 else 2) # each multilayer consists of 4 layers
68  ret["gasgap"] = ((layer-1)%4) +1 # counting from 1 to 4
69  ret["FirstZebra"], ret["LastZebra"] = zebraChannels(zebra)
70  ret["ZebraShift"] = shift
71  return ret
72 
73 def addMMFE8(side, sector, layer, mmfe8, shift):
74  '''
75  Returns a dictionary which represents a shift of a zebra connector
76 
77  Parameters:
78  side (string) identifies the wheel: possible values "A" and "C"
79  sector (int) identifies the sector counting from 1 to 16
80  layer (int) identifies the detector layer whithin a given sector. Counts from 1 to 8
81  mmfe8 (int) identifies the MMFE8 number within a layer. Counting from 0 to 15
82  shift (int) indicates by how much and in which direction the channels in a given connector should be moved
83 
84  Returns:
85  dictionary with the fields that the NSW cabling alg will use to apply the shift
86  '''
87  ret = dict()
88  ret["station"] = ("MML" if sector%2==1 else "MMS") # the even sectors are the small ones
89  ret["eta"] = (-1 if side == "C" else 1) * (1 if mmfe8 < 10 else 2) # side C is indicated by a negative station eta while side A by a positive one. The first station eta (or quadruplet) consist of 5 PCBs per layer which corresponds to MMFE8s 0 to 9. MMFE8 10 to 15 are reading out abs(stationEta) 2
90  ret["phi"] = (sector-1)//2 + 1
91  ret["multilayer"] = (1 if layer <=4 else 2) # each multilayer consists of 4 layers
92  ret["gasgap"] = ((layer-1)%4) +1 # counting from 1 to 4
93  ret["FirstZebra"], ret["LastZebra"] = MMFE8Channels(mmfe8)
94  ret["ZebraShift"] = shift
95  return ret
96 
97 
98 
99 
100 
101 if __name__ == "__main__":
102  # for now we generate some dummy shifts for testing
103  outList = []
104  outList.append(addZebra("A",3,1,13,-1))
105  outList.append(addZebra("A",3,1,12,-1))
106  outList.append(addZebra("A",6,1,5,-1))
107  outList.append(addZebra("A",7,1,3,1))
108  outList.append(addZebra("A",7,1,2,1))
109  outList.append(addZebra("A",10,1,23,-1))
110  outList.append(addZebra("A",10,1,22,-1))
111  outList.append(addZebra("A",11,1,3,1))
112  outList.append(addZebra("A",11,1,2,1))
113  outList.append(addZebra("A",12,1,15,-1))
114  outList.append(addZebra("A",12,1,14,-1))
115  outList.append(addZebra("A",14,1,23,-1))
116  outList.append(addZebra("A",14,1,22,-1))
117  outList.append(addZebra("A",14,1,15,1))
118  outList.append(addZebra("A",14,1,14,1))
119  outList.append(addZebra("A",14,1,5,1))
120  outList.append(addZebra("A",14,1,4,1))
121  outList.append(addZebra("A",16,1,17,1))
122  outList.append(addZebra("A",16,1,16,1))
123  outList.append(addZebra("A",4,2,11,-1))
124  outList.append(addZebra("A",4,2,10,-1))
125  outList.append(addZebra("A",6,2,5,-1))
126  outList.append(addZebra("A",6,2,4,-1))
127  outList.append(addZebra("A",10,2,25,1))
128  outList.append(addZebra("A",10,2,24,1))
129  outList.append(addZebra("A",13,2,1,1))
130  outList.append(addZebra("A",13,2,0,1))
131  outList.append(addZebra("A",14,2,9,1))
132  outList.append(addZebra("A",14,2,8,1))
133  outList.append(addZebra("A",2,3,3,1))
134  outList.append(addZebra("A",2,3,2,1))
135  outList.append(addZebra("A",3,3,19,1))
136  outList.append(addZebra("A",3,3,15,2))
137  outList.append(addZebra("A",3,3,14,2))
138  outList.append(addZebra("A",3,3,1,1))
139  outList.append(addZebra("A",3,3,0,1))
140  outList.append(addZebra("A",5,3,11,1))
141  outList.append(addZebra("A",5,3,10,1))
142  outList.append(addZebra("A",6,3,15,1))
143  outList.append(addZebra("A",6,3,14,1))
144  outList.append(addZebra("A",6,3,9,-1))
145  outList.append(addZebra("A",6,3,8,-1))
146  outList.append(addZebra("A",7,3,17,-1))
147  outList.append(addZebra("A",7,3,16,-1))
148  outList.append(addZebra("A",7,3,15,1))
149  outList.append(addZebra("A",7,3,14,1))
150  outList.append(addZebra("A",7,3,7,1))
151  outList.append(addZebra("A",7,3,6,1))
152  outList.append(addZebra("A",7,3,3,1))
153  outList.append(addZebra("A",7,3,2,1))
154  outList.append(addZebra("A",11,3,7,1))
155  outList.append(addZebra("A",11,3,6,1))
156  outList.append(addZebra("A",14,3,13,1))
157  outList.append(addZebra("A",14,3,12,1))
158  outList.append(addZebra("A",14,3,11,-1))
159  outList.append(addZebra("A",14,3,10,-1))
160  outList.append(addZebra("A",2,4,15,-1))
161  outList.append(addZebra("A",2,4,14,-1))
162  outList.append(addZebra("A",2,4,11,1))
163  outList.append(addZebra("A",2,4,10,1))
164  outList.append(addZebra("A",3,4,15,1))
165  outList.append(addZebra("A",3,4,14,1))
166  outList.append(addZebra("A",3,4,5,1))
167  outList.append(addZebra("A",3,4,4,1))
168  outList.append(addZebra("A",4,4,11,1))
169  outList.append(addZebra("A",4,4,10,1))
170  outList.append(addZebra("A",5,4,27,-1))
171  outList.append(addZebra("A",5,4,26,-1))
172  outList.append(addZebra("A",5,4,25,-1))
173  outList.append(addZebra("A",5,4,24,-1))
174  outList.append(addZebra("A",5,4,17,-1))
175  outList.append(addZebra("A",5,4,16,-1))
176  outList.append(addZebra("A",5,4,1,-1))
177  outList.append(addZebra("A",5,4,0,-1))
178  outList.append(addZebra("A",8,4,29,1))
179  outList.append(addZebra("A",8,4,28,1))
180  outList.append(addZebra("A",14,4,19,-1))
181  outList.append(addZebra("A",14,4,18,-1))
182  outList.append(addZebra("A",14,4,17,1))
183  outList.append(addZebra("A",14,4,16,1))
184  outList.append(addZebra("A",14,4,13,-2))
185  outList.append(addZebra("A",14,4,12,-2))
186  outList.append(addZebra("A",14,4,11,1))
187  outList.append(addZebra("A",14,4,10,1))
188  outList.append(addZebra("A",14,4,9,-1))
189  outList.append(addZebra("A",14,4,8,-1))
190  outList.append(addZebra("A",14,4,7,-1))
191  outList.append(addZebra("A",14,4,6,-1))
192  outList.append(addZebra("A",16,4,9,-1))
193  outList.append(addZebra("A",16,4,8,-1))
194  outList.append(addZebra("A",16,4,7,1))
195  outList.append(addZebra("A",16,4,6,1))
196  outList.append(addZebra("A",16,4,3,1))
197  outList.append(addZebra("A",16,4,2,1))
198  outList.append(addZebra("A",2,5,19,1))
199  outList.append(addZebra("A",2,5,18,1))
200  outList.append(addZebra("A",2,5,15,1))
201  outList.append(addZebra("A",2,5,14,1))
202  outList.append(addZebra("A",2,5,11,1))
203  outList.append(addZebra("A",2,5,10,1))
204  outList.append(addZebra("A",2,5,3,1))
205  outList.append(addZebra("A",2,5,2,1))
206  outList.append(addZebra("A",4,5,13,1))
207  outList.append(addZebra("A",4,5,12,1))
208  outList.append(addZebra("A",4,5,11,1))
209  outList.append(addZebra("A",4,5,10,1))
210  outList.append(addZebra("A",7,5,27,1))
211  outList.append(addZebra("A",7,5,26,1))
212  outList.append(addZebra("A",7,5,25,1))
213  outList.append(addZebra("A",7,5,24,1))
214  outList.append(addZebra("A",8,5,15,1))
215  outList.append(addZebra("A",8,5,14,1))
216  outList.append(addZebra("A",9,5,27,1))
217  outList.append(addZebra("A",9,5,26,1))
218  outList.append(addZebra("A",9,5,23,-1))
219  outList.append(addZebra("A",9,5,22,-1))
220  outList.append(addZebra("A",10,5,15,-1))
221  outList.append(addZebra("A",10,5,14,-1))
222  outList.append(addZebra("A",13,5,19,1))
223  outList.append(addZebra("A",13,5,18,1))
224  outList.append(addZebra("A",14,5,15,1))
225  outList.append(addZebra("A",14,5,14,1))
226  outList.append(addZebra("A",16,5,17,1))
227  outList.append(addZebra("A",16,5,16,1))
228  outList.append(addZebra("A",1,6,15,2))
229  outList.append(addZebra("A",1,6,14,2))
230  outList.append(addZebra("A",1,6,7,1))
231  outList.append(addZebra("A",1,6,6,1))
232  outList.append(addZebra("A",2,6,19,-1))
233  outList.append(addZebra("A",2,6,18,-1))
234  outList.append(addZebra("A",2,6,15,1))
235  outList.append(addZebra("A",2,6,14,1))
236  outList.append(addZebra("A",2,6,11,1))
237  outList.append(addZebra("A",2,6,10,1))
238  outList.append(addZebra("A",3,6,17,-1))
239  outList.append(addZebra("A",3,6,16,-1))
240  outList.append(addZebra("A",3,6,9,-1))
241  outList.append(addZebra("A",3,6,8,-1))
242  outList.append(addZebra("A",5,6,19,1))
243  outList.append(addZebra("A",5,6,18,1))
244  outList.append(addZebra("A",5,6,9,-1))
245  outList.append(addZebra("A",5,6,8,-1))
246  outList.append(addZebra("A",6,6,15,-1))
247  outList.append(addZebra("A",6,6,14,-1))
248  outList.append(addZebra("A",6,6,11,1))
249  outList.append(addZebra("A",6,6,10,1))
250  outList.append(addZebra("A",6,6,9,-1))
251  outList.append(addZebra("A",6,6,8,-1))
252  outList.append(addZebra("A",6,6,5,-1))
253  outList.append(addZebra("A",6,6,4,-1))
254  outList.append(addZebra("A",8,6,15,1))
255  outList.append(addZebra("A",8,6,14,1))
256  outList.append(addZebra("A",8,6,13,-1))
257  outList.append(addZebra("A",8,6,12,-1))
258  outList.append(addZebra("A",8,6,11,1))
259  outList.append(addZebra("A",8,6,10,1))
260  outList.append(addZebra("A",8,6,9,1))
261  outList.append(addZebra("A",8,6,8,1))
262  outList.append(addZebra("A",8,6,5,-1))
263  outList.append(addZebra("A",8,6,4,-1))
264  outList.append(addZebra("A",8,6,1,1))
265  outList.append(addZebra("A",8,6,0,1))
266  outList.append(addZebra("A",9,6,19,1))
267  outList.append(addZebra("A",9,6,18,1))
268  outList.append(addZebra("A",10,6,5,-1))
269  outList.append(addZebra("A",10,6,4,-1))
270  outList.append(addZebra("A",12,6,17,-1))
271  outList.append(addZebra("A",12,6,16,-1))
272  outList.append(addZebra("A",12,6,13,-1))
273  outList.append(addZebra("A",12,6,12,-1))
274  outList.append(addZebra("A",12,6,1,-1))
275  outList.append(addZebra("A",12,6,0,-1))
276  outList.append(addZebra("A",13,6,9,-1))
277  outList.append(addZebra("A",13,6,8,-1))
278  outList.append(addZebra("A",14,6,19,3))
279  outList.append(addZebra("A",14,6,18,3))
280  outList.append(addZebra("A",14,6,17,2))
281  outList.append(addZebra("A",14,6,16,2))
282  outList.append(addZebra("A",14,6,13,1))
283  outList.append(addZebra("A",14,6,12,1))
284  outList.append(addZebra("A",14,6,11,1))
285  outList.append(addZebra("A",14,6,10,1))
286  outList.append(addZebra("A",14,6,9,1))
287  outList.append(addZebra("A",14,6,8,1))
288  outList.append(addZebra("A",14,6,7,1))
289  outList.append(addZebra("A",14,6,6,1))
290  outList.append(addZebra("A",14,6,5,2))
291  outList.append(addZebra("A",14,6,4,2))
292  outList.append(addZebra("A",14,6,3,1))
293  outList.append(addZebra("A",14,6,2,1))
294  outList.append(addZebra("A",14,6,1,1))
295  outList.append(addZebra("A",14,6,0,1))
296  outList.append(addZebra("A",1,7,16,-1))
297  outList.append(addZebra("A",1,7,12,-1))
298  outList.append(addZebra("A",1,7,11,1))
299  outList.append(addZebra("A",1,7,10,1))
300  outList.append(addZebra("A",1,7,3,1))
301  outList.append(addZebra("A",2,7,23,1))
302  outList.append(addZebra("A",2,7,22,1))
303  outList.append(addZebra("A",15,7,19,-1))
304  outList.append(addZebra("A",15,7,18,-1))
305  outList.append(addZebra("A",5,8,21,1))
306  outList.append(addZebra("A",5,8,20,1))
307  outList.append(addZebra("A",5,8,15,1))
308  outList.append(addZebra("A",5,8,14,1))
309  outList.append(addZebra("A",6,8,3,1))
310  outList.append(addZebra("A",6,8,2,1))
311  outList.append(addZebra("A",7,8,8,-1))
312  outList.append(addZebra("A",9,8,7,1))
313  outList.append(addZebra("A",9,8,6,1))
314  outList.append(addZebra("A",9,8,3,1))
315  outList.append(addZebra("A",9,8,2,1))
316  outList.append(addZebra("A",11,8,23,1))
317  outList.append(addZebra("A",11,8,22,1))
318  outList.append(addZebra("A",12,8,7,-1))
319  outList.append(addZebra("A",12,8,6,-1))
320  outList.append(addZebra("A",12,8,5,1))
321  outList.append(addZebra("A",12,8,4,1))
322  outList.append(addZebra("A",14,8,15,1))
323  outList.append(addZebra("A",14,8,14,1))
324  outList.append(addZebra("A",14,8,3,1))
325  outList.append(addZebra("A",16,8,13,-1))
326  outList.append(addZebra("A",16,8,12,-1))
327  outList.append(addZebra("C",1,1,11,1))
328  outList.append(addZebra("C",1,1,10,1))
329  outList.append(addZebra("C",2,1,15,1))
330  outList.append(addZebra("C",2,1,14,1))
331  outList.append(addZebra("C",2,1,13,1))
332  outList.append(addZebra("C",2,1,12,1))
333  outList.append(addZebra("C",2,1,9,-1))
334  outList.append(addZebra("C",2,1,8,-1))
335  outList.append(addZebra("C",2,1,7,1))
336  outList.append(addZebra("C",2,1,6,1))
337  outList.append(addZebra("C",3,1,17,-1))
338  outList.append(addZebra("C",3,1,16,-1))
339  outList.append(addZebra("C",4,1,13,-1))
340  outList.append(addZebra("C",4,1,12,-1))
341  outList.append(addZebra("C",9,1,7,1))
342  outList.append(addZebra("C",9,1,6,1))
343  outList.append(addZebra("C",10,1,19,-1))
344  outList.append(addZebra("C",10,1,18,-1))
345  outList.append(addZebra("C",10,1,17,-1))
346  outList.append(addZebra("C",10,1,16,-1))
347  outList.append(addZebra("C",12,1,17,-1))
348  outList.append(addZebra("C",12,1,16,-1))
349  outList.append(addZebra("C",12,1,15,1))
350  outList.append(addZebra("C",12,1,14,1))
351  outList.append(addZebra("C",14,1,7,1))
352  outList.append(addZebra("C",14,1,6,1))
353  outList.append(addZebra("C",15,1,11,1))
354  outList.append(addZebra("C",15,1,10,1))
355  outList.append(addZebra("C",15,1,7,1))
356  outList.append(addZebra("C",15,1,6,1))
357  outList.append(addZebra("C",2,2,25,-1))
358  outList.append(addZebra("C",2,2,24,-1))
359  outList.append(addZebra("C",2,2,11,1))
360  outList.append(addZebra("C",2,2,10,1))
361  outList.append(addZebra("C",3,2,9,-1))
362  outList.append(addZebra("C",3,2,8,-1))
363  outList.append(addZebra("C",6,2,9,-1))
364  outList.append(addZebra("C",6,2,8,-1))
365  outList.append(addZebra("C",8,2,17,-1))
366  outList.append(addZebra("C",8,2,16,-1))
367  outList.append(addZebra("C",8,2,9,-1))
368  outList.append(addZebra("C",8,2,8,-1))
369  outList.append(addZebra("C",9,2,11,1))
370  outList.append(addZebra("C",9,2,4,-1))
371  outList.append(addZebra("C",10,2,15,1))
372  outList.append(addZebra("C",10,2,14,2))
373  outList.append(addZebra("C",10,2,3,1))
374  outList.append(addZebra("C",10,2,2,1))
375  outList.append(addZebra("C",11,2,17,-1))
376  outList.append(addZebra("C",11,2,16,-1))
377  outList.append(addZebra("C",11,2,13,-1))
378  outList.append(addZebra("C",11,2,12,-1))
379  outList.append(addZebra("C",13,2,23,1))
380  outList.append(addZebra("C",13,2,22,1))
381  outList.append(addZebra("C",13,2,13,-1))
382  outList.append(addZebra("C",13,2,12,-1))
383  outList.append(addZebra("C",13,2,4,-1))
384  outList.append(addZebra("C",15,2,7,1))
385  outList.append(addZebra("C",15,2,6,1))
386  outList.append(addZebra("C",15,2,3,1))
387  outList.append(addZebra("C",15,2,2,1))
388  outList.append(addZebra("C",16,2,19,1))
389  outList.append(addZebra("C",16,2,18,1))
390  outList.append(addZebra("C",16,2,15,1))
391  outList.append(addZebra("C",16,2,14,1))
392  outList.append(addZebra("C",16,2,11,1))
393  outList.append(addZebra("C",16,2,10,1))
394  outList.append(addZebra("C",16,2,9,-1))
395  outList.append(addZebra("C",16,2,8,-1))
396  outList.append(addZebra("C",16,2,3,1))
397  outList.append(addZebra("C",16,2,2,1))
398  outList.append(addZebra("C",1,3,4,-1))
399  outList.append(addZebra("C",2,3,11,-1))
400  outList.append(addZebra("C",2,3,10,-1))
401  outList.append(addZebra("C",2,3,5,-1))
402  outList.append(addZebra("C",2,3,4,-1))
403  outList.append(addZebra("C",4,3,1,-1))
404  outList.append(addZebra("C",4,3,0,-1))
405  outList.append(addZebra("C",5,3,7,1))
406  outList.append(addZebra("C",5,3,6,1))
407  outList.append(addZebra("C",6,3,23,-1))
408  outList.append(addZebra("C",6,3,22,-1))
409  outList.append(addZebra("C",9,3,23,-1))
410  outList.append(addZebra("C",9,3,22,-1))
411  outList.append(addZebra("C",9,3,19,2))
412  outList.append(addZebra("C",9,3,18,2))
413  outList.append(addZebra("C",9,3,7,1))
414  outList.append(addZebra("C",9,3,6,1))
415  outList.append(addZebra("C",9,3,3,1))
416  outList.append(addZebra("C",9,3,2,1))
417  outList.append(addZebra("C",10,3,28,-1))
418  outList.append(addZebra("C",10,3,9,1))
419  outList.append(addZebra("C",10,3,8,1))
420  outList.append(addZebra("C",11,3,7,1))
421  outList.append(addZebra("C",13,3,25,1))
422  outList.append(addZebra("C",13,3,24,1))
423  outList.append(addZebra("C",14,3,17,-1))
424  outList.append(addZebra("C",14,3,16,-1))
425  outList.append(addZebra("C",15,3,12,-1))
426  outList.append(addZebra("C",16,3,3,1))
427  outList.append(addZebra("C",16,3,2,1))
428  outList.append(addZebra("C",1,4,15,1))
429  outList.append(addZebra("C",1,4,1,-1))
430  outList.append(addZebra("C",1,4,0,-1))
431  outList.append(addZebra("C",2,4,11,1))
432  outList.append(addZebra("C",2,4,10,1))
433  outList.append(addZebra("C",2,4,7,1))
434  outList.append(addZebra("C",3,4,11,1))
435  outList.append(addZebra("C",3,4,10,1))
436  outList.append(addZebra("C",4,4,11,1))
437  outList.append(addZebra("C",7,4,21,1))
438  outList.append(addZebra("C",7,4,20,1))
439  outList.append(addZebra("C",7,4,13,-1))
440  outList.append(addZebra("C",7,4,12,-1))
441  outList.append(addZebra("C",7,4,11,-1))
442  outList.append(addZebra("C",7,4,10,-1))
443  outList.append(addZebra("C",7,4,9,-1))
444  outList.append(addZebra("C",7,4,8,-1))
445  outList.append(addZebra("C",7,4,7,1))
446  outList.append(addZebra("C",7,4,6,1))
447  outList.append(addZebra("C",12,4,15,1))
448  outList.append(addZebra("C",12,4,14,1))
449  outList.append(addZebra("C",12,4,13,1))
450  outList.append(addZebra("C",12,4,12,1))
451  outList.append(addZebra("C",12,4,9,-1))
452  outList.append(addZebra("C",12,4,8,-1))
453  outList.append(addZebra("C",13,4,19,1))
454  outList.append(addZebra("C",13,4,18,1))
455  outList.append(addZebra("C",13,4,15,2))
456  outList.append(addZebra("C",13,4,14,2))
457  outList.append(addZebra("C",13,4,11,1))
458  outList.append(addZebra("C",13,4,10,1))
459  outList.append(addZebra("C",13,4,7,1))
460  outList.append(addZebra("C",13,4,6,1))
461  outList.append(addZebra("C",13,4,3,1))
462  outList.append(addZebra("C",13,4,2,1))
463  outList.append(addZebra("C",14,4,11,1))
464  outList.append(addZebra("C",14,4,10,1))
465  outList.append(addZebra("C",14,4,9,-1))
466  outList.append(addZebra("C",14,4,8,-1))
467  outList.append(addZebra("C",16,4,19,1))
468  outList.append(addZebra("C",16,4,18,1))
469  outList.append(addZebra("C",16,4,15,1))
470  outList.append(addZebra("C",16,4,14,1))
471  outList.append(addZebra("C",16,4,12,-1))
472  outList.append(addZebra("C",16,4,7,1))
473  outList.append(addZebra("C",16,4,6,1))
474  outList.append(addZebra("C",16,4,5,-1))
475  outList.append(addZebra("C",16,4,4,-1))
476  outList.append(addZebra("C",16,4,0,1))
477  outList.append(addZebra("C",2,5,15,1))
478  outList.append(addZebra("C",2,5,14,1))
479  outList.append(addZebra("C",2,5,9,-1))
480  outList.append(addZebra("C",2,5,8,-1))
481  outList.append(addZebra("C",2,5,7,1))
482  outList.append(addZebra("C",2,5,6,1))
483  outList.append(addZebra("C",2,5,3,1))
484  outList.append(addZebra("C",2,5,2,1))
485  outList.append(addZebra("C",3,5,8,-1))
486  outList.append(addZebra("C",3,5,3,-1))
487  outList.append(addZebra("C",3,5,2,-1))
488  outList.append(addZebra("C",4,5,11,-1))
489  outList.append(addZebra("C",4,5,10,-1))
490  outList.append(addZebra("C",4,5,5,1))
491  outList.append(addZebra("C",4,5,4,1))
492  outList.append(addZebra("C",6,5,3,1))
493  outList.append(addZebra("C",6,5,2,1))
494  outList.append(addZebra("C",7,5,15,-1))
495  outList.append(addZebra("C",7,5,14,-1))
496  outList.append(addZebra("C",7,5,11,-1))
497  outList.append(addZebra("C",7,5,10,-1))
498  outList.append(addZebra("C",7,5,7,-1))
499  outList.append(addZebra("C",7,5,6,-1))
500  outList.append(addZebra("C",7,5,3,-1))
501  outList.append(addZebra("C",7,5,2,-1))
502  outList.append(addZebra("C",8,5,19,1))
503  outList.append(addZebra("C",8,5,18,1))
504  outList.append(addZebra("C",8,5,5,-1))
505  outList.append(addZebra("C",8,5,4,-1))
506  outList.append(addZebra("C",8,5,3,2))
507  outList.append(addZebra("C",8,5,2,2))
508  outList.append(addZebra("C",10,5,7,1))
509  outList.append(addZebra("C",10,5,6,1))
510  outList.append(addZebra("C",10,5,3,1))
511  outList.append(addZebra("C",10,5,2,1))
512  outList.append(addZebra("C",11,5,9,-1))
513  outList.append(addZebra("C",11,5,8,-1))
514  outList.append(addZebra("C",11,5,1,-1))
515  outList.append(addZebra("C",11,5,0,-1))
516  outList.append(addZebra("C",12,5,16,-1))
517  outList.append(addZebra("C",12,5,7,1))
518  outList.append(addZebra("C",12,5,6,1))
519  outList.append(addZebra("C",12,5,3,-1))
520  outList.append(addZebra("C",12,5,2,-1))
521  outList.append(addZebra("C",12,5,1,-1))
522  outList.append(addZebra("C",12,5,0,-1))
523  outList.append(addZebra("C",13,5,11,1))
524  outList.append(addZebra("C",13,5,10,1))
525  outList.append(addZebra("C",16,5,14,1))
526  outList.append(addZebra("C",16,5,5,1))
527  outList.append(addZebra("C",16,5,4,1))
528  outList.append(addZebra("C",1,6,15,-1))
529  outList.append(addZebra("C",1,6,14,-1))
530  outList.append(addZebra("C",2,6,9,-1))
531  outList.append(addZebra("C",2,6,8,-1))
532  outList.append(addZebra("C",2,6,7,-1))
533  outList.append(addZebra("C",2,6,6,-1))
534  outList.append(addZebra("C",2,6,5,-1))
535  outList.append(addZebra("C",2,6,4,-1))
536  outList.append(addZebra("C",3,6,19,1))
537  outList.append(addZebra("C",3,6,18,1))
538  outList.append(addZebra("C",3,6,15,1))
539  outList.append(addZebra("C",3,6,14,1))
540  outList.append(addZebra("C",5,6,25,-1))
541  outList.append(addZebra("C",5,6,24,-1))
542  outList.append(addZebra("C",6,6,5,-2))
543  outList.append(addZebra("C",6,6,4,-2))
544  outList.append(addZebra("C",6,6,3,1))
545  outList.append(addZebra("C",6,6,1,-1))
546  outList.append(addZebra("C",6,6,0,-1))
547  outList.append(addZebra("C",7,6,23,2))
548  outList.append(addZebra("C",7,6,22,2))
549  outList.append(addZebra("C",7,6,11,2))
550  outList.append(addZebra("C",7,6,10,2))
551  outList.append(addZebra("C",8,6,25,-1))
552  outList.append(addZebra("C",8,6,24,-1))
553  outList.append(addZebra("C",8,6,7,1))
554  outList.append(addZebra("C",8,6,6,1))
555  outList.append(addZebra("C",9,6,15,-1))
556  outList.append(addZebra("C",9,6,14,-1))
557  outList.append(addZebra("C",10,6,13,-1))
558  outList.append(addZebra("C",10,6,12,-1))
559  outList.append(addZebra("C",10,6,5,-1))
560  outList.append(addZebra("C",10,6,4,-1))
561  outList.append(addZebra("C",10,6,1,-1))
562  outList.append(addZebra("C",10,6,0,-1))
563  outList.append(addZebra("C",11,6,12,-1))
564  outList.append(addZebra("C",11,6,7,1))
565  outList.append(addZebra("C",11,6,6,1))
566  outList.append(addZebra("C",12,6,21,-1))
567  outList.append(addZebra("C",12,6,20,-1))
568  outList.append(addZebra("C",12,6,7,1))
569  outList.append(addZebra("C",13,6,17,-1))
570  outList.append(addZebra("C",15,6,19,1))
571  outList.append(addZebra("C",15,6,18,1))
572  outList.append(addZebra("C",16,6,16,-1))
573  outList.append(addZebra("C",16,6,13,-1))
574  outList.append(addZebra("C",16,6,12,-1))
575  outList.append(addZebra("C",2,7,12,-1))
576  outList.append(addZebra("C",2,7,7,1))
577  outList.append(addZebra("C",2,7,6,1))
578  outList.append(addZebra("C",2,7,3,1))
579  outList.append(addZebra("C",2,7,2,1))
580  outList.append(addZebra("C",3,7,3,-1))
581  outList.append(addZebra("C",3,7,2,-1))
582  outList.append(addZebra("C",6,7,7,1))
583  outList.append(addZebra("C",6,7,6,1))
584  outList.append(addZebra("C",7,7,23,1))
585  outList.append(addZebra("C",7,7,22,1))
586  outList.append(addZebra("C",7,7,21,1))
587  outList.append(addZebra("C",7,7,20,1))
588  outList.append(addZebra("C",7,7,1,-1))
589  outList.append(addZebra("C",7,7,0,-1))
590  outList.append(addZebra("C",8,7,17,-1))
591  outList.append(addZebra("C",8,7,16,-1))
592  outList.append(addZebra("C",8,7,15,1))
593  outList.append(addZebra("C",8,7,14,1))
594  outList.append(addZebra("C",8,7,11,1))
595  outList.append(addZebra("C",8,7,10,1))
596  outList.append(addZebra("C",8,7,1,-3))
597  outList.append(addZebra("C",8,7,0,-3))
598  outList.append(addZebra("C",9,7,21,1))
599  outList.append(addZebra("C",10,7,13,1))
600  outList.append(addZebra("C",10,7,12,1))
601  outList.append(addZebra("C",11,7,19,1))
602  outList.append(addZebra("C",11,7,18,1))
603  outList.append(addZebra("C",12,7,7,-1))
604  outList.append(addZebra("C",12,7,6,-1))
605  outList.append(addZebra("C",13,7,19,1))
606  outList.append(addZebra("C",13,7,18,1))
607  outList.append(addZebra("C",13,7,3,1))
608  outList.append(addZebra("C",14,7,1,-1))
609  outList.append(addZebra("C",14,7,0,-1))
610  outList.append(addZebra("C",15,7,1,-1))
611  outList.append(addZebra("C",15,7,0,-1))
612  outList.append(addZebra("C",16,7,15,1))
613  outList.append(addZebra("C",16,7,14,1))
614  outList.append(addZebra("C",16,7,13,-1))
615  outList.append(addZebra("C",16,7,12,-1))
616  outList.append(addZebra("C",16,7,1,1))
617  outList.append(addZebra("C",16,7,0,1))
618  outList.append(addZebra("C",2,8,7,1))
619  outList.append(addZebra("C",2,8,6,1))
620  outList.append(addZebra("C",2,8,4,-1))
621  outList.append(addZebra("C",2,8,3,1))
622  outList.append(addZebra("C",2,8,2,1))
623  outList.append(addZebra("C",4,8,21,-1))
624  outList.append(addZebra("C",4,8,15,1))
625  outList.append(addZebra("C",6,8,12,-1))
626  outList.append(addZebra("C",6,8,5,-1))
627  outList.append(addZebra("C",6,8,4,-1))
628  outList.append(addZebra("C",6,8,1,-1))
629  outList.append(addZebra("C",6,8,0,-1))
630  outList.append(addZebra("C",7,8,22,-1))
631  outList.append(addZebra("C",7,8,21,-2))
632  outList.append(addZebra("C",7,8,20,-2))
633  outList.append(addZebra("C",7,8,7,1))
634  outList.append(addZebra("C",7,8,6,1))
635  outList.append(addZebra("C",8,8,19,1))
636  outList.append(addZebra("C",8,8,18,1))
637  outList.append(addZebra("C",8,8,17,-1))
638  outList.append(addZebra("C",8,8,16,-1))
639  outList.append(addZebra("C",9,8,19,1))
640  outList.append(addZebra("C",9,8,18,1))
641  outList.append(addZebra("C",9,8,17,-1))
642  outList.append(addZebra("C",9,8,16,-1))
643  outList.append(addZebra("C",9,8,7,1))
644  outList.append(addZebra("C",9,8,6,1))
645  outList.append(addZebra("C",10,8,11,1))
646  outList.append(addZebra("C",10,8,10,1))
647  outList.append(addZebra("C",10,8,5,-1))
648  outList.append(addZebra("C",10,8,4,-1))
649  outList.append(addZebra("C",10,8,3,-1))
650  outList.append(addZebra("C",11,8,19,1))
651  outList.append(addZebra("C",11,8,18,1))
652  outList.append(addZebra("C",11,8,11,1))
653  outList.append(addZebra("C",11,8,10,1))
654  outList.append(addZebra("C",11,8,7,1))
655  outList.append(addZebra("C",12,8,19,-1))
656  outList.append(addZebra("C",12,8,18,-1))
657  outList.append(addZebra("C",12,8,17,-1))
658  outList.append(addZebra("C",12,8,16,-1))
659  outList.append(addZebra("C",12,8,8,-1))
660  outList.append(addZebra("C",12,8,3,1))
661  outList.append(addZebra("C",12,8,2,1))
662  outList.append(addZebra("C",12,8,0,-1))
663  outList.append(addZebra("C",13,8,19,1))
664  outList.append(addZebra("C",13,8,18,1))
665  outList.append(addZebra("C",13,8,7,1))
666  outList.append(addZebra("C",13,8,6,1))
667  outList.append(addZebra("C",13,8,3,1))
668  outList.append(addZebra("C",13,8,2,1))
669  outList.append(addZebra("C",14,8,25,-1))
670  outList.append(addZebra("C",14,8,24,-1))
671  outList.append(addZebra("C",14,8,17,-1))
672  outList.append(addZebra("C",14,8,16,-1))
673  outList.append(addZebra("C",14,8,9,-1))
674  outList.append(addZebra("C",14,8,8,-1))
675  outList.append(addZebra("C",14,8,5,-1))
676  outList.append(addZebra("C",14,8,4,-1))
677  outList.append(addZebra("C",15,8,7,1))
678  outList.append(addZebra("C",15,8,6,1))
679  outList.append(addZebra("C",15,8,3,1))
680  outList.append(addZebra("C",15,8,2,1))
681  outList.append(addZebra("C",15,8,1,-1))
682  outList.append(addZebra("C",15,8,0,-1))
683  outList.append(addZebra("C",16,8,15,1))
684  outList.append(addZebra("C",16,8,14,1))
685  outList.append(addZebra("C",16,8,7,1))
686  outList.append(addZebra("C",16,8,6,1))
687  outList.append(addZebra("C",16,8,3,1))
688  outList.append(addZebra("C",16,8,2,1))
689 
690 
691  with open("MMGZebraShift.json","w") as f:
692  json.dump(outList,f)
zebraShift.MMFE8Channels
def MMFE8Channels(mmfe8)
Definition: zebraShift.py:27
zebraShift.addMMFE8
def addMMFE8(side, sector, layer, mmfe8, shift)
Definition: zebraShift.py:73
Trk::open
@ open
Definition: BinningType.h:40
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
zebraShift.zebraChannels
def zebraChannels(zebra)
Definition: zebraShift.py:7
zebraShift.addZebra
def addZebra(side, sector, layer, zebra, shift)
Definition: zebraShift.py:49