ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1TGCTrigger.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGT1TGC_LVL1TGCTRIGGER_H
6#define TRIGT1TGC_LVL1TGCTRIGGER_H
7
9
10// STL
11#include <string>
12#include <vector>
13#include <map>
14
15// Gaudi includes
16#include "Gaudi/Property.h"
17
18// Other stuff
22#include "Identifier/Identifier.h"
24
25// EIFI-SL connection
27
31
32// BS metadata container
34
37
39
43
44// Tile-Muon
47
48//NSW Trigger Output
50
51// RPC BIS78 Trigger Output
53
54class TgcRdo;
55class TgcRawData;
56
57namespace LVL1TGCTrigger {
58
59class TGCSector;
64class TGCEvent;
65
67{
68 public:
69
72 LVL1TGCTrigger( const std::string& name, ISvcLocator* pSvcLocator ) ;
73 virtual ~LVL1TGCTrigger();
74
75 // standard algorithm methods:
76 virtual StatusCode initialize() override;
77 virtual StatusCode start() override;
78 virtual StatusCode execute() override;
79 virtual StatusCode finalize() override;
80
81 private:
82 StatusCode processOneBunch(const TgcDigitContainer*,
84 std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>&);
85 void doMaskOperation(const TgcDigitContainer* ,std::map<Identifier, int>& );
86 void fillTGCEvent(const std::map<Identifier, int>& , TGCEvent&);
87
88 // record bare-RDO for LowPT coincidences (on m_OutputTgcRDO=True):
89 void recordRdoSLB(TGCSector *, std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>&);
90
91 // record bare-RDO for HighPT coincidences (on OutputTgcRDO=True):
92 void recordRdoHPT(TGCSector *, std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>&);
93
94 // record bare-RDO for Inner coincidences (on OutputTgcRDO=True):
95 void recordRdoInner(TGCSector *, std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>&);
96
97 // record bare-RDO for R-phi coincidences (on m_OutputTgcRDO=True):
98 void recordRdoSL(TGCSector *, std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>&);
99
100 // Retrieve Masked channel list
101 StatusCode getMaskedChannel();
102
103 // useful functions
104 int getCharge(int dR, int Zdir);
105 void extractFromString(const std::string&, std::vector<int>&);
106 //bool addRawData(TgcRawData * rawdata,
107 bool addRawData(std::unique_ptr<TgcRawData> rawdata,
108 std::map<std::pair<int, int>, std::unique_ptr<TgcRdo>>& tgcrdo );
109 int getLPTTypeInRawData(int type);
111 const TGCTrackSelectorOut *trackSelectorOut);
112
113
114 // Properties
115
116 // Location of LVL1MUONIF::Lvl1MuSectorLogicData (output from SL)
117 StringProperty m_keyMuCTPIInput_TGC{this,"MuCTPIInput_TGC","L1MuctpiStoreTGC"};
118
119 StringProperty m_MaskFileName12{this,"MaskFileName12",""};
120 ShortProperty m_CurrentBunchTag{this,"CurrentBunchTag",TgcDigit::BC_CURRENT};
121 BooleanProperty m_ProcessAllBunches{this,"ProcessAllBunhes",true};
122 BooleanProperty m_OutputTgcRDO{this,"OutputTgcRDO",true};
123
124 // expert usage
125 BooleanProperty m_USE_CONDDB{this, "USE_CONDDB", true}; //< flag to use the Condition DB
126 BooleanProperty m_SHPTORED {this, "SHPTORED", true}; //< flag for E1/E2 chamber ORED in Strip HPT
127 BooleanProperty m_USEINNER {this, "USEINNER", true}; //< flag for using Inner Station for SL
128 BooleanProperty m_INNERVETO{this,"INNERVETO",true}; // flag for using VETO by Inner Station for SL
129 BooleanProperty m_FULLCW{this,"FULLCW",false}; // flag for using differne CW for each octant
130 BooleanProperty m_TILEMU{this,"TILEMU",true}; // flag for using TileMu
131 BooleanProperty m_USENSW{this,"USENSW",false}; // flag for using NSW
132 BooleanProperty m_FORCENSWCOIN{this,"FORCENSWCOIN",true}; // flag to enable innerCoincidenceFlag at the TGC sectors expecting NSW hits even if there is no NSW hit
133 BooleanProperty m_USEBIS78{this,"USEBIS78",false}; // flag for using RPC BIS78
134 BooleanProperty m_useRun3Config{this,"useRun3Config",false}; // flag for using switch between Run3 and Run2 algorithms
135
136 StringProperty m_NSWSideInfo{this,"NSWSideInfo",""};// Information about NSW geometry. It should be "" or "AC" or "A" or "C"
137
138 bool m_firstTime{true};
140
142 std::unique_ptr<TGCTimingManager> m_TimingManager;
143 std::unique_ptr<TGCElectronicsSystem> m_system;
144
146
147 // EIFI-SL connection
149
150 // getCabling method
151 StatusCode getCabling();
152
153 // log
155
158
159
160 ServiceHandle<MuonTGC_CablingSvc> m_cabling{this, "TGCCablingSvc", "MuonTGC_CablingSvc", ""};
161
162 SG::WriteHandleKey<TgcRdoContainer> m_keyTgcRdo{this,"TgcRdo","TGCRDO2","Location of TgcRdoContainer"};
163 SG::ReadHandleKey<TgcRdoContainer> m_keyTgcRdoIn{this,"InputRDO","TGCRDO","Location of input TgcRdoContainer"};
164 SG::ReadHandleKey<TgcDigitContainer> m_keyTgcDigit{this,"InputData_perEvent","TGC_DIGITS","Location of TgcDigitContainer"};
165 SG::ReadHandleKey<TileMuonReceiverContainer> m_keyTileMu{this,"TileMuRcv_Input","TileMuRcvCnt","Location of TileMuonReceiverContainer"};
166 SG::ReadHandleKey<Muon::NSW_TrigRawDataContainer> m_keyNSWTrigOut{this,"NSWTrigger_Input","L1_NSWTrigContainer","Location of NSW_TrigRawDataContainer"};
167 SG::ReadHandleKey<Muon::RpcBis78_TrigRawDataContainer> m_keyBIS78TrigOut{this,"BIS78Trig_Input","BIS78TrigContainer","Location of RpcBis78_TrigRawDataContainer"};
168 SG::ReadCondHandleKey<TGCTriggerData> m_readCondKey{this,"ReadCondKey","TGCTriggerData"};
169 SG::ReadCondHandleKey<TGCTriggerLUTs> m_readLUTs_CondKey{this,"ReadLUTCondKey","TGCTriggerLUTs"};
170 SG::WriteHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> m_muctpiPhase1Key{this, "MuctpiPhase1LocationTGC", "L1MuctpiStoreTGC", "Location of muctpiPhase1 for Tgc"};
171
172 //StoreGate key for the ByteStreamMetadata container to retrieve detector mask
173 SG::ReadHandleKey<ByteStreamMetadataContainer> m_bsMetaDataContRHKey {this, "ByteStreamMetadataRHKey", "ByteStreamMetadata", "Location to retrieve the detector mask"};
174
176 std::map<Identifier, int> m_MaskedChannel;
177
178}; // class LVL1TGCTrigger
179
181 return &m_tgcArgs;
182}
183
184} // namespace LVL1TGCTrigger
185
186#endif // TRIGT1TGC_LVL1TGCTRIGGER_H
This file contains the class definition for the ByteStreamMetadataContainer class.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Class representing (part of) the input data to the MuCTPI for Phase 1.
Base class for the data coming from one SL board.
std::map< Identifier, int > m_MaskedChannel
mask channel map
StatusCode processOneBunch(const TgcDigitContainer *, LVL1MUONIF::Lvl1MuCTPIInputPhase1 *, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &)
TGCInnerTrackletSlotHolder m_innerTrackletSlotHolder
void recordRdoHPT(TGCSector *, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &)
SG::ReadHandleKey< Muon::NSW_TrigRawDataContainer > m_keyNSWTrigOut
virtual StatusCode execute() override
virtual StatusCode start() override
SG::ReadHandleKey< Muon::RpcBis78_TrigRawDataContainer > m_keyBIS78TrigOut
SG::ReadHandleKey< TgcDigitContainer > m_keyTgcDigit
SG::ReadCondHandleKey< TGCTriggerLUTs > m_readLUTs_CondKey
void recordRdoInner(TGCSector *, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &)
void recordRdoSL(TGCSector *, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &)
SG::ReadHandleKey< TgcRdoContainer > m_keyTgcRdoIn
SG::ReadHandleKey< TileMuonReceiverContainer > m_keyTileMu
ShortProperty m_CurrentBunchTag
property, see LVL1TGCTrigger::LVL1TGCTrigger
virtual StatusCode finalize() override
SG::ReadCondHandleKey< TGCTriggerData > m_readCondKey
void extractFromString(const std::string &, std::vector< int > &)
SG::WriteHandleKey< TgcRdoContainer > m_keyTgcRdo
SG::WriteHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1 > m_muctpiPhase1Key
ServiceHandle< MuonTGC_CablingSvc > m_cabling
void fillTGCEvent(const std::map< Identifier, int > &, TGCEvent &)
SG::ReadHandleKey< ByteStreamMetadataContainer > m_bsMetaDataContRHKey
void recordRdoSLB(TGCSector *, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &)
bool addRawData(std::unique_ptr< TgcRawData > rawdata, std::map< std::pair< int, int >, std::unique_ptr< TgcRdo > > &tgcrdo)
std::unique_ptr< TGCElectronicsSystem > m_system
StringProperty m_MaskFileName12
property, see LVL1TGCTrigger::LVL1TGCTrigger
BooleanProperty m_OutputTgcRDO
property, see LVL1TGCTrigger::LVL1TGCTrigger
void FillSectorLogicData(LVL1MUONIF::Lvl1MuSectorLogicDataPhase1 *sldata, const TGCTrackSelectorOut *trackSelectorOut)
void doMaskOperation(const TgcDigitContainer *, std::map< Identifier, int > &)
std::unique_ptr< TGCTimingManager > m_TimingManager
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Use IdentifiableContainer with TgcDigitCollection.
@ BC_UNDEFINED
Definition TgcDigit.h:37
@ BC_CURRENT
Definition TgcDigit.h:37
An unit object of TGC ROD output.
Definition TgcRawData.h:23
void initialize()