ATLAS Offline Software
Loading...
Searching...
No Matches
TGCSector.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TGCSector_h
6#define TGCSector_h
7
8
10#include "TrigT1TGC/TGCTMDB.h"
11#include "TrigT1TGC/TGCNSW.h"
12#include "TrigT1TGC/TGCBIS78.h"
13#include <memory>
14
15namespace LVL1TGCTrigger {
16class TGCArguments;
23class TGCASDOut;
24class TGCPatchPanel;
25class TGCSlaveBoard;
26class TGCHighPtBoard;
27class TGCSectorLogic;
28
29
31{
32 public:
37
38 public:
40 int idIn,
42 TGCForwardBackwardType forwardBackward,
43 const TGCDatabaseManager* db,
44 std::shared_ptr<const LVL1TGC::TGCTMDB> tmdb,
45 std::shared_ptr<const LVL1TGC::TGCNSW> nsw,
46 std::shared_ptr<const LVL1TGC::TGCBIS78> bis78);
47
48 TGCSector();
49
50 private:
51 // copy constructor and assignement operator are hidden.
52 TGCSector(const TGCSector& right) = delete;
53 TGCSector& operator = (const TGCSector& right) = delete;
54
55 public:
56 virtual ~TGCSector();
57
58 bool hasHit() const;
59 void clearNumberOfHit();
60 int distributeSignal(const TGCASDOut* asdOut);
61
62 TGCPatchPanel* getPP(int type, int index) const;
63 TGCSlaveBoard* getSB(int type, int index) const;
64 TGCHighPtBoard* getHPB(int type, int index) const;
65 TGCSectorLogic* getSL() { return m_SL; }
66
67 unsigned int getNumberOfPP(int type) const;
68 unsigned int getNumberOfSB(int type) const;
69 unsigned int getNumberOfHPB(int type) const;
70
72 int getId() const;
73 void dumpModule();
74
76 int getOctantId() const { return m_octantId; }
77 int getModuleId() const { return m_moduleId; }
78
80 const TGCArguments* tgcArgs() const { return m_tgcArgs; }
81
82private:
83 std::shared_ptr<const LVL1TGC::TGCTMDB> getTMDB() const { return m_TMDB; }
84 std::shared_ptr<const LVL1TGC::TGCNSW> getNSW() const{ return m_NSW; }
85 std::shared_ptr<const LVL1TGC::TGCBIS78> getBIS78() const{ return m_BIS78; }
86
87 int getPatchPanelType(TGCSignalType signal, int layer) const;
88
89
90 void setModule(const TGCConnectionPPToSL* connection);
91 void connectPPToSB(const TGCConnectionPPToSB* connection);
92 void connectSBToHPB(const TGCConnectionSBToHPB* connection);
93 void connectHPBToSL(const TGCConnectionHPBToSL* connection);
94 void connectAdjacentPP();
95 void connectAdjacentHPB();
96
101
102 private:
103 int m_id{0};
109
112
113 std::vector<TGCPatchPanel*> m_PP[NumberOfPatchPanelType];
114 std::vector<TGCSlaveBoard*> m_SB[NumberOfSlaveBoardType];
115 std::vector<TGCHighPtBoard*> m_HPB[NumberOfHighPtBoardType];
116
118 std::shared_ptr<const LVL1TGC::TGCTMDB> m_TMDB;
119 std::shared_ptr<const LVL1TGC::TGCNSW> m_NSW;
120 std::shared_ptr<const LVL1TGC::TGCBIS78> m_BIS78;
121
124};
125
126inline
127 bool TGCSector::hasHit() const
128{
129 return (m_numberOfHit>0);
130}
131inline
134inline
136{
137 if ((type<0) || (index<0)) return 0;
138 return m_PP[type].at(index);
139}
140inline
142{
143 if ((type<0) || (index<0)) return 0;
144 return m_SB[type].at(index);
145}
146inline
148{
149 if ((type<0) || (index<0)) return 0;
150 return m_HPB[type].at(index);
151}
152inline
153unsigned int TGCSector::getNumberOfPP(int type) const
154{
155 if (type<0) return -1;
156 return m_PP[type].size();
157}
158inline
159unsigned int TGCSector::getNumberOfSB(int type) const
160{ if (type<0) return -1;
161 return m_SB[type].size();
162}
163inline
164unsigned int TGCSector::getNumberOfHPB(int type) const
165{ if (type<0) return -1;
166 return m_HPB[type].size();
167}
168inline
171
172inline
174{ return m_id;}
175
180
181} //end of namespace bracket
182
183#endif
static Double_t rs
std::vector< TGCHighPtBoard * > m_HPB[NumberOfHighPtBoardType]
Definition TGCSector.h:115
void connectPPToSB(const TGCConnectionPPToSB *connection)
std::shared_ptr< const LVL1TGC::TGCNSW > getNSW() const
Definition TGCSector.h:84
unsigned int getNumberOfSB(int type) const
Definition TGCSector.h:159
LVL1TGC::TGCSide m_sideId
Definition TGCSector.h:105
std::shared_ptr< const LVL1TGC::TGCBIS78 > m_BIS78
Definition TGCSector.h:120
TGCArguments * m_tgcArgs
Definition TGCSector.h:122
TGCSector(TGCArguments *, int idIn, TGCRegionType type, TGCForwardBackwardType forwardBackward, const TGCDatabaseManager *db, std::shared_ptr< const LVL1TGC::TGCTMDB > tmdb, std::shared_ptr< const LVL1TGC::TGCNSW > nsw, std::shared_ptr< const LVL1TGC::TGCBIS78 > bis78)
TGCHighPtBoard * getHPB(int type, int index) const
Definition TGCSector.h:147
TGCArguments * tgcArgs()
Definition TGCSector.h:79
void setModule(const TGCConnectionPPToSL *connection)
std::vector< TGCPatchPanel * > m_PP[NumberOfPatchPanelType]
Definition TGCSector.h:113
TGCRegionType getRegionType() const
Definition TGCSector.h:169
TGCSectorLogic * getSL()
Definition TGCSector.h:65
unsigned int getNumberOfHPB(int type) const
Definition TGCSector.h:164
TGCSectorLogic * m_SL
Definition TGCSector.h:117
TGCRegionType m_regionType
Definition TGCSector.h:104
const TGCArguments * tgcArgs() const
Definition TGCSector.h:80
std::shared_ptr< const LVL1TGC::TGCTMDB > getTMDB() const
Definition TGCSector.h:83
std::shared_ptr< const LVL1TGC::TGCTMDB > m_TMDB
Definition TGCSector.h:118
void connectSBToHPB(const TGCConnectionSBToHPB *connection)
const TGCDatabaseManager * m_dbMgr
Definition TGCSector.h:123
TGCSector(const TGCSector &right)=delete
std::vector< TGCSlaveBoard * > m_SB[NumberOfSlaveBoardType]
Definition TGCSector.h:114
TGCSlaveBoard * getSB(int type, int index) const
Definition TGCSector.h:141
TGCPatchPanel * getPP(int type, int index) const
Definition TGCSector.h:135
int distributeSignal(const TGCASDOut *asdOut)
Definition TGCSector.cxx:34
LVL1TGC::TGCSide getSideId() const
Definition TGCSector.h:75
TGCForwardBackwardType m_forwardBackward
Definition TGCSector.h:110
TGCSector & operator=(const TGCSector &right)=delete
const TGCConnectionASDToPP * m_ASDToPP[NumberOfPatchPanelType]
Definition TGCSector.h:111
std::shared_ptr< const LVL1TGC::TGCNSW > m_NSW
Definition TGCSector.h:119
void connectHPBToSL(const TGCConnectionHPBToSL *connection)
int getPatchPanelType(TGCSignalType signal, int layer) const
Definition TGCSector.cxx:74
std::shared_ptr< const LVL1TGC::TGCBIS78 > getBIS78() const
Definition TGCSector.h:85
unsigned int getNumberOfPP(int type) const
Definition TGCSector.h:153
void startPatchPanel(TGCSector *sector, TGCDatabaseManager *db=0)
void startHighPtBoard(TGCSector *sector)
void startSectorLogic(TGCSector *sector)
void startSlaveBoard(TGCSector *sector)
TGCHBChip operator++(TGCHBChip &rs, int)
TGCSide
The sides of TGC (A- or C-side)
Definition index.py:1