ATLAS Offline Software
TGCHighPtBoard.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TGCHighPtBoard_hh
6 #define TGCHighPtBoard_hh
7 
10 
11 namespace LVL1TGCTrigger {
12 class TGCSlaveBoardOut;
13 class TGCHighPtBoardOut;
14 class TGCHighPtChipOut;
15 
16 const int PtLow = 0;
17 const int PtHigh =1;
18 
19 const int NumberOfAdjacentHPB = 2;
20 const int NumberOfChip = 2;
21 const int NBlockOfDSBChannel = 6;
22 const int NDecoderInTSB = 4;
23 const int NDecoderInDSB = 3;
24 const int NDecoderInSTSB = 3;
25 
27 
28 inline TGCHBChip operator++( TGCHBChip &rs, int )
29 {
30  return rs = (TGCHBChip)(rs + 1);
31 }
32 
34 {
35  private:
36  static constexpr int s_NumberOfTSBOut = 2;
37  static constexpr int s_NumberOfDSBOut = 3; //look at the HighPt Board
38 
39  public:
40  virtual ~TGCHighPtBoard();
41 
42  void clockIn(int bidIn);
44  void eraseOutput();
45 
46  int getId() const;
47  void setId(int idIn);
48  int getType() const;
49  void setType(int typeIn){ m_type=typeIn;}
50  TGCRegionType getRegion() const { return m_region;}
51  void setRegion(const TGCRegionType regionIn){ m_region = regionIn;}
52 
53  void setDSB(int connector, TGCSlaveBoard* SBIn);
54  void setTSB(int connector, TGCSlaveBoard* SBIn);
55  TGCSlaveBoardOut* getTSBOut(int chip, int port);
57 
58  void showResult() const;
59 
60  protected:
61  TGCHighPtBoard(); // use derived class only
62  TGCHighPtBoard(const TGCHighPtBoard& right) = delete;
63  TGCHighPtBoard& operator=(const TGCHighPtBoard& right) = delete;
64 
65  protected:
66  void collectInput();
67  void createHighPtChipOut();
68  void createHighPtBoardOut();
69  void createLowPtBoardOut(); //create Low-pT Outputs from SLB ASICs.
70  void doCoincidence();
71  void trackSelector(int chip, int ptIn);
72  virtual void highLowSelector(int chip);
73  void deleteSlaveBoardOut();
74  void loadLowPtOutput(int chip, int block, TGCSlaveBoardOut* dataDSB);
75  void eraseHighPtOutput();
76  void eraseLowPtOutput();
77 
78  virtual void decodeSlaveBoardOut(int chip,
79  TGCHitPattern* tHit,
80  TGCHitPattern* dHit) = 0;
81  virtual void doCoincidenceMatrix( int chip, int block,
82  const TGCHitPattern* tHit,
83  const TGCHitPattern* dHit) = 0;
84  virtual void setDecoderIn()=0;
85  virtual void clearDecoderIn()=0;
86 
88 
90  TGCHighPtBoardOut* m_lowPtBoardOut; //Low-pT Outputs from SLB ASICs.
91 
99 
100  int m_id;
101  int m_bid;
103  int m_type;
105 
108  int m_maxDev;
115 };
116 
117 inline
118 void TGCHighPtBoard::setId(int idIn)
119 {
120  m_id = idIn;
121 }
122 
123 inline
125 {
126  return m_id;
127 }
128 
129 inline
131 {
132  return m_type;
133 }
134 
135 inline
136 void TGCHighPtBoard::setDSB(int connector, TGCSlaveBoard* SBIn)
137 {
138  int port = connector % s_NumberOfDSBOut;
139  int chip = connector / s_NumberOfDSBOut;
140  m_DSB[chip][port] = SBIn;
141 }
142 
143 inline
144 void TGCHighPtBoard::setTSB(int connector, TGCSlaveBoard* SBIn)
145 {
146  int port = connector % s_NumberOfTSBOut;
147  int chip = connector / s_NumberOfTSBOut;
148  m_TSB[chip][port] = SBIn;
149 }
150 
151 
152 } //end of namespace bracket
153 
154 #endif // TGCHighPtBoard_hh
LVL1TGCTrigger::TGCHighPtBoard::eraseOutput
void eraseOutput()
Definition: TGCHighPtBoard.cxx:149
LVL1TGCTrigger::TGCHighPtBoard::setAdjacentHPB
void setAdjacentHPB(int side, TGCHighPtBoard *hpt)
Definition: TGCHighPtBoard.h:56
LVL1TGCTrigger::PtHigh
const int PtHigh
Definition: TGCHighPtBoard.h:17
LVL1TGCTrigger::TGCHighPtBoard::~TGCHighPtBoard
virtual ~TGCHighPtBoard()
Definition: TGCHighPtBoard.cxx:42
LVL1TGCTrigger::TGCHighPtBoard::m_type
int m_type
Definition: TGCHighPtBoard.h:103
LVL1TGCTrigger::TGCHighPtBoard::collectInput
void collectInput()
Definition: TGCHighPtBoard.cxx:125
LVL1TGCTrigger::TGCHighPtBoard::doCoincidence
void doCoincidence()
Definition: TGCHighPtBoard.cxx:170
LVL1TGCTrigger::TGCHighPtBoard::deleteSlaveBoardOut
void deleteSlaveBoardOut()
Definition: TGCHighPtBoard.cxx:106
LVL1TGCTrigger::TGCHighPtBoard::m_DSBOut
TGCSlaveBoardOut * m_DSBOut[NumberOfChip][s_NumberOfDSBOut]
Definition: TGCHighPtBoard.h:94
TGCConnectionHPBToSL.h
LVL1TGCTrigger::NDecoderInSTSB
const int NDecoderInSTSB
Definition: TGCHighPtBoard.h:24
LVL1TGCTrigger::TGCHighPtBoard::m_nChOfTSBOut
int m_nChOfTSBOut
Definition: TGCHighPtBoard.h:110
LVL1TGCTrigger::NDecoderInDSB
const int NDecoderInDSB
Definition: TGCHighPtBoard.h:23
LVL1TGCTrigger::TGCHighPtBoard::setType
void setType(int typeIn)
Definition: TGCHighPtBoard.h:49
LVL1TGCTrigger::TGCHighPtBoard::m_decoderInTSB
TGCSlaveBoardOut * m_decoderInTSB[NumberOfChip][NDecoderInTSB]
Definition: TGCHighPtBoard.h:97
LVL1TGCTrigger::TGCHighPtBoard::loadLowPtOutput
void loadLowPtOutput(int chip, int block, TGCSlaveBoardOut *dataDSB)
Definition: TGCHighPtBoard.cxx:206
LVL1TGCTrigger::TGCHighPtBoard::createHighPtChipOut
void createHighPtChipOut()
Definition: TGCHighPtBoard.cxx:393
LVL1TGCTrigger::TGCHighPtBoard::m_nChOfDSBOut
int m_nChOfDSBOut
Definition: TGCHighPtBoard.h:111
LVL1TGCTrigger::TGCHighPtBoard::TGCHighPtBoard
TGCHighPtBoard()
Definition: TGCHighPtBoard.cxx:14
LVL1TGCTrigger::TGCHighPtBoard::m_highPtChipOut
TGCHighPtChipOut * m_highPtChipOut
Definition: TGCHighPtBoard.h:87
LVL1TGCTrigger::TGCRegionType::FORWARD
@ FORWARD
LVL1TGCTrigger::ChipB
@ ChipB
Definition: TGCHighPtBoard.h:26
LVL1TGCTrigger::TGCHighPtBoard::getType
int getType() const
Definition: TGCHighPtBoard.h:130
LVL1TGCTrigger::TGCHighPtBoard::m_nChOfDSBHit
int m_nChOfDSBHit
Definition: TGCHighPtBoard.h:112
LVL1TGCTrigger::TGCHighPtBoard::setId
void setId(int idIn)
Definition: TGCHighPtBoard.h:118
LVL1TGCTrigger::TGCHighPtBoard::decodeSlaveBoardOut
virtual void decodeSlaveBoardOut(int chip, TGCHitPattern *tHit, TGCHitPattern *dHit)=0
LVL1TGCTrigger::TGCHighPtBoard::setTSB
void setTSB(int connector, TGCSlaveBoard *SBIn)
Definition: TGCHighPtBoard.h:144
TGCSlaveBoard.h
LVL1TGCTrigger::TGCHighPtBoard::m_nChInTSBRegion
int m_nChInTSBRegion
Definition: TGCHighPtBoard.h:114
TRT::Hit::side
@ side
Definition: HitInfo.h:83
LVL1TGCTrigger::TGCSlaveBoard
Definition: TGCSlaveBoard.h:22
LVL1TGCTrigger::NumberOfChip
const int NumberOfChip
Definition: TGCHighPtBoard.h:20
LVL1TGCTrigger::PtLow
const int PtLow
Definition: TGCHighPtBoard.h:16
LVL1TGCTrigger::TGCHighPtBoard::m_adjacentHPB
TGCHighPtBoard * m_adjacentHPB[NumberOfAdjacentHPB]
Definition: TGCHighPtBoard.h:96
LVL1TGCTrigger::TGCHighPtBoard::m_priorSign
int m_priorSign
Definition: TGCHighPtBoard.h:106
LVL1TGCTrigger::TGCHighPtBoard::setRegion
void setRegion(const TGCRegionType regionIn)
Definition: TGCHighPtBoard.h:51
LVL1TGCTrigger::TGCHighPtBoard::s_NumberOfTSBOut
static constexpr int s_NumberOfTSBOut
Definition: TGCHighPtBoard.h:36
LVL1TGCTrigger::TGCHighPtBoard::m_nChOfTSBHit
int m_nChOfTSBHit
Definition: TGCHighPtBoard.h:113
LVL1TGCTrigger::TGCHighPtBoard::m_idSectorLogic
int m_idSectorLogic
Definition: TGCHighPtBoard.h:102
LVL1TGCTrigger::TGCHighPtChipOut
Definition: TGCHighPtChipOut.h:16
LVL1TGCTrigger::TGCHighPtBoard::createHighPtBoardOut
void createHighPtBoardOut()
Definition: TGCHighPtBoard.cxx:400
LVL1TGCTrigger::TGCHighPtBoard::setDSB
void setDSB(int connector, TGCSlaveBoard *SBIn)
Definition: TGCHighPtBoard.h:136
LVL1TGCTrigger::TGCHighPtBoard::m_decoderInDSB
TGCSlaveBoardOut * m_decoderInDSB[NumberOfChip][NDecoderInDSB]
Definition: TGCHighPtBoard.h:98
LVL1TGCTrigger::TGCHighPtBoard::trackSelector
void trackSelector(int chip, int ptIn)
Definition: TGCHighPtBoard.cxx:230
LVL1TGCTrigger::TGCHighPtBoard::m_maxNumberOfHPBData
int m_maxNumberOfHPBData
Definition: TGCHighPtBoard.h:107
LVL1TGCTrigger::TGCHighPtBoard::m_region
TGCRegionType m_region
Definition: TGCHighPtBoard.h:104
LVL1TGCTrigger::TGCHighPtBoard::m_bid
int m_bid
Definition: TGCHighPtBoard.h:101
LVL1TGCTrigger::TGCHighPtBoard::s_NumberOfDSBOut
static constexpr int s_NumberOfDSBOut
Definition: TGCHighPtBoard.h:37
LVL1TGCTrigger::NDecoderInTSB
const int NDecoderInTSB
Definition: TGCHighPtBoard.h:22
LVL1TGCTrigger::TGCHighPtBoard::clearDecoderIn
virtual void clearDecoderIn()=0
LVL1TGCTrigger::TGCSlaveBoardOut
Definition: TGCSlaveBoardOut.h:20
LVL1TGCTrigger::TGCHighPtBoardOut
Definition: TGCHighPtBoardOut.h:26
LVL1TGCTrigger
Definition: LVL1TGCTrigger.cxx:47
LVL1TGCTrigger::TGCHitPattern
Definition: TGCHitPattern.h:11
LVL1TGCTrigger::operator++
TGCHBChip operator++(TGCHBChip &rs, int)
Definition: TGCHighPtBoard.h:28
LVL1TGCTrigger::TotalNumTGCHBChip
@ TotalNumTGCHBChip
Definition: TGCHighPtBoard.h:26
LVL1TGCTrigger::TGCHighPtBoard::clockIn
void clockIn(int bidIn)
Definition: TGCHighPtBoard.cxx:77
LVL1TGCTrigger::TGCHighPtBoard::eraseHighPtOutput
void eraseHighPtOutput()
Definition: TGCHighPtBoard.cxx:154
LVL1TGCTrigger::TGCHighPtBoard::showResult
void showResult() const
Definition: TGCHighPtBoard.cxx:415
LVL1TGCTrigger::TGCHighPtBoard::operator=
TGCHighPtBoard & operator=(const TGCHighPtBoard &right)=delete
LVL1TGCTrigger::TGCHighPtBoard::doCoincidenceMatrix
virtual void doCoincidenceMatrix(int chip, int block, const TGCHitPattern *tHit, const TGCHitPattern *dHit)=0
LVL1TGCTrigger::TGCHighPtBoard::eraseLowPtOutput
void eraseLowPtOutput()
Definition: TGCHighPtBoard.cxx:162
LVL1TGCTrigger::TGCHighPtBoard::getRegion
TGCRegionType getRegion() const
Definition: TGCHighPtBoard.h:50
LVL1TGCTrigger::NumberOfAdjacentHPB
const int NumberOfAdjacentHPB
Definition: TGCHighPtBoard.h:19
LVL1TGCTrigger::TGCHighPtBoard::m_maxDevOred
int m_maxDevOred
Definition: TGCHighPtBoard.h:109
LVL1TGCTrigger::TGCHighPtBoard::m_lowPtBoardOut
TGCHighPtBoardOut * m_lowPtBoardOut
Definition: TGCHighPtBoard.h:90
LVL1TGCTrigger::TGCHighPtBoard
Definition: TGCHighPtBoard.h:34
LVL1TGCTrigger::TGCRegionType
TGCRegionType
Definition: TGCNumbering.h:49
LVL1TGCTrigger::TGCHighPtBoard::getId
int getId() const
Definition: TGCHighPtBoard.h:124
LVL1TGCTrigger::TGCHighPtBoard::m_DSB
TGCSlaveBoard * m_DSB[NumberOfChip][s_NumberOfDSBOut]
Definition: TGCHighPtBoard.h:92
LVL1TGCTrigger::TGCHighPtBoard::setDecoderIn
virtual void setDecoderIn()=0
LVL1TGCTrigger::NBlockOfDSBChannel
const int NBlockOfDSBChannel
Definition: TGCHighPtBoard.h:21
LVL1TGCTrigger::ChipA
@ ChipA
Definition: TGCHighPtBoard.h:26
LVL1TGCTrigger::TGCHighPtBoard::TGCHighPtBoard
TGCHighPtBoard(const TGCHighPtBoard &right)=delete
LVL1TGCTrigger::TGCHighPtBoard::m_TSB
TGCSlaveBoard * m_TSB[NumberOfChip][s_NumberOfTSBOut]
Definition: TGCHighPtBoard.h:93
LVL1TGCTrigger::TGCHighPtBoard::getTSBOut
TGCSlaveBoardOut * getTSBOut(int chip, int port)
Definition: TGCHighPtBoard.cxx:225
LVL1TGCTrigger::TGCHighPtBoard::m_id
int m_id
Definition: TGCHighPtBoard.h:100
LVL1TGCTrigger::TGCHighPtBoard::getOutput
TGCHighPtChipOut * getOutput()
Definition: TGCHighPtBoard.cxx:144
LVL1TGCTrigger::TGCHighPtBoard::m_TSBOut
TGCSlaveBoardOut * m_TSBOut[NumberOfChip][s_NumberOfTSBOut]
Definition: TGCHighPtBoard.h:95
LVL1TGCTrigger::TGCHighPtBoard::createLowPtBoardOut
void createLowPtBoardOut()
Definition: TGCHighPtBoard.cxx:407
LVL1TGCTrigger::TGCHighPtBoard::highLowSelector
virtual void highLowSelector(int chip)
Definition: TGCHighPtBoard.cxx:274
LVL1TGCTrigger::TGCHBChip
TGCHBChip
Definition: TGCHighPtBoard.h:26
LVL1TGCTrigger::TGCHighPtBoard::m_highPtBoardOut
TGCHighPtBoardOut * m_highPtBoardOut
Definition: TGCHighPtBoard.h:89
LVL1TGCTrigger::TGCHighPtBoard::m_maxDev
int m_maxDev
Definition: TGCHighPtBoard.h:108
LVL1TGCTrigger::HBChipUnit
@ HBChipUnit
Definition: TGCHighPtBoard.h:26