ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
LVL1TGCTrigger::TGCInnerTrackletSlotHolder Class Reference

#include <TGCInnerTrackletSlotHolder.h>

Collaboration diagram for LVL1TGCTrigger::TGCInnerTrackletSlotHolder:

Public Types

enum  { NUMBER_OF_SIDES = 2, NUMBER_OF_SLOTS = 24, FIRST_SLOT = 1, NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR = 4 }
 returns SL readout trigger bits FI2|EI2|FI1|EI1|FI0|EI0 More...
 

Public Member Functions

 TGCInnerTrackletSlotHolder (TGCArguments *)
 Constructor. More...
 
 ~TGCInnerTrackletSlotHolder ()
 Destructor. More...
 
void clearTriggerBits ()
 
bool setTriggerBit (const int sideId, const int slotId, const unsigned int region, const unsigned int readout, const unsigned int iBit, const bool triggerBit)
 
const TGCInnerTrackletSlotgetInnerTrackletSlot (const int sideId, const int slotId) const
 
void getInnerTrackletSlots (const int sideId, const int octId, const int moduleId, const TGCInnerTrackletSlot *innerTrackletSlots[]) const
 
void getInnerTrackletBits (const TGCInnerTrackletSlot *innerTrackletSlots[], std::array< int, NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR > &eifi_bits) const
 
const TGCArgumentstgcArgs () const
 

Private Attributes

TGCInnerTrackletSlot m_innerTrackletSlot [NUMBER_OF_SIDES][NUMBER_OF_SLOTS]
 
TGCArgumentsm_tgcArgs
 

Detailed Description

Definition at line 14 of file TGCInnerTrackletSlotHolder.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

returns SL readout trigger bits FI2|EI2|FI1|EI1|FI0|EI0

Enumerator
NUMBER_OF_SIDES 
NUMBER_OF_SLOTS 
FIRST_SLOT 
NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR 

Definition at line 31 of file TGCInnerTrackletSlotHolder.h.

31  {
32  NUMBER_OF_SIDES = 2, // Side A and Side C
33  NUMBER_OF_SLOTS = 24, // Slot01 - Slot24
34  FIRST_SLOT = 1,
36  // slot23, slot24, slot01, slot02 go to A01 phi0/phi1 Endcap SL
37  };

Constructor & Destructor Documentation

◆ TGCInnerTrackletSlotHolder()

LVL1TGCTrigger::TGCInnerTrackletSlotHolder::TGCInnerTrackletSlotHolder ( TGCArguments tgcargs)

Constructor.

Definition at line 9 of file TGCInnerTrackletSlotHolder.cxx.

9  :
10  m_tgcArgs(tgcargs)
11  {
12  for(int sideId=0; sideId<NUMBER_OF_SIDES; sideId++) { // Side A and Side C
13  for(int slotId=FIRST_SLOT; slotId<NUMBER_OF_SLOTS+FIRST_SLOT; slotId++) { // Slot01 - Slot24
14  m_innerTrackletSlot[sideId][slotId-FIRST_SLOT].setSideId(sideId);
15  // There is offset of 1. Slot01 is m_innerTrackletSlot[sideId][0].
16  m_innerTrackletSlot[sideId][slotId-FIRST_SLOT].setSlotId(slotId);
18  }
19  }
20  }

◆ ~TGCInnerTrackletSlotHolder()

LVL1TGCTrigger::TGCInnerTrackletSlotHolder::~TGCInnerTrackletSlotHolder ( )
inline

Destructor.

Definition at line 19 of file TGCInnerTrackletSlotHolder.h.

19 {};

Member Function Documentation

◆ clearTriggerBits()

void LVL1TGCTrigger::TGCInnerTrackletSlotHolder::clearTriggerBits ( )

Definition at line 22 of file TGCInnerTrackletSlotHolder.cxx.

22  {
23  for(int sideId=0; sideId<NUMBER_OF_SIDES; sideId++) { // Side A and Side C
24  for(int slotId=FIRST_SLOT; slotId<NUMBER_OF_SLOTS+FIRST_SLOT; slotId++) { // Slot01 - Slot24
26  }
27  }
28  }

◆ getInnerTrackletBits()

void LVL1TGCTrigger::TGCInnerTrackletSlotHolder::getInnerTrackletBits ( const TGCInnerTrackletSlot innerTrackletSlots[],
std::array< int, NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR > &  eifi_bits 
) const

Definition at line 80 of file TGCInnerTrackletSlotHolder.cxx.

81  {
82 
83  const int n_slots = NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR;
84  const int n_regions = TGCInnerTrackletSlot::NUMBER_OF_REGIONS;
85  const int n_readouts = TGCInnerTrackletSlot::NUMBER_OF_READOUTS;
87 
88  for (int iSlot = 0; iSlot < n_slots; iSlot++) { // Inner slots per trigger sector : 4
89  int tmp_bits = 0;
90  for (int iRegion = 0; iRegion < n_regions; iRegion++) { // EI or FI
91  for (int iReadouts = 0; iReadouts < n_readouts; iReadouts++) { // STRIP or WIRE
92  for (int iBits = 0; iBits < n_bits; iBits++) { // 4 bits : 0-7, 8-15, 16-23, 24-31
93  tmp_bits &= innerTrackletSlots[iSlot]->getTriggerBit(iRegion, iReadouts, iBits) << (iBits+iReadouts*4+iRegion*8);
94  }
95  }
96  }
97  eifi_bits[iSlot] = tmp_bits;
98  }
99  }

◆ getInnerTrackletSlot()

const TGCInnerTrackletSlot * LVL1TGCTrigger::TGCInnerTrackletSlotHolder::getInnerTrackletSlot ( const int  sideId,
const int  slotId 
) const

Definition at line 38 of file TGCInnerTrackletSlotHolder.cxx.

38  {
39  if(sideId<0 || sideId>=NUMBER_OF_SIDES) return 0;
40  if(slotId<FIRST_SLOT || slotId>=NUMBER_OF_SLOTS+FIRST_SLOT) return 0;
41  return &m_innerTrackletSlot[sideId][slotId-FIRST_SLOT];
42  }

◆ getInnerTrackletSlots()

void LVL1TGCTrigger::TGCInnerTrackletSlotHolder::getInnerTrackletSlots ( const int  sideId,
const int  octId,
const int  moduleId,
const TGCInnerTrackletSlot innerTrackletSlots[] 
) const

Definition at line 44 of file TGCInnerTrackletSlotHolder.cxx.

45  {
46  // Initialize innerTrackletSlot array
47  for(unsigned int iSlot=0; iSlot<NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR; iSlot++) {
48  innerTrackletSlots[iSlot] = 0;
49  }
50  if(sideId<0 || sideId>=NUMBER_OF_SIDES) return; // Side A or Side C
51  if(octId<0 || octId>=8) return; // octId is 0-8.
52  // OnlineID moduleNumber
53  // <---- phi ----
54  // EC: 7 6 4 3 1 0 11 10 9
55  // FWD: 8 5 2 14 13 12
56  // [M1, M2, M3] [EI/FI]
57  if(!(moduleId==0 || moduleId==1 ||
58  moduleId==3 || moduleId==4 ||
59  moduleId==6 || moduleId==7)) return; // moduleId is 0,1,3,4,6,7 for ENDCAP.
60  int secId = (moduleId/3)*2+moduleId%3; // secId=0-5(EC)
61  int phi = (secId+46+octId*6)%48+1; // phi=1-48(EC), 1 is just above +x-axis and 48 is just below +x-axis
62  // slot23, slot24, slot01, slot02 go to A01 phi0/phi1 (phi=47/phi=48)
63  // slot24, slot01, slot02, slot03 go to A01 phi2/phi3 (phi= 1/phi= 2)
64  // slot01, slot02, slot03, slot04 go to A02 phi0/phi1 (phi= 3/phi= 4)
65  // ... ...
66  for(unsigned int iSlot=0; iSlot<NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR; iSlot++) {
67  int slotId = (static_cast<int>(iSlot) + (phi-1)/2 + 23)%24 + 1;
68  // phi (phi-1)/2 (static_cast<int>(iSlot) + (phi-1)/2 + 23)%24 + 1
69  // iSlot=0 iSlot=1 iSlot=2 iSlot=3
70  // 47 23 (0+23+23)%24+1 (1+23+23)%24+1 (2+23+23)%24+1 (3+23+23)%24+1
71  // 48 23 (0+23+23)%24+1 (1+23+23)%24+1 (2+23+23)%24+1 (3+23+23)%24+1
72  // 1 0 (0+ 0+23)%24+1 (1+ 0+23)%24+1 (2+ 0+23)%24+1 (3+ 0+23)%24+1
73  // 2 0 (0+ 0+23)%24+1 (1+ 0+23)%24+1 (2+ 0+23)%24+1 (3+ 0+23)%24+1
74  // 3 1 (0+ 1+23)%24+1 (1+ 1+23)%24+1 (2+ 1+23)%24+1 (3+ 1+23)%24+1
75  // 4 1 (0+ 1+23)%24+1 (1+ 1+23)%24+1 (2+ 1+23)%24+1 (3+ 1+23)%24+1
76  innerTrackletSlots[iSlot] = getInnerTrackletSlot(sideId, slotId);
77  }
78  }

◆ setTriggerBit()

bool LVL1TGCTrigger::TGCInnerTrackletSlotHolder::setTriggerBit ( const int  sideId,
const int  slotId,
const unsigned int  region,
const unsigned int  readout,
const unsigned int  iBit,
const bool  triggerBit 
)

Definition at line 30 of file TGCInnerTrackletSlotHolder.cxx.

32  {
33  if(sideId<0 || sideId>=NUMBER_OF_SIDES) return false;
34  if(slotId<FIRST_SLOT || slotId>=NUMBER_OF_SLOTS+FIRST_SLOT) return false;
35  return m_innerTrackletSlot[sideId][slotId-FIRST_SLOT].setTriggerBit(region, readout, iBit, triggerBit);
36  }

◆ tgcArgs()

const TGCArguments* LVL1TGCTrigger::TGCInnerTrackletSlotHolder::tgcArgs ( ) const
inline

Definition at line 40 of file TGCInnerTrackletSlotHolder.h.

40 { return m_tgcArgs; }

Member Data Documentation

◆ m_innerTrackletSlot

TGCInnerTrackletSlot LVL1TGCTrigger::TGCInnerTrackletSlotHolder::m_innerTrackletSlot[NUMBER_OF_SIDES][NUMBER_OF_SLOTS]
private

Definition at line 43 of file TGCInnerTrackletSlotHolder.h.

◆ m_tgcArgs

TGCArguments* LVL1TGCTrigger::TGCInnerTrackletSlotHolder::m_tgcArgs
private

Definition at line 44 of file TGCInnerTrackletSlotHolder.h.


The documentation for this class was generated from the following files:
LVL1TGCTrigger::TGCInnerTrackletSlotHolder::FIRST_SLOT
@ FIRST_SLOT
Definition: TGCInnerTrackletSlotHolder.h:34
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
LVL1TGCTrigger::TGCInnerTrackletSlot::NUMBER_OF_REGIONS
@ NUMBER_OF_REGIONS
Definition: TGCInnerTrackletSlot.h:35
LVL1TGCTrigger::TGCInnerTrackletSlot::NUMBER_OF_READOUTS
@ NUMBER_OF_READOUTS
Definition: TGCInnerTrackletSlot.h:38
LVL1TGCTrigger::TGCInnerTrackletSlotHolder::getInnerTrackletSlot
const TGCInnerTrackletSlot * getInnerTrackletSlot(const int sideId, const int slotId) const
Definition: TGCInnerTrackletSlotHolder.cxx:38
LVL1TGCTrigger::TGCInnerTrackletSlot::setSideId
void setSideId(const int sideId)
Definition: TGCInnerTrackletSlot.cxx:21
LVL1TGCTrigger::TGCInnerTrackletSlot::setTriggerBit
bool setTriggerBit(const unsigned int region, const unsigned int readout, const unsigned int iBit, const bool triggerBit)
Definition: TGCInnerTrackletSlot.cxx:48
LVL1TGCTrigger::TGCInnerTrackletSlot::setSlotId
void setSlotId(const int slotId)
Definition: TGCInnerTrackletSlot.cxx:29
LVL1TGCTrigger::TGCInnerTrackletSlotHolder::m_innerTrackletSlot
TGCInnerTrackletSlot m_innerTrackletSlot[NUMBER_OF_SIDES][NUMBER_OF_SLOTS]
Definition: TGCInnerTrackletSlotHolder.h:43
LVL1TGCTrigger::TGCInnerTrackletSlot::setTgcArguments
void setTgcArguments(const TGCArguments *)
Definition: TGCInnerTrackletSlot.cxx:17
LVL1TGCTrigger::TGCInnerTrackletSlot::NUMBER_OF_TRIGGER_BITS
@ NUMBER_OF_TRIGGER_BITS
Definition: TGCInnerTrackletSlot.h:39
LVL1TGCTrigger::TGCInnerTrackletSlotHolder::tgcArgs
const TGCArguments * tgcArgs() const
Definition: TGCInnerTrackletSlotHolder.h:40
LVL1TGCTrigger::TGCInnerTrackletSlotHolder::NUMBER_OF_SIDES
@ NUMBER_OF_SIDES
Definition: TGCInnerTrackletSlotHolder.h:32
LVL1TGCTrigger::TGCInnerTrackletSlotHolder::m_tgcArgs
TGCArguments * m_tgcArgs
Definition: TGCInnerTrackletSlotHolder.h:44
LVL1TGCTrigger::TGCInnerTrackletSlotHolder::NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR
@ NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR
Definition: TGCInnerTrackletSlotHolder.h:35
LVL1TGCTrigger::TGCInnerTrackletSlotHolder::NUMBER_OF_SLOTS
@ NUMBER_OF_SLOTS
Definition: TGCInnerTrackletSlotHolder.h:33
LVL1TGCTrigger::TGCInnerTrackletSlot::clearTriggerBits
void clearTriggerBits()
Definition: TGCInnerTrackletSlot.cxx:64