ATLAS Offline Software
Static Public Member Functions | List of all members
EfexDefs Class Reference

#include <EfexDefs.h>

Collaboration diagram for EfexDefs:

Static Public Member Functions

static int numFibresPerRibbon ()
 
static int numRibbonsPerConnector ()
 
static int numFibresPerConnector ()
 
static int numInputConnectors ()
 
static int numInputRibbons ()
 
static int numInputFibres ()
 
static int numInputChannels ()
 
static int maxSuperCellsPerFibre ()
 
static int num32BitWordsPerFibre ()
 
static int numBitsPerSuperCell ()
 
static int numOutputRibbons ()
 
static int numOutputFibres ()
 
static int nProcessorFpgas ()
 
static int numInputFibresPerFpga ()
 
static int numInputMgtsPerFpga ()
 
static int numQuadsPerFpga ()
 
static int numMgtsPerQuad ()
 
static int nCaloReadoutStreams ()
 
static int nTobReadoutStreams ()
 
static int maxEtaBinsPerFpga ()
 
static int numEtaBinsPerModule ()
 
static int maxEtaBinsPerModule ()
 
static int inputPlaybackDepth ()
 
static int roSpyMemoryDepth ()
 
static int connectorForMinipod (int minipod)
 Return MTP connector number (0-3) for a given minipod. More...
 
static int connectorFirstFibre (int minipod)
 Return first fibre in the input MTP connector for a given minipod. More...
 
static unsigned int globalEtaIndex (unsigned int efexLogicalID, unsigned int fpgaNumber, unsigned int etaWithinFpga)
 Return unsigned eta bin within eFEX system (used for calibration channels). More...
 
static int globalEtaValue (unsigned int efexLogicalID, unsigned int fpgaNumber, unsigned int etaWithinFpga)
 Return signed eta bin within eFEX system (used for trigger menu API). More...
 

Detailed Description

This class provides static methods to handle input fibre mappings: between MTP input connectors and minipods on the board, also for mapping of fanned out fibres to the quads on each FPGA.

Todo:
FIXME These initial mappings are surely wrong: SJH 07/07/21 tried to get it right

Definition at line 13 of file EfexDefs.h.

Member Function Documentation

◆ connectorFirstFibre()

int EfexDefs::connectorFirstFibre ( int  minipod)
static

Return first fibre in the input MTP connector for a given minipod.

Parameters
minipodinput ribbon (minipod) number (0-9 EM, 10-12 hadronic)
Returns
first fibre number (0,12,24,36)

Definition at line 51 of file EfexDefs.cxx.

52 {
53  // Not all 12-fibre ribbons are used, so skip unused ones
54  // to map onto minipods.
55  int conn = EfexDefs::connectorForMinipod(minipod);
56  // SJH 07/07/21 Updated in line with Gareth's mapping
57  // which we believe is correct. It's rather messier
58  // than earlier assumptions
59  // **CHECK!!**
60  int numUnused = 0;
61  int reverse = 1;
62  if (conn < 0) { return -1; }
63  else if (conn == 0) { numUnused = 0; reverse = 1; }
64  else if (conn == 1) { numUnused = 3; reverse = 1; }
65  else if (conn == 2) { numUnused = 2; reverse = -1; }
66  else if (conn == 3) { numUnused = 1; reverse = -1; }
68  int ribbon = (5*rpc + minipod*reverse + numUnused) % rpc;
69  // Deal with annoying hadronic case...
70  if ( minipod == 12 )
71  ribbon = 0;
72  return ribbon * FexDefs::numFibresPerRibbon();
73 }

◆ connectorForMinipod()

int EfexDefs::connectorForMinipod ( int  minipod)
static

Return MTP connector number (0-3) for a given minipod.

Parameters
minipodinput ribbon (minipod) number (0-9 EM, 10-12 hadronic)
Returns
input connector number (0-3, -1 for invalid minipod)

Definition at line 28 of file EfexDefs.cxx.

29 {
30  // Actual mapping has hadronic on connector 1 (of 0-3)
31  // and the two minipod central region on connector 3.
32  // **CHECK!!**
33  // SJH 07/07/21 Updated in line with Gareth's mapping
34  // Hopefully Gareth's mapping is correct
35  if (minipod >= 0 && minipod < 4) { return 0; } // E0-E3
36  else if (minipod >= 4 && minipod < 6) { return 2; } // E4-E5
37  else if (minipod >= 6 && minipod < 10) { return 3; } // E6-E9
38  else if (minipod >= 10 && minipod < 13) { return 1; } // H0-H2
39  else { return -1; }
40 }

◆ globalEtaIndex()

unsigned int EfexDefs::globalEtaIndex ( unsigned int  efexLogicalID,
unsigned int  fpgaNumber,
unsigned int  etaWithinFpga 
)
static

Return unsigned eta bin within eFEX system (used for calibration channels).

Return first fibre in the input MTP connector for a given minipod.

Parameters
efexLogicalIDlogical ID of eFEX within crate (0-11)
fpgaNumberindex of FPGA (0-3)
etaWithinFpgaeta bin within FPGA (0-4)
Returns
unsigned global eta bin in range 0-49 (where 0 is -2.5)

Definition at line 87 of file EfexDefs.cxx.

90 {
91  unsigned int positionID = efexLogicalID % 3; // eFEX C,B,A role
92  unsigned int etaIndex = (16 * positionID) + (fpgaNumber * 4) + etaWithinFpga;
93  etaIndex += (positionID != 0 || fpgaNumber != 0) ? 1 : 0; // Adjustment for ends
94  return etaIndex;
95 }

◆ globalEtaValue()

int EfexDefs::globalEtaValue ( unsigned int  efexLogicalID,
unsigned int  fpgaNumber,
unsigned int  etaWithinFpga 
)
static

Return signed eta bin within eFEX system (used for trigger menu API).

Parameters
efexLogicalIDlogical ID of eFEX within crate (0-11)
fpgaNumberindex of FPGA (0-3)
etaWithinFpgaeta bin within FPGA (0-4)
Returns
signed global eta bin in range -25 to +24

Definition at line 108 of file EfexDefs.cxx.

111 {
112  return (int)EfexDefs::globalEtaIndex(efexLogicalID,fpgaNumber,etaWithinFpga) - 25;
113 }

◆ inputPlaybackDepth()

static int EfexDefs::inputPlaybackDepth ( )
inlinestatic

Definition at line 50 of file EfexDefs.h.

50 { return FexDefs::inputPlaybackDepth(); }

◆ maxEtaBinsPerFpga()

static int EfexDefs::maxEtaBinsPerFpga ( )
inlinestatic

Definition at line 45 of file EfexDefs.h.

45 { return 5; }

◆ maxEtaBinsPerModule()

static int EfexDefs::maxEtaBinsPerModule ( )
inlinestatic

Definition at line 47 of file EfexDefs.h.

47 { return maxEtaBinsPerFpga() * nProcessorFpgas(); }

◆ maxSuperCellsPerFibre()

static int EfexDefs::maxSuperCellsPerFibre ( )
inlinestatic

Definition at line 27 of file EfexDefs.h.

27 { return 20; }

◆ nCaloReadoutStreams()

static int EfexDefs::nCaloReadoutStreams ( )
inlinestatic

Definition at line 40 of file EfexDefs.h.

40 { return 4; } // Sent separately

◆ nProcessorFpgas()

static int EfexDefs::nProcessorFpgas ( )
inlinestatic

Definition at line 34 of file EfexDefs.h.

34 { return 4; }

◆ nTobReadoutStreams()

static int EfexDefs::nTobReadoutStreams ( )
inlinestatic

Definition at line 41 of file EfexDefs.h.

41 { return 1; } // Merged in control FPGA

◆ num32BitWordsPerFibre()

static int EfexDefs::num32BitWordsPerFibre ( )
inlinestatic

Definition at line 28 of file EfexDefs.h.

◆ numBitsPerSuperCell()

static int EfexDefs::numBitsPerSuperCell ( )
inlinestatic

Definition at line 29 of file EfexDefs.h.

29 { return 10; } // TODO: CHECK THIS!!

◆ numEtaBinsPerModule()

static int EfexDefs::numEtaBinsPerModule ( )
inlinestatic

Definition at line 46 of file EfexDefs.h.

46 { return 17; }

◆ numFibresPerConnector()

static int EfexDefs::numFibresPerConnector ( )
inlinestatic

Definition at line 18 of file EfexDefs.h.

◆ numFibresPerRibbon()

static int EfexDefs::numFibresPerRibbon ( )
inlinestatic

Definition at line 16 of file EfexDefs.h.

16 { return FexDefs::numFibresPerRibbon(); }

◆ numInputChannels()

static int EfexDefs::numInputChannels ( )
inlinestatic

Definition at line 25 of file EfexDefs.h.

25 { return numInputFibres(); }

◆ numInputConnectors()

static int EfexDefs::numInputConnectors ( )
inlinestatic

Definition at line 21 of file EfexDefs.h.

21 { return 4; }

◆ numInputFibres()

static int EfexDefs::numInputFibres ( )
inlinestatic

Definition at line 23 of file EfexDefs.h.

23 { return numInputRibbons() * numFibresPerRibbon(); }

◆ numInputFibresPerFpga()

static int EfexDefs::numInputFibresPerFpga ( )
inlinestatic

Definition at line 35 of file EfexDefs.h.

35 { return 49; } // 40 EM + 9 Hadronic (total number actually in use)

◆ numInputMgtsPerFpga()

static int EfexDefs::numInputMgtsPerFpga ( )
inlinestatic

Definition at line 36 of file EfexDefs.h.

36 { return 80; } // NB not all are used, but index is 0-79 for all FPGAs

◆ numInputRibbons()

static int EfexDefs::numInputRibbons ( )
inlinestatic

Definition at line 22 of file EfexDefs.h.

◆ numMgtsPerQuad()

static int EfexDefs::numMgtsPerQuad ( )
inlinestatic

Definition at line 38 of file EfexDefs.h.

38 {return 4; }

◆ numOutputFibres()

static int EfexDefs::numOutputFibres ( )
inlinestatic

Definition at line 32 of file EfexDefs.h.

32 { return numOutputRibbons() * numFibresPerRibbon(); }

◆ numOutputRibbons()

static int EfexDefs::numOutputRibbons ( )
inlinestatic

Definition at line 31 of file EfexDefs.h.

31 { return 2; } // TODO: CHECK THIS!!

◆ numQuadsPerFpga()

static int EfexDefs::numQuadsPerFpga ( )
inlinestatic

Definition at line 37 of file EfexDefs.h.

37 {return 20; }

◆ numRibbonsPerConnector()

static int EfexDefs::numRibbonsPerConnector ( )
inlinestatic

Definition at line 17 of file EfexDefs.h.

17 { return 4; }

◆ roSpyMemoryDepth()

static int EfexDefs::roSpyMemoryDepth ( )
inlinestatic

Definition at line 51 of file EfexDefs.h.

51 { return 0x800; }

The documentation for this class was generated from the following files:
FexDefs::num32BitWordsPerFibre
static int num32BitWordsPerFibre()
Definition: FexDefs.h:17
EfexDefs::numFibresPerRibbon
static int numFibresPerRibbon()
Definition: EfexDefs.h:16
xAOD::numUnused
@ numUnused
Definition: TrackingPrimitives.h:535
FexDefs::inputPlaybackDepth
static int inputPlaybackDepth()
Definition: FexDefs.h:22
checkCorrelInHIST.conn
conn
Definition: checkCorrelInHIST.py:25
EfexDefs::maxEtaBinsPerFpga
static int maxEtaBinsPerFpga()
Definition: EfexDefs.h:45
EfexDefs::globalEtaIndex
static unsigned int globalEtaIndex(unsigned int efexLogicalID, unsigned int fpgaNumber, unsigned int etaWithinFpga)
Return unsigned eta bin within eFEX system (used for calibration channels).
Definition: EfexDefs.cxx:87
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
EfexDefs::numInputConnectors
static int numInputConnectors()
Definition: EfexDefs.h:21
EfexDefs::numRibbonsPerConnector
static int numRibbonsPerConnector()
Definition: EfexDefs.h:17
FexDefs::numFibresPerRibbon
static int numFibresPerRibbon()
Definition: FexDefs.h:14
EfexDefs::nProcessorFpgas
static int nProcessorFpgas()
Definition: EfexDefs.h:34
EfexDefs::numOutputRibbons
static int numOutputRibbons()
Definition: EfexDefs.h:31
EfexDefs::numInputFibres
static int numInputFibres()
Definition: EfexDefs.h:23
EfexDefs::connectorForMinipod
static int connectorForMinipod(int minipod)
Return MTP connector number (0-3) for a given minipod.
Definition: EfexDefs.cxx:28
EfexDefs::numInputRibbons
static int numInputRibbons()
Definition: EfexDefs.h:22