ATLAS Offline Software
TGCSectorLogic.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 TGGSectorLogic_hh
6 #define TGGSectorLogic_hh
7 
15 
17 
20 
21 namespace LVL1TGC {
22 class TGCTileMuCoincidenceLUT;
23 class TGCGoodMF;
24 class TGCNSW;
25 class TGCBIS78;
26 class TGCBIS78CoincidenceMap;
27 class TGCEIFICoincidenceMap;
28 }
29 
30 namespace LVL1TGCTrigger {
31 
32 class TGCDatabaseManager;
33 class TGCHighPtBoard;
34 class TGCHighPtChipOut;
35 class TGCTMDB;
36 class TGCNSWCoincidenceMap;
37 class TGCRPhiCoincidenceOut;
38 class TGCTrackSelectorOut;
39 
40 
42 {
43  public:
45  TGCRegionType regionIn, int id);
46  virtual ~TGCSectorLogic();
47 
48  TGCSectorLogic(const TGCSectorLogic& right);
49 
50  void getTrackSelectorOutput(std::shared_ptr<TGCTrackSelectorOut> &trackSelectorOut) const;
51 
52  int getTileMuonWord() const;
53  int getInnerStationWord() const;
54 
55  void clockIn(const SG::ReadCondHandleKey<TGCTriggerData>& readCondKey,
56  int bidIn, bool process=true);
57 
58  int getId() const;
59  int getModuleID() const;
60  int getOctantID() const;
61  int getSideID() const;
62  TGCRegionType getRegion() const { return m_region;};
63 
64  void setWireHighPtBoard(int port, TGCHighPtBoard* highPtBoard);
65  void setStripHighPtBoard(TGCHighPtBoard* highPtBoard);
66  int getNumberOfWireHighPtBoard() const;
67  void deleteHPBOut();
68 
70 
71  void setTMDB(std::shared_ptr<const LVL1TGC::TGCTMDB> tmdb);
72  void setNSW(std::shared_ptr<const LVL1TGC::TGCNSW> nsw);
73  void setBIS78(std::shared_ptr<const LVL1TGC::TGCBIS78> bis78);
74  void showResult();
75 
76  int getNumberOfSubSectorCluster() const;
77  int getNumberOfSubSector() const;
78 
79  void dec2bin(int dec, char* binstr, int length);
80 
81  int getBid() const {return m_bid;};
82 
83  void setInnerTrackletSlots(const TGCInnerTrackletSlot* innerTrackletSlots[]);
84 
86  const TGCArguments* tgcArgs() const { return m_tgcArgs; }
87 
88 protected:
90  void collectInput();
91 
93  int SSCId, TGCRPhiCoincidenceOut* coincidenceOut);
94 
95  void doInnerCoincidence(int SSCId, TGCRPhiCoincidenceOut* coincidenceOut);
96 
97  void doTGCNSWCoincidence(TGCRPhiCoincidenceOut* coincidenceOut);
98  bool doTGCBIS78Coincidence(TGCRPhiCoincidenceOut* coincidenceOut);
99  bool doTILECoincidence(TGCRPhiCoincidenceOut* coincidenceOut);
100  bool doTGCEICoincidence(TGCRPhiCoincidenceOut* coincidenceOut);
101  bool doTGCFICoincidence(TGCRPhiCoincidenceOut* coincidenceOut);
102 
103 private:
104  TGCSectorLogic& operator=(const TGCSectorLogic& right);
105 
106 private:
107  bool hitTileMu(const uint8_t& mask, const uint8_t& hit6, const uint8_t& hit56) const;
108 
109  int m_bid;
110 
111  int m_id;
117 
118  bool m_useEIFI{false};
119  bool m_useTileMu{false};
120  bool m_useGoodMF{false};
121  bool m_nswSide{false};
122 
124 
125  // Run-3 and Run-2 Coincidence LUTs and Window maps
128  std::shared_ptr<const LVL1TGC::TGCTileMuCoincidenceLUT> m_tileMuLUT;
129  std::shared_ptr<const LVL1TGC::TGCTMDB> m_pTMDB;
130  std::shared_ptr<const LVL1TGC::TGCNSW> m_nsw;
131  std::shared_ptr<const TGCNSWCoincidenceMap> m_mapNSW;
132  std::shared_ptr<const LVL1TGC::TGCBIS78> m_bis78;
133  std::shared_ptr<const LVL1TGC::TGCBIS78CoincidenceMap> m_mapBIS78;
134  std::shared_ptr<const LVL1TGC::TGCGoodMF> m_mapGoodMF;
135 
137  std::shared_ptr<TGCTrackSelectorOut> m_trackSelectorOut;
138 
141 
146 
147  // for inner trigger
150 };
151 
152 inline
154 {
155  return (m_region == TGCRegionType::FORWARD) ? 8 : LVL1TGC::kNMaxSSC;
156 }
157 
158 inline
160 {
161  return (m_region == TGCRegionType::FORWARD) ? 8 * LVL1TGC::kNRoiInSSC : LVL1TGC::kNumberOfEndcapRoI;
162 }
163 
164 inline
166 {
168 }
169 
170 
171 inline
173 {
174  return m_id;
175 }
176 
177 inline
179 {
180  return m_moduleId;
181 }
182 
183 
184 inline
186 {
187  return m_octantId;
188 }
189 
190 inline
192 {
193  return m_sideId;
194 }
195 
196 inline
198 {
199  return m_wordTileMuon;
200 }
201 
202 inline
204 {
205  return m_wordInnerStation;
206 }
207 
208 } //end of namespace bracket
209 
210 #endif
LVL1TGCTrigger::TGCSectorLogic::getTileMuonWord
int getTileMuonWord() const
Definition: TGCSectorLogic.h:197
LVL1TGCTrigger::TGCSectorLogic::tgcArgs
TGCArguments * tgcArgs()
Definition: TGCSectorLogic.h:85
LVL1TGCTrigger::TGCSectorLogic::m_innerTrackletSlots
const TGCInnerTrackletSlot * m_innerTrackletSlots[TGCInnerTrackletSlotHolder::NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR]
Definition: TGCSectorLogic.h:148
LVL1TGCTrigger::TGCSectorLogic::getRegion
TGCRegionType getRegion() const
Definition: TGCSectorLogic.h:62
TGCInnerTrackletSlotHolder.h
LVL1TGCTrigger::TGCRPhiCoincidenceMatrix
Definition: TGCRPhiCoincidenceMatrix.h:20
LVL1TGCTrigger::TGCSectorLogic::m_useTileMu
bool m_useTileMu
Definition: TGCSectorLogic.h:119
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
LVL1TGCTrigger::TGCSectorLogic::getOctantID
int getOctantID() const
Definition: TGCSectorLogic.h:185
LVL1TGCTrigger::TGCSectorLogic::m_mapNSW
std::shared_ptr< const TGCNSWCoincidenceMap > m_mapNSW
Definition: TGCSectorLogic.h:131
LVL1TGCTrigger::TGCSectorLogic::m_nsw
std::shared_ptr< const LVL1TGC::TGCNSW > m_nsw
Definition: TGCSectorLogic.h:130
TGCSSCControllerOut.h
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:43
LVL1TGCTrigger::TGCSectorLogic::m_trackSelectorOut
std::shared_ptr< TGCTrackSelectorOut > m_trackSelectorOut
Definition: TGCSectorLogic.h:137
LVL1TGCTrigger::TGCSectorLogic::m_wordInnerStation
int m_wordInnerStation
Definition: TGCSectorLogic.h:140
RunTileCalibRec.tmdb
tmdb
Definition: RunTileCalibRec.py:234
LVL1TGCTrigger::TGCSectorLogic::m_id
int m_id
Definition: TGCSectorLogic.h:111
LVL1TGCTrigger::TGCSectorLogic::m_NumberOfWireHighPtBoard
int m_NumberOfWireHighPtBoard
Definition: TGCSectorLogic.h:116
LVL1TGCTrigger::TGCSectorLogic::showResult
void showResult()
Definition: TGCSectorLogic.cxx:238
LVL1TGCTrigger::TGCSectorLogic::setInnerTrackletSlots
void setInnerTrackletSlots(const TGCInnerTrackletSlot *innerTrackletSlots[])
Definition: TGCSectorLogic.cxx:324
LVL1TGCTrigger::TGCSectorLogic::collectInput
void collectInput()
Definition: TGCSectorLogic.cxx:214
LVL1TGCTrigger::TGCSectorLogic::getNumberOfSubSector
int getNumberOfSubSector() const
Definition: TGCSectorLogic.h:159
LVL1TGCTrigger::TGCSectorLogic::setBIS78
void setBIS78(std::shared_ptr< const LVL1TGC::TGCBIS78 > bis78)
Definition: TGCSectorLogic.cxx:110
LVL1TGCTrigger::TGCSectorLogic::doInnerCoincidence
void doInnerCoincidence(const SG::ReadCondHandleKey< TGCTriggerData > &readCondKey, int SSCId, TGCRPhiCoincidenceOut *coincidenceOut)
LVL1TGCTrigger::TGCRegionType::FORWARD
@ FORWARD
LVL1TGCTrigger::TGCSectorLogic::operator=
TGCSectorLogic & operator=(const TGCSectorLogic &right)
Definition: TGCSectorLogic.cxx:280
LVL1TGCTrigger::TGCSectorLogic::m_bis78
std::shared_ptr< const LVL1TGC::TGCBIS78 > m_bis78
Definition: TGCSectorLogic.h:132
LVL1TGCTrigger::TGCSectorLogic::m_sideId
LVL1TGC::TGCSide m_sideId
Definition: TGCSectorLogic.h:112
LVL1TGC::TGCEIFICoincidenceMap
Definition: TGCEIFICoincidenceMap.h:23
LVL1TGCTrigger::TGCSectorLogic::setNSW
void setNSW(std::shared_ptr< const LVL1TGC::TGCNSW > nsw)
Definition: TGCSectorLogic.cxx:104
LVL1TGCTrigger::TGCSectorLogic::doTILECoincidence
bool doTILECoincidence(TGCRPhiCoincidenceOut *coincidenceOut)
Definition: TGCSectorLogic.cxx:408
LVL1TGCTrigger::TGCSectorLogic::m_SSCController
TGCSSCController m_SSCController
Definition: TGCSectorLogic.h:123
SUSY_SimplifiedModel_PostInclude.process
string process
Definition: SUSY_SimplifiedModel_PostInclude.py:42
LVL1TGCTrigger::TGCSectorLogic::getModuleID
int getModuleID() const
Definition: TGCSectorLogic.h:178
LVL1TGCTrigger::TGCSectorLogic::doTGCBIS78Coincidence
bool doTGCBIS78Coincidence(TGCRPhiCoincidenceOut *coincidenceOut)
Definition: TGCSectorLogic.cxx:397
ReadCondHandle.h
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
LVL1TGCTrigger::TGCSectorLogic::m_stripHighPtBoard
TGCHighPtBoard * m_stripHighPtBoard
Definition: TGCSectorLogic.h:144
LVL1TGCTrigger::TGCSectorLogic::TGCSectorLogic
TGCSectorLogic(TGCArguments *, const TGCDatabaseManager *db, TGCRegionType regionIn, int id)
Definition: TGCSectorLogic.cxx:31
LVL1TGCTrigger::TGCSectorLogic::m_matrix
TGCRPhiCoincidenceMatrix m_matrix
Definition: TGCSectorLogic.h:126
LVL1TGCTrigger::TGCSectorLogic::~TGCSectorLogic
virtual ~TGCSectorLogic()
Definition: TGCSectorLogic.cxx:95
LVL1TGCTrigger::TGCSectorLogic::m_bid
int m_bid
Definition: TGCSectorLogic.h:109
LVL1TGCTrigger::TGCSectorLogic::getSSCController
TGCSSCController * getSSCController()
Definition: TGCSectorLogic.h:69
LVL1TGCTrigger::TGCSectorLogic::m_sectorId
int m_sectorId
Definition: TGCSectorLogic.h:113
LVL1TGCTrigger::TGCSectorLogic::m_octantId
int m_octantId
Definition: TGCSectorLogic.h:114
TGCTrackSelector.h
LVL1TGCTrigger::TGCSectorLogic::m_nswSide
bool m_nswSide
Definition: TGCSectorLogic.h:121
LVL1TGCTrigger::TGCTrackSelector
Definition: TGCTrackSelector.h:15
LVL1TGCTrigger::TGCSectorLogic::setTMDB
void setTMDB(std::shared_ptr< const LVL1TGC::TGCTMDB > tmdb)
Definition: TGCSectorLogic.cxx:98
LVL1TGCTrigger::TGCSectorLogic::m_tileMuLUT
std::shared_ptr< const LVL1TGC::TGCTileMuCoincidenceLUT > m_tileMuLUT
Definition: TGCSectorLogic.h:128
LVL1TGCTrigger::TGCHighPtChipOut
Definition: TGCHighPtChipOut.h:16
LVL1TGCTrigger::TGCSectorLogic::setWireHighPtBoard
void setWireHighPtBoard(int port, TGCHighPtBoard *highPtBoard)
Definition: TGCSectorLogic.cxx:116
LVL1TGCTrigger::TGCSectorLogic::m_mapGoodMF
std::shared_ptr< const LVL1TGC::TGCGoodMF > m_mapGoodMF
Definition: TGCSectorLogic.h:134
LVL1TGCTrigger::TGCSectorLogic::m_wireHighPtBoard
TGCHighPtBoard * m_wireHighPtBoard[MaxNumberOfWireHighPtBoard]
Definition: TGCSectorLogic.h:142
LVL1TGCTrigger::TGCSectorLogic::hitTileMu
bool hitTileMu(const uint8_t &mask, const uint8_t &hit6, const uint8_t &hit56) const
Definition: TGCSectorLogic.cxx:467
LVL1TGC
Definition: BigWheelCoincidenceLUT.cxx:20
TGCReadoutIndex.h
LVL1TGCTrigger::TGCSectorLogic::MaxNumberOfWireHighPtBoard
@ MaxNumberOfWireHighPtBoard
Definition: TGCSectorLogic.h:89
LVL1TGCTrigger::TGCRPhiCoincidenceOut
Definition: TGCRPhiCoincidenceOut.h:11
LVL1TGCTrigger::TGCSectorLogic::doTGCEICoincidence
bool doTGCEICoincidence(TGCRPhiCoincidenceOut *coincidenceOut)
Definition: TGCSectorLogic.cxx:426
LVL1TGCTrigger
Definition: LVL1TGCTrigger.cxx:47
LVL1TGCTrigger::TGCSectorLogic::tgcArgs
const TGCArguments * tgcArgs() const
Definition: TGCSectorLogic.h:86
LVL1TGCTrigger::TGCInnerTrackletSlotHolder::NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR
@ NUMBER_OF_SLOTS_PER_TRIGGER_SECTOR
Definition: TGCInnerTrackletSlotHolder.h:35
LVL1TGCTrigger::TGCDatabaseManager
Definition: TGCDatabaseManager.h:39
LVL1TGCTrigger::TGCSectorLogic::m_useEIFI
bool m_useEIFI
Definition: TGCSectorLogic.h:118
LVL1TGCTrigger::TGCSectorLogic::clockIn
void clockIn(const SG::ReadCondHandleKey< TGCTriggerData > &readCondKey, int bidIn, bool process=true)
Definition: TGCSectorLogic.cxx:132
LVL1TGCTrigger::TGCSectorLogic::doTGCNSWCoincidence
void doTGCNSWCoincidence(TGCRPhiCoincidenceOut *coincidenceOut)
Definition: TGCSectorLogic.cxx:387
LVL1TGCTrigger::TGCSectorLogic::getNumberOfSubSectorCluster
int getNumberOfSubSectorCluster() const
Definition: TGCSectorLogic.h:153
LVL1TGCTrigger::TGCSectorLogic::m_moduleId
int m_moduleId
Definition: TGCSectorLogic.h:113
TGCNumbering.h
TGCRPhiCoincidenceMatrix.h
LVL1TGCTrigger::TGCSectorLogic::m_mapBIS78
std::shared_ptr< const LVL1TGC::TGCBIS78CoincidenceMap > m_mapBIS78
Definition: TGCSectorLogic.h:133
LVL1TGCTrigger::TGCSectorLogic::doTGCFICoincidence
bool doTGCFICoincidence(TGCRPhiCoincidenceOut *coincidenceOut)
Definition: TGCSectorLogic.cxx:462
LVL1TGCTrigger::TGCArguments
Definition: TGCArguments.h:12
LVL1TGCTrigger::TGCSectorLogic
Definition: TGCSectorLogic.h:42
SG::ReadCondHandleKey< TGCTriggerData >
LVL1TGCTrigger::TGCSectorLogic::m_mapEIFI
const LVL1TGC::TGCEIFICoincidenceMap * m_mapEIFI
Definition: TGCSectorLogic.h:127
LVL1TGCTrigger::TGCSectorLogic::deleteHPBOut
void deleteHPBOut()
Definition: TGCSectorLogic.cxx:225
LVL1TGCTrigger::TGCSectorLogic::getBid
int getBid() const
Definition: TGCSectorLogic.h:81
TGCSSCController.h
LVL1TGCTrigger::TGCHighPtBoard
Definition: TGCHighPtBoard.h:34
LVL1TGCTrigger::TGCRegionType
TGCRegionType
Definition: TGCNumbering.h:49
LVL1TGCTrigger::TGCSectorLogic::m_wireHighPtChipOut
TGCHighPtChipOut * m_wireHighPtChipOut[MaxNumberOfWireHighPtBoard]
Definition: TGCSectorLogic.h:143
LVL1TGCTrigger::TGCSectorLogic::setStripHighPtBoard
void setStripHighPtBoard(TGCHighPtBoard *highPtBoard)
Definition: TGCSectorLogic.cxx:122
python.L1.Base.MenuUtils.binstr
def binstr(value, width)
Definition: MenuUtils.py:27
LVL1TGCTrigger::TGCSectorLogic::m_wordTileMuon
int m_wordTileMuon
Definition: TGCSectorLogic.h:139
LVL1TGCTrigger::TGCSectorLogic::dec2bin
void dec2bin(int dec, char *binstr, int length)
Definition: TGCSectorLogic.cxx:313
LVL1TGCTrigger::TGCSectorLogic::getSideID
int getSideID() const
Definition: TGCSectorLogic.h:191
LVL1TGCTrigger::TGCSectorLogic::m_region
TGCRegionType m_region
Definition: TGCSectorLogic.h:115
LVL1TGC::TGCSide
TGCSide
The sides of TGC (A- or C-side)
Definition: TGCNumbering.h:13
LVL1TGCTrigger::TGCSectorLogic::getTrackSelectorOutput
void getTrackSelectorOutput(std::shared_ptr< TGCTrackSelectorOut > &trackSelectorOut) const
Definition: TGCSectorLogic.cxx:127
TGCArguments.h
LVL1TGCTrigger::TGCSSCController
Definition: TGCSSCController.h:17
LVL1TGCTrigger::TGCSectorLogic::m_tgcArgs
TGCArguments * m_tgcArgs
Definition: TGCSectorLogic.h:149
LVL1TGCTrigger::TGCSectorLogic::getNumberOfWireHighPtBoard
int getNumberOfWireHighPtBoard() const
Definition: TGCSectorLogic.h:165
LVL1TGCTrigger::TGCSectorLogic::getInnerStationWord
int getInnerStationWord() const
Definition: TGCSectorLogic.h:203
LVL1TGCTrigger::TGCInnerTrackletSlot
Definition: TGCInnerTrackletSlot.h:11
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
LVL1TGCTrigger::TGCSectorLogic::m_trackSelector
TGCTrackSelector m_trackSelector
Definition: TGCSectorLogic.h:136
LVL1TGCTrigger::TGCSectorLogic::getId
int getId() const
Definition: TGCSectorLogic.h:172
LVL1TGCTrigger::TGCSectorLogic::m_pTMDB
std::shared_ptr< const LVL1TGC::TGCTMDB > m_pTMDB
Definition: TGCSectorLogic.h:129
LVL1TGCTrigger::TGCSectorLogic::m_stripHighPtChipOut
TGCHighPtChipOut * m_stripHighPtChipOut
Definition: TGCSectorLogic.h:145
LVL1TGCTrigger::TGCSectorLogic::m_useGoodMF
bool m_useGoodMF
Definition: TGCSectorLogic.h:120
TGCTriggerData.h