ATLAS Offline Software
TGCSector.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 TGCSector_h
6 #define TGCSector_h
7 
11 
12 #include "TrigT1TGC/TGCTMDB.h"
13 #include "TrigT1TGC/TGCNSW.h"
14 #include "TrigT1TGC/TGCBIS78.h"
15 
16 namespace LVL1TGCTrigger {
17 
18 class TGCDatabaseManager;
19 class TGCConnectionPPToSL;
20 class TGCConnectionHPBToSL;
21 class TGCConnectionPPToSB;
22 class TGCConnectionASDToPP;
23 class TGCConnectionSBToHPB;
24 class TGCASDOut;
25 class TGCPatchPanel;
26 class TGCSlaveBoard;
27 class TGCHighPtBoard;
28 class TGCSectorLogic;
29 
30 
31 class TGCSector
32 {
33  public:
38 
39  public:
41  int idIn,
43  TGCForwardBackwardType forwardBackward,
44  const TGCDatabaseManager* db,
45  std::shared_ptr<const LVL1TGC::TGCTMDB> tmdb,
46  std::shared_ptr<const LVL1TGC::TGCNSW> nsw,
47  std::shared_ptr<const LVL1TGC::TGCBIS78> bis78);
48 
49  TGCSector();
50 
51  private:
52  // copy constructor and assignement operator are hidden.
53  TGCSector(const TGCSector& right) = delete;
54  TGCSector& operator = (const TGCSector& right) = delete;
55 
56  public:
57  virtual ~TGCSector();
58 
59  bool hasHit() const;
60  void clearNumberOfHit();
61  int distributeSignal(const TGCASDOut* asdOut);
62 
63  TGCPatchPanel* getPP(int type, int index) const;
64  TGCSlaveBoard* getSB(int type, int index) const;
65  TGCHighPtBoard* getHPB(int type, int index) const;
66  TGCSectorLogic* getSL() { return m_SL; }
67 
68  unsigned int getNumberOfPP(int type) const;
69  unsigned int getNumberOfSB(int type) const;
70  unsigned int getNumberOfHPB(int type) const;
71 
73  int getId() const;
74  void dumpModule();
75 
76  LVL1TGC::TGCSide getSideId() const { return m_sideId; }
77  int getOctantId() const { return m_octantId; }
78  int getModuleId() const { return m_moduleId; }
79 
81  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
82 
83 private:
84  std::shared_ptr<const LVL1TGC::TGCTMDB> getTMDB() const { return m_TMDB; }
85  std::shared_ptr<const LVL1TGC::TGCNSW> getNSW() const{ return m_NSW; }
86  std::shared_ptr<const LVL1TGC::TGCBIS78> getBIS78() const{ return m_BIS78; }
87 
89 
90 
91  void setModule(const TGCConnectionPPToSL* connection);
92  void connectPPToSB(const TGCConnectionPPToSB* connection);
93  void connectSBToHPB(const TGCConnectionSBToHPB* connection);
94  void connectHPBToSL(const TGCConnectionHPBToSL* connection);
95  void connectAdjacentPP();
96  void connectAdjacentHPB();
97 
102 
103  private:
104  int m_id{0};
110 
113 
114  std::vector<TGCPatchPanel*> m_PP[NumberOfPatchPanelType];
115  std::vector<TGCSlaveBoard*> m_SB[NumberOfSlaveBoardType];
116  std::vector<TGCHighPtBoard*> m_HPB[NumberOfHighPtBoardType];
117 
119  std::shared_ptr<const LVL1TGC::TGCTMDB> m_TMDB;
120  std::shared_ptr<const LVL1TGC::TGCNSW> m_NSW;
121  std::shared_ptr<const LVL1TGC::TGCBIS78> m_BIS78;
122 
125 };
126 
127 inline
128  bool TGCSector::hasHit() const
129 {
130  return (m_numberOfHit>0);
131 }
132 inline
134 { m_numberOfHit = 0;}
135 inline
137 {
138  if ((type<0) || (index<0)) return 0;
139  return m_PP[type].at(index);
140 }
141 inline
143 {
144  if ((type<0) || (index<0)) return 0;
145  return m_SB[type].at(index);
146 }
147 inline
149 {
150  if ((type<0) || (index<0)) return 0;
151  return m_HPB[type].at(index);
152 }
153 inline
154 unsigned int TGCSector::getNumberOfPP(int type) const
155 {
156  if (type<0) return -1;
157  return m_PP[type].size();
158 }
159 inline
160 unsigned int TGCSector::getNumberOfSB(int type) const
161 { if (type<0) return -1;
162  return m_SB[type].size();
163 }
164 inline
165 unsigned int TGCSector::getNumberOfHPB(int type) const
166 { if (type<0) return -1;
167  return m_HPB[type].size();
168 }
169 inline
171 { return m_regionType;}
172 
173 inline
174 int TGCSector::getId() const
175 { return m_id;}
176 
178 {
179  return rs = static_cast<TGCSector::TGCPatchPanelType>(rs + 1);
180 }
181 
182 } //end of namespace bracket
183 
184 #endif
LVL1TGCTrigger::TGCSector
Definition: TGCSector.h:32
LVL1TGCTrigger::TGCSector::STPP
@ STPP
Definition: TGCSector.h:36
LVL1TGCTrigger::TGCSector::m_SL
TGCSectorLogic * m_SL
Definition: TGCSector.h:118
LVL1TGCTrigger::NumberOfSlaveBoardType
@ NumberOfSlaveBoardType
Definition: TGCNumbering.h:57
LVL1TGCTrigger::TGCSector::NOPP
@ NOPP
Definition: TGCSector.h:35
LVL1TGCTrigger::TGCSector::getNumberOfHPB
unsigned int getNumberOfHPB(int type) const
Definition: TGCSector.h:165
index
Definition: index.py:1
LVL1TGCTrigger::TGCSector::tgcArgs
const TGCArguments * tgcArgs() const
Definition: TGCSector.h:81
LVL1TGCTrigger::TGCTimingManager::startSectorLogic
void startSectorLogic(TGCSector *sector)
Definition: TGCTimingManager.cxx:87
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:43
LVL1TGCTrigger::TGCSector::getId
int getId() const
Definition: TGCSector.h:174
LVL1TGCTrigger::TGCSector::getModuleId
int getModuleId() const
Definition: TGCSector.h:78
LVL1TGCTrigger::TGCSector::WTPP
@ WTPP
Definition: TGCSector.h:36
LVL1TGCTrigger::TGCSector::getPatchPanelType
int getPatchPanelType(TGCSignalType signal, int layer) const
Definition: TGCSector.cxx:71
RunTileCalibRec.tmdb
tmdb
Definition: RunTileCalibRec.py:234
LVL1TGCTrigger::TGCConnectionPPToSB
Definition: TGCConnectionPPToSB.h:15
TGCNSW.h
LVL1TGCTrigger::TGCSector::TGCHighPtBoardType
TGCHighPtBoardType
Definition: TGCSector.h:34
LVL1TGCTrigger::TGCTimingManager::startSlaveBoard
void startSlaveBoard(TGCSector *sector)
Definition: TGCTimingManager.cxx:54
LVL1TGCTrigger::TGCSector::connectPPToSB
void connectPPToSB(const TGCConnectionPPToSB *connection)
Definition: TGCSector.cxx:253
LVL1TGCTrigger::TGCSector::m_dbMgr
const TGCDatabaseManager * m_dbMgr
Definition: TGCSector.h:124
LVL1TGCTrigger::TGCSector::clearNumberOfHit
void clearNumberOfHit()
Definition: TGCSector.h:133
LVL1TGCTrigger::TGCSector::getBIS78
std::shared_ptr< const LVL1TGC::TGCBIS78 > getBIS78() const
Definition: TGCSector.h:86
LVL1TGCTrigger::TGCSector::getSB
TGCSlaveBoard * getSB(int type, int index) const
Definition: TGCSector.h:142
LVL1TGCTrigger::TGCForwardBackwardType
TGCForwardBackwardType
Definition: TGCNumbering.h:59
LVL1TGCTrigger::TGCSector::getTMDB
std::shared_ptr< const LVL1TGC::TGCTMDB > getTMDB() const
Definition: TGCSector.h:84
LVL1TGCTrigger::TGCSector::m_forwardBackward
TGCForwardBackwardType m_forwardBackward
Definition: TGCSector.h:111
LVL1TGCTrigger::TGCSector::operator=
TGCSector & operator=(const TGCSector &right)=delete
LVL1TGCTrigger::TGCConnectionHPBToSL
Definition: TGCConnectionHPBToSL.h:15
LVL1TGCTrigger::TGCSector::m_TMDB
std::shared_ptr< const LVL1TGC::TGCTMDB > m_TMDB
Definition: TGCSector.h:119
LVL1TGCTrigger::TGCConnectionPPToSL
Definition: TGCConnectionPPToSL.h:16
LVL1TGCTrigger::TGCSector::m_octantId
int m_octantId
Definition: TGCSector.h:108
LVL1TGCTrigger::TGCSector::m_id
int m_id
Definition: TGCSector.h:104
LVL1TGCTrigger::TGCSector::getRegionType
TGCRegionType getRegionType() const
Definition: TGCSector.h:170
LVL1TGCTrigger::TGCSector::TGCSector
TGCSector()
Definition: TGCSector.cxx:87
LVL1TGCTrigger::TGCSector::WDPP
@ WDPP
Definition: TGCSector.h:36
LVL1TGCTrigger::TGCTimingManager::startHighPtBoard
void startHighPtBoard(TGCSector *sector)
Definition: TGCTimingManager.cxx:72
LVL1TGCTrigger::TGCSlaveBoard
Definition: TGCSlaveBoard.h:22
LVL1TGCTrigger::TGCSector::connectHPBToSL
void connectHPBToSL(const TGCConnectionHPBToSL *connection)
Definition: TGCSector.cxx:343
Cut::signal
@ signal
Definition: SUSYToolsAlg.cxx:67
LVL1TGCTrigger::TGCSector::SIPP
@ SIPP
Definition: TGCSector.h:36
LVL1TGCTrigger::TGCSector::getSideId
LVL1TGC::TGCSide getSideId() const
Definition: TGCSector.h:76
LVL1TGCTrigger::TGCSector::getNSW
std::shared_ptr< const LVL1TGC::TGCNSW > getNSW() const
Definition: TGCSector.h:85
LVL1TGCTrigger::TGCSector::tgcArgs
TGCArguments * tgcArgs()
Definition: TGCSector.h:80
LVL1TGCTrigger::TGCSector::getSL
TGCSectorLogic * getSL()
Definition: TGCSector.h:66
LVL1TGCTrigger::TGCSector::dumpModule
void dumpModule()
Definition: TGCSector.cxx:403
LVL1TGCTrigger::TGCSector::m_HPB
std::vector< TGCHighPtBoard * > m_HPB[NumberOfHighPtBoardType]
Definition: TGCSector.h:116
TGCTimingManager.h
LVL1TGCTrigger::TGCSector::m_sideId
LVL1TGC::TGCSide m_sideId
Definition: TGCSector.h:106
LVL1TGCTrigger::TGCSector::m_PP
std::vector< TGCPatchPanel * > m_PP[NumberOfPatchPanelType]
Definition: TGCSector.h:114
LVL1TGCTrigger::TGCASDOut
Definition: TGCASDOut.h:12
LVL1TGCTrigger::TGCSector::m_moduleId
int m_moduleId
Definition: TGCSector.h:109
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LVL1TGCTrigger::TGCSector::setModule
void setModule(const TGCConnectionPPToSL *connection)
Definition: TGCSector.cxx:163
LVL1TGCTrigger::TGCSector::getNumberOfPP
unsigned int getNumberOfPP(int type) const
Definition: TGCSector.h:154
LVL1TGCTrigger::TGCSector::getPP
TGCPatchPanel * getPP(int type, int index) const
Definition: TGCSector.h:136
TGCBIS78.h
TGCReadoutIndex.h
LVL1TGCTrigger
Definition: LVL1TGCTrigger.cxx:47
TGCTMDB.h
LVL1TGCTrigger::TGCSector::WIPP
@ WIPP
Definition: TGCSector.h:36
LVL1TGCTrigger::TGCConnectionSBToHPB
Definition: TGCConnectionSBToHPB.h:14
LVL1TGCTrigger::TGCTimingManager::startPatchPanel
void startPatchPanel(TGCSector *sector, TGCDatabaseManager *db=0)
Definition: TGCTimingManager.cxx:33
LVL1TGCTrigger::operator++
TGCHBChip operator++(TGCHBChip &rs, int)
Definition: TGCHighPtBoard.h:28
LVL1TGCTrigger::TGCDatabaseManager
Definition: TGCDatabaseManager.h:39
LVL1TGCTrigger::TGCSector::connectSBToHPB
void connectSBToHPB(const TGCConnectionSBToHPB *connection)
Definition: TGCSector.cxx:321
LVL1TGCTrigger::TGCSector::SDPP
@ SDPP
Definition: TGCSector.h:36
LVL1TGCTrigger::TGCSector::~TGCSector
virtual ~TGCSector()
Definition: TGCSector.cxx:376
LVL1TGCTrigger::TGCSector::m_ASDToPP
const TGCConnectionASDToPP * m_ASDToPP[NumberOfPatchPanelType]
Definition: TGCSector.h:112
LVL1TGCTrigger::TGCPatchPanel
Definition: TGCPatchPanel.h:38
LVL1TGCTrigger::TGCArguments
Definition: TGCArguments.h:12
LVL1TGCTrigger::TGCSector::m_SB
std::vector< TGCSlaveBoard * > m_SB[NumberOfSlaveBoardType]
Definition: TGCSector.h:115
LVL1TGC::ASIDE
@ ASIDE
Definition: TGCNumbering.h:14
LVL1TGCTrigger::TGCSectorLogic
Definition: TGCSectorLogic.h:42
LVL1TGCTrigger::TGCSector::WHPB
@ WHPB
Definition: TGCSector.h:34
LVL1TGCTrigger::TGCSignalType
TGCSignalType
Definition: TGCNumbering.h:51
LVL1TGCTrigger::TGCSector::SHPB
@ SHPB
Definition: TGCSector.h:34
LVL1TGCTrigger::TGCSector::m_regionType
TGCRegionType m_regionType
Definition: TGCSector.h:105
LVL1TGCTrigger::TGCHighPtBoard
Definition: TGCHighPtBoard.h:34
LVL1TGCTrigger::TGCRegionType
TGCRegionType
Definition: TGCNumbering.h:49
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1TGCTrigger::TGCSector::connectAdjacentPP
void connectAdjacentPP()
Definition: TGCSector.cxx:292
LVL1TGCTrigger::TGCSector::getOctantId
int getOctantId() const
Definition: TGCSector.h:77
LVL1TGCTrigger::TGCSector::hasHit
bool hasHit() const
Definition: TGCSector.h:128
LVL1TGCTrigger::TGCSector::getNumberOfSB
unsigned int getNumberOfSB(int type) const
Definition: TGCSector.h:160
LVL1TGC::TGCSide
TGCSide
The sides of TGC (A- or C-side)
Definition: TGCNumbering.h:13
LVL1TGCTrigger::TGCSector::distributeSignal
int distributeSignal(const TGCASDOut *asdOut)
Definition: TGCSector.cxx:31
TGCArguments.h
LVL1TGCTrigger::TGCSector::TGCSector
TGCSector(const TGCSector &right)=delete
LVL1TGCTrigger::TGCSector::NumberOfHighPtBoardType
@ NumberOfHighPtBoardType
Definition: TGCSector.h:34
LVL1TGCTrigger::TGCSector::connectAdjacentHPB
void connectAdjacentHPB()
Definition: TGCSector.cxx:356
LVL1TGCTrigger::TGCSector::m_NSW
std::shared_ptr< const LVL1TGC::TGCNSW > m_NSW
Definition: TGCSector.h:120
LVL1TGCTrigger::TGCSector::m_BIS78
std::shared_ptr< const LVL1TGC::TGCBIS78 > m_BIS78
Definition: TGCSector.h:121
LVL1TGCTrigger::TGCSector::m_tgcArgs
TGCArguments * m_tgcArgs
Definition: TGCSector.h:123
LVL1TGCTrigger::TGCConnectionASDToPP
Definition: TGCConnectionASDToPP.h:13
LVL1TGCTrigger::TGCSector::getHPB
TGCHighPtBoard * getHPB(int type, int index) const
Definition: TGCSector.h:148
LVL1TGCTrigger::TGCSector::NumberOfPatchPanelType
@ NumberOfPatchPanelType
Definition: TGCSector.h:37
LVL1TGCTrigger::TGCSector::m_numberOfHit
int m_numberOfHit
Definition: TGCSector.h:107
LVL1TGCTrigger::TGCSector::TGCPatchPanelType
TGCPatchPanelType
Definition: TGCSector.h:35