ATLAS Offline Software
Functions | Variables
zebraShift Namespace Reference

Functions

def zebraChannels (zebra)
 
def MMFE8Channels (mmfe8)
 
def addZebra (side, sector, layer, zebra, shift)
 
def addMMFE8 (side, sector, layer, mmfe8, shift)
 

Variables

list outList = []
 

Function Documentation

◆ addMMFE8()

def zebraShift.addMMFE8 (   side,
  sector,
  layer,
  mmfe8,
  shift 
)
Returns a dictionary which represents a shift of a zebra connector

    Parameters:
        side (string) identifies the wheel: possible values "A" and "C"
        sector (int) identifies the sector counting from 1 to 16
        layer (int) identifies the detector layer whithin a given sector. Counts from 1 to 8
        mmfe8 (int) identifies the MMFE8 number within a layer. Counting from 0 to 15
        shift (int) indicates by how much and in which direction the channels in a given connector should be moved
    
    Returns:
        dictionary with the fields that the NSW cabling alg will use to apply the shift

Definition at line 73 of file zebraShift.py.

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 

◆ addZebra()

def zebraShift.addZebra (   side,
  sector,
  layer,
  zebra,
  shift 
)
Returns a dictionary which represents a shift of a zebra connector

    Parameters:
        side (string) identifies the wheel: possible values "A" and "C"
        sector (int) identifies the sector counting from 1 to 16
        layer (int) identifies the detector layer whithin a given sector. Counts from 1 to 8
        zebra (int) identifies the zebra connector number within a layer. Counting from 0 to 31
        shift (int) indicates by how much and in which direction the channels in a given connector should be moved
    
    Returns:
        dictionary with the fields that the NSW cabling alg will use to apply the shift

Definition at line 49 of file zebraShift.py.

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 

◆ MMFE8Channels()

def zebraShift.MMFE8Channels (   mmfe8)
Returns a tuple with the first and the last channel in an MMFE (Micromegas front end board).

    Parameters:
        mmfe8 (int) identifies the zebra connector number within a layer. Counting from 0 to 15
    
    Returns:
        tuple containing the first and the last strip of a given MMFE8

Definition at line 27 of file zebraShift.py.

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 

◆ zebraChannels()

def zebraShift.zebraChannels (   zebra)
Returns a tuple with the first and the last channel in a MM zebra connector.

    Parameters:
        zebra (int) identifies the zebra connector number within a layer. Counting from 0 to 31
    
    Returns:
        tuple containing the first and the last strip of a given zebra connector

Definition at line 7 of file zebraShift.py.

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 

Variable Documentation

◆ outList

list zebraShift.outList = []

Definition at line 103 of file zebraShift.py.

zebraShift.MMFE8Channels
def MMFE8Channels(mmfe8)
Definition: zebraShift.py:27
zebraShift.addMMFE8
def addMMFE8(side, sector, layer, mmfe8, shift)
Definition: zebraShift.py:73
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569
zebraShift.zebraChannels
def zebraChannels(zebra)
Definition: zebraShift.py:7
zebraShift.addZebra
def addZebra(side, sector, layer, zebra, shift)
Definition: zebraShift.py:49