ATLAS Offline Software
Loading...
Searching...
No Matches
TrigT1RPC Class Reference

#include <TrigT1RPC.h>

Inheritance diagram for TrigT1RPC:
Collaboration diagram for TrigT1RPC:

Public Member Functions

 TrigT1RPC (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode fill_RPCdata (const EventContext &ctx, RPCsimuData &, BIS78_triggerSimulation &, const RpcCablingCondData *readCdo, const MuonGM::MuonDetectorManager *muDetMgr) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

IntegerProperty m_fast_debug {this,"FastDebug",0}
IntegerProperty m_cma_debug {this,"CMAdebug",0}
IntegerProperty m_pad_debug {this,"PADdebug",0}
IntegerProperty m_sl_debug {this,"SLdebug",0}
IntegerProperty m_cma_ro_debug {this,"CMArodebug",0}
IntegerProperty m_pad_ro_debug {this,"PADrodebug",0}
IntegerProperty m_rx_ro_debug {this,"RXrodebug",0}
IntegerProperty m_sl_ro_debug {this,"SLrodebug",0}
IntegerProperty m_cma_rostruct_debug {this,"CMArostructdebug",0}
IntegerProperty m_pad_rostruct_debug {this,"PADrostructdebug",0}
IntegerProperty m_rx_rostruct_debug {this,"RXrostructdebug",0}
IntegerProperty m_sl_rostruct_debug {this,"SLrostructdebug",0}
BooleanProperty m_geometric_algo {this,"Geometric",false}
BooleanProperty m_logic_emulation {this,"Logic",false}
BooleanProperty m_hardware_emulation {this,"Hardware",true}
BooleanProperty m_bytestream_production {this,"RPCbytestream",false}
StringProperty m_bytestream_file {this,"RPCbytestreamFile",""}
BooleanProperty m_data_detail {this,"DataDetail",false}
IntegerProperty m_firstBC_to_MUCTPI {this,"firstBC_to_MUCTPI",-1}
IntegerProperty m_lastBC_to_MUCTPI {this,"lastBC_to_MUCTPI",1}
BooleanProperty m_useRun3Config {this,"useRun3Config",false}
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_muDetMgrKey {this, "DetectorManagerKey", "MuonDetectorManager", "Key of input MuonDetectorManager condition data"}
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
SG::ReadCondHandleKey< RpcCablingCondDatam_readKey {this, "ReadKey", "RpcCablingCondData", "Key of RpcCablingCondData"}
SG::ReadHandleKey< RpcDigitContainerm_rpcDigitKey {this, "RPCDigitContainer", "RPC_DIGITS", "RPC Digit Input Container"}
SG::WriteHandleKey< LVL1MUONIF::Lvl1MuCTPIInputm_muctpiKey {this, "MuctpiLocationRPC", "L1MuctpiStoreRPC", "Location of muctpi for Rpc"}
SG::WriteHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1m_muctpiPhase1Key {this, "MuctpiPhase1LocationRPC", "L1MuctpiStoreRPC", "Location of muctpiPhase1 for Rpc"}
SG::WriteHandleKey< Muon::RpcBis78_TrigRawDataContainerm_bis78TrigKey {this, "BIS78TrigContainerLocation", "BIS78TrigContainer", "Location of BIS78 Rpc"}
Gaudi::Property< int > m_nobxs { this, "NOBXS", 8, "Number of bunch crossings in readout"}
Gaudi::Property< int > m_bczero { this, "BCZERO", 3, "Nominal bunch crossing"}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 35 of file TrigT1RPC.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrigT1RPC()

TrigT1RPC::TrigT1RPC ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 28 of file TrigT1RPC.cxx.

28 :
29 AthReentrantAlgorithm(name, pSvcLocator) {
30}

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TrigT1RPC::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 58 of file TrigT1RPC.cxx.

58 {
59
60 SG::ReadCondHandle<RpcCablingCondData> readCdo{m_readKey, ctx};
61 SG::ReadCondHandle<MuonGM::MuonDetectorManager> muDetMgrHandle{m_muDetMgrKey, ctx};
62
63 RPCsimuData data; // instantiate the container for the RPC digits
64 BIS78_triggerSimulation bis78Sim; // BIS78 simulation helper
65 CHECK(fill_RPCdata(ctx, data, bis78Sim, readCdo.cptr(), muDetMgrHandle.cptr())); // fill the data with RPC simulated digts
66
68 "RPC data loaded from G3:" << "\n"
69 << ShowData<RPCsimuData>(data,"",m_data_detail) << "\n"
70 << "RPC digits into station 1 ==> "
71 << data.how_many(-1,-1,1,-1,-1,-1) << "\n"
72 << "RPC digits into station 2 ==> "
73 << data.how_many(-1,-1,2,-1,-1,-1) << "\n"
74 << "RPC digits into station 3 ==> "
75 << data.how_many(-1,-1,3,-1,-1,-1)
76 );
77 // ******************** Start of Level-1 simulation section *****************
78 unsigned long int debug;
79
82 CMAdata patterns(&data, readCdo.cptr(), debug); //
83 //
84 ATH_MSG_DEBUG ( "CMApatterns created from RPC digits:" << "\n" //
85 << ShowData<CMAdata>(patterns,"",m_data_detail) ); //
87
88
91 PADdata pads(&patterns,debug); //
92 //
93 ATH_MSG_DEBUG ( "PADs created from CMA patterns:" << "\n"
94 << ShowData<PADdata>(pads,"",m_data_detail) );
96
97
100 SLdata sectors(&pads,debug); //
101 //
102 ATH_MSG_DEBUG("Sector Logics created from PAD patterns:" //
103 << "\n" //
104 << ShowData<SLdata>(sectors,"",m_data_detail) ); //
106
108 LVL1MUONIF::Lvl1MuCTPIInput * ctpiInRPC = nullptr;
109 LVL1MUONIF::Lvl1MuCTPIInputPhase1 * ctpiPhase1InRPC = nullptr;
110 if(m_useRun3Config){
111 SG::WriteHandle<LVL1MUONIF::Lvl1MuCTPIInputPhase1> wh_muctpiRpc(m_muctpiPhase1Key, ctx);
112 ATH_CHECK(wh_muctpiRpc.record(std::make_unique<LVL1MUONIF::Lvl1MuCTPIInputPhase1>()));
113 ctpiPhase1InRPC = wh_muctpiRpc.ptr();
114 }else{
115 SG::WriteHandle<LVL1MUONIF::Lvl1MuCTPIInput> wh_muctpiRpc(m_muctpiKey, ctx);
116 ATH_CHECK(wh_muctpiRpc.record(std::make_unique<LVL1MUONIF::Lvl1MuCTPIInput>()));
117 ctpiInRPC = wh_muctpiRpc.ptr();
118 }
119
120 //
121 SLdata::PatternsList sectors_patterns = sectors.give_patterns(); //
122 SLdata::PatternsList::iterator SLit = sectors_patterns.begin(); //
123 //
124 while(SLit != sectors_patterns.end()) //
125 { //
126 SectorLogic* logic = (*SLit)->give_SectorL(readCdo.cptr(), m_nobxs, m_bczero);
127 int sector = (*SLit)->sector(); //
128 int subsystem = (sector > 31)? 1 : 0; //
129 int logic_sector = sector%32;//
130
131 for (int dbc=m_firstBC_to_MUCTPI; dbc<=m_lastBC_to_MUCTPI; dbc++){
132
133 unsigned int data_word = 0;
134 try {
135 data_word = logic->outputToMuCTPI(dbc);
136 }
137 catch (const std::out_of_range& ex) {
138 ATH_MSG_WARNING(ex.what());
139 }
140 ATH_MSG_DEBUG( //
141 "Input to MuCTPI: side=" << subsystem //
142 << ", SL= " << logic_sector //
143 << ", BC= " << dbc
144 << ", RoI=" << TriggerRPC::ROI1(data_word) //
145 << ", Th=" << TriggerRPC::PT1(data_word) //
146 << ", data word " << MSG::hex << data_word //
147 << MSG::dec ); //
148 if(m_useRun3Config){
149 LVL1MUONIF::Lvl1MuBarrelSectorLogicData sldata;
150 sldata.convertFromWordFormat(data_word);
151 LVL1MUONIF::Lvl1MuBarrelSectorLogicDataPhase1 sldata2;
152 sldata2.bcid( sldata.bcid() );
153 if(sldata.is2candidatesInSector()) sldata2.set2candidatesInSector();
154 else sldata2.clear2candidatesInSector();
155 for(int icand = 0 ; icand < 2 ; icand++){ // up to 2 candidates
156 sldata2.pt(icand, sldata.pt(icand) );
157 sldata2.roi(icand, sldata.roi(icand) );
158 sldata2.ovl(icand, sldata.ovl(icand) );
159 sldata2.charge(icand, sldata.charge(icand) );
160 if(sldata.is2candidates(icand)) sldata2.set2candidates(icand);
161 else sldata2.clear2candidates(icand);
162 }
163 ctpiPhase1InRPC->setSectorLogicData(sldata2,0,subsystem,logic_sector,dbc);
164 }else{
165 ctpiInRPC->setSectorLogicData(data_word,0,subsystem,logic_sector,dbc);
166 }
167 }
168 //
169 ++SLit; //
170 }
171
172 //
173 //
174
175 ATH_MSG_DEBUG ("put RPC Lvl1MuCTPIInput into SG" ); //
176
178
179
180
181 // ******************* Start of Level-1 computation section *****************
182
183
184 // ******************* Start Byte Stream production *************************
185
187 {
188 RPCbytestream bytestream (patterns,
189 (std::string) m_bytestream_file,
190 msg(),
191 (unsigned long int) m_cma_ro_debug,
192 (unsigned long int) m_pad_ro_debug,
193 (unsigned long int) m_rx_ro_debug,
194 (unsigned long int) m_sl_ro_debug,
195 (unsigned long int) m_cma_rostruct_debug,
196 (unsigned long int) m_pad_rostruct_debug,
197 (unsigned long int) m_rx_rostruct_debug,
198 (unsigned long int) m_sl_rostruct_debug,
200
201
202 // Example on how to access the byte stream data.
203 // Only the bare structure is dump. To access a specific data member, use
204 // the interface methods of MatrixReadOut and PadReadOut classes.
205
206 ATH_MSG_DEBUG("Start retrieving data from the RPC bytestream class");
207
208 RPCbytestream::PAD_Readout PADmap = bytestream.pad_readout();
209 RPCbytestream::PAD_Readout::iterator it = PADmap.begin();
210 while (it != PADmap.end())
211 {
212 // load the PAD data into a ostrstream object
213 std::ostringstream PADdata;
214
215 (*it).second.give_pad_readout()->bytestream(PADdata);
216
217 //access to PadReadOut class and print the informations inside
218 ATH_MSG_DEBUG ("Start dumping the PAD " << (*it).second.PAD()
219 << " bytestream structure" << "\n"
220 << PADdata.str());
221
222 //access to MatrixReadOut classes given in input to that PAD
223 for (int i=0;i<8;++i)
224 {
225 ATH_MSG_DEBUG( "Start dumping the Matrix " << i
226 << " into the PAD n. " << (*it).second.PAD());
227
228 MatrixReadOut* matrix_read_out=(*it).second.matrices_readout(i);
229
230 if(matrix_read_out)
231 { // load the Matrix data into a ostrstream object
232 std::ostringstream CMAdata;
233 CMAdata << *matrix_read_out;
234
235 ATH_MSG_DEBUG (CMAdata.str());
236 }
237 else
238 {
239 ATH_MSG_DEBUG( "Matrix Read Out not loaded");
240 }
241 }
242
243 ++it;
244 }
245 }
246
247 // ******************* Start of BIS78 section *****************
248
249 // Now BIS78 Trigger
250 const uint8_t dstrip_phi=1; // Delta phi for BIS78 coincidence
251 const uint8_t dstrip_eta=1; // Delta eta for BIS78 coincidence
252 const uint16_t bcid=0;
253
254 SG::WriteHandle<Muon::RpcBis78_TrigRawDataContainer> wh_bis78RpcTrigData(m_bis78TrigKey, ctx);
255 ATH_CHECK(wh_bis78RpcTrigData.record(std::make_unique<Muon::RpcBis78_TrigRawDataContainer>()));
256
257 bis78Sim.build_trigRawData(wh_bis78RpcTrigData.ptr(), dstrip_phi, dstrip_eta, bcid);
258
259 return StatusCode::SUCCESS;
260}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
#define CHECK(...)
Evaluate an expression and check for errors.
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
const bool debug
void build_trigRawData(Muon::RpcBis78_TrigRawDataContainer *trgContainer, uint8_t dstrip_phi, uint8_t dstrip_eta, uint16_t bcid) const
const Lvl1MuSectorLogicData & convertFromWordFormat(const SectorLogicWord &)
Convert SectorLogicData from 32 bit word data.
void setSectorLogicData(const Lvl1MuSectorLogicDataPhase1 &data, size_t systemAddress, size_t subSystemAddress, size_t sectorAddress, int bcid=0)
void setSectorLogicData(const Lvl1MuSectorLogicData &data, size_t systemAddress, size_t subSystemAddress, size_t sectorAddress, int bcid=0)
std::map< int, PADreadout, std::less< int > > PAD_Readout
const_pointer_type cptr()
std::list< SLpatterns * > PatternsList
Definition SLdata.h:19
CMAword outputToMuCTPI(int deltaBC=0)
IntegerProperty m_sl_rostruct_debug
Definition TrigT1RPC.h:58
BooleanProperty m_data_detail
Definition TrigT1RPC.h:66
BooleanProperty m_hardware_emulation
Definition TrigT1RPC.h:62
IntegerProperty m_rx_rostruct_debug
Definition TrigT1RPC.h:57
IntegerProperty m_fast_debug
Definition TrigT1RPC.h:44
IntegerProperty m_pad_rostruct_debug
Definition TrigT1RPC.h:56
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muDetMgrKey
Definition TrigT1RPC.h:77
Gaudi::Property< int > m_nobxs
Definition TrigT1RPC.h:87
IntegerProperty m_firstBC_to_MUCTPI
Definition TrigT1RPC.h:69
IntegerProperty m_rx_ro_debug
Definition TrigT1RPC.h:52
SG::WriteHandleKey< Muon::RpcBis78_TrigRawDataContainer > m_bis78TrigKey
Definition TrigT1RPC.h:85
SG::WriteHandleKey< LVL1MUONIF::Lvl1MuCTPIInput > m_muctpiKey
Definition TrigT1RPC.h:83
IntegerProperty m_lastBC_to_MUCTPI
Definition TrigT1RPC.h:70
BooleanProperty m_useRun3Config
Definition TrigT1RPC.h:72
StringProperty m_bytestream_file
Definition TrigT1RPC.h:64
IntegerProperty m_cma_debug
Definition TrigT1RPC.h:46
SG::WriteHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1 > m_muctpiPhase1Key
Definition TrigT1RPC.h:84
Gaudi::Property< int > m_bczero
Definition TrigT1RPC.h:88
SG::ReadCondHandleKey< RpcCablingCondData > m_readKey
Definition TrigT1RPC.h:80
StatusCode fill_RPCdata(const EventContext &ctx, RPCsimuData &, BIS78_triggerSimulation &, const RpcCablingCondData *readCdo, const MuonGM::MuonDetectorManager *muDetMgr) const
IntegerProperty m_cma_ro_debug
Definition TrigT1RPC.h:50
IntegerProperty m_sl_ro_debug
Definition TrigT1RPC.h:53
IntegerProperty m_cma_rostruct_debug
Definition TrigT1RPC.h:55
IntegerProperty m_sl_debug
Definition TrigT1RPC.h:48
IntegerProperty m_pad_debug
Definition TrigT1RPC.h:47
BooleanProperty m_bytestream_production
Definition TrigT1RPC.h:63
IntegerProperty m_pad_ro_debug
Definition TrigT1RPC.h:51
std::vector< std::string > patterns
Definition listroot.cxx:187
unsigned short int PT1(unsigned long int slword)
Definition decodeSL.cxx:70
unsigned short int ROI1(unsigned long int slword)
Definition decodeSL.cxx:34
setEventNumber setTimeStamp bcid
setWord1 uint16_t

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ fill_RPCdata()

StatusCode TrigT1RPC::fill_RPCdata ( const EventContext & ctx,
RPCsimuData & data,
BIS78_triggerSimulation & bis78Sim,
const RpcCablingCondData * readCdo,
const MuonGM::MuonDetectorManager * muDetMgr ) const
private

Definition at line 262 of file TrigT1RPC.cxx.

263{
264 ATH_MSG_DEBUG("in execute(): fill RPC data");
265
266 SG::ReadHandle<RpcDigitContainer> rh_rpcDigits(m_rpcDigitKey, ctx);
267 if (!rh_rpcDigits.isValid())
268 {
269 ATH_MSG_WARNING("No RPC digits container found");
270 return StatusCode::SUCCESS;
271 }
272
273 int bisStationIndex = m_idHelperSvc->rpcIdHelper().stationNameIndex("BIS");
274
275 for (const RpcDigitCollection *rpcCollection : *rh_rpcDigits)
276 {
277
278 Identifier moduleId = rpcCollection->identify();
279
280 if (!m_idHelperSvc->isRpc(moduleId))
281 {
282 continue;
283 }
284
285 for (const RpcDigit *rpcDigit : *rpcCollection) {
286
287 Identifier channelId = rpcDigit->identify();
288 const int stationType = m_idHelperSvc->rpcIdHelper().stationName(channelId);
289 std::string StationName = m_idHelperSvc->rpcIdHelper().stationNameString(stationType);
290 int StationEta = m_idHelperSvc->rpcIdHelper().stationEta(channelId);
291 int StationPhi = m_idHelperSvc->rpcIdHelper().stationPhi(channelId);
292 int DoubletR = m_idHelperSvc->rpcIdHelper().doubletR(channelId);
293 int DoubletZ = m_idHelperSvc->rpcIdHelper().doubletZ(channelId);
294 int DoubletP = m_idHelperSvc->rpcIdHelper().doubletPhi(channelId);
295 int GasGap = m_idHelperSvc->rpcIdHelper().gasGap(channelId);
296 int MeasuresPhi = m_idHelperSvc->rpcIdHelper().measuresPhi(channelId);
297 int Strip = m_idHelperSvc->rpcIdHelper().strip(channelId);
298
299 const MuonGM::RpcReadoutElement *descriptor =
300 muDetMgr->getRpcReadoutElement(channelId);
301
302 // Get the global position of RPC strip from MuonDetDesc
303 Amg::Vector3D pos = descriptor->stripPos(channelId);
304
305 // Get the Level-1 numbering schema for the RPC strips
306 unsigned long int strip_code_cab = readCdo->strip_code_fromOffId(StationName, StationEta, StationPhi,
307 DoubletR, DoubletZ, DoubletP, GasGap, MeasuresPhi, Strip);
308
309 if (strip_code_cab)
310 {
311 // Fill data for the Level-1 RPC digit
312 float xyz[4];
313 xyz[1] = pos.x() / 10.; // coo[0]; //RPC strip x coordinate
314 xyz[2] = pos.y() / 10.; // coo[1]; //RPC strip y coordinate
315 xyz[3] = pos.z() / 10.; // coo[2]; //RPC strip z coordinate
316 xyz[0] = rpcDigit->time(); // time of digits
317
318 int param[3] = {0, 0, 0};
319
320 RPCsimuDigit digit(0, strip_code_cab, param, xyz);
321
322 data << digit;
323
324 ATH_MSG_DEBUG("Muon Identifiers from GM:" << "\n"
325 << " StationName = " << StationName << "\n"
326 << " StationEta = " << StationEta << "\n"
327 << " StationPhi = " << StationPhi << "\n"
328 << " DoubletR = " << DoubletR << "\n"
329 << " DoubletZ = " << DoubletZ << "\n"
330 << " DoubletP = " << DoubletP << "\n"
331 << " GasGap = " << GasGap << "\n"
332 << " MeasuresPhi = " << MeasuresPhi << "\n"
333 << " Strip = " << Strip);
334
335 ATH_MSG_DEBUG("RPC Digit from GM:" << "\n"
336 << " " << std::hex << channelId << std::dec << "\n"
337 << " GlobalPosition (cm) = "
338 << setiosflags(std::ios::fixed) << std::setprecision(3)
339 << std::setw(11) << pos.x()
340 << setiosflags(std::ios::fixed) << std::setprecision(3)
341 << std::setw(11) << pos.y()
342 << setiosflags(std::ios::fixed) << std::setprecision(3)
343 << std::setw(11) << pos.z());
344 }
345
346 // This section fills the BIS strip data
347 if (stationType == bisStationIndex) {
348 ATH_MSG_DEBUG("Filling BIS strip data: StationName=" << StationName << " StationEta=" << StationEta
349 << " StationPhi=" << StationPhi << " MeasuresPhi=" << MeasuresPhi
350 << " Strip=" << Strip << " GasGap=" << GasGap
351 << " Time=" << rpcDigit->time());
352
353 bis78Sim.AddStrip(StationEta, StationPhi, GasGap, MeasuresPhi, Strip);
354 }
355 }
356 }
357
358 return StatusCode::SUCCESS;
359}
#define xyz
unsigned int AddStrip(int sectoreta, int sectorphi, int igap, int mphi, int strip)
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
unsigned long int strip_code_fromOffId(const std::string &stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition TrigT1RPC.h:78
SG::ReadHandleKey< RpcDigitContainer > m_rpcDigitKey
Definition TrigT1RPC.h:82
Eigen::Matrix< double, 3, 1 > Vector3D

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode TrigT1RPC::initialize ( )
overridevirtual

Definition at line 34 of file TrigT1RPC.cxx.

34 {
35 ATH_MSG_INFO("Initializing");
36 ATH_CHECK(m_idHelperSvc.retrieve());
37 ATH_CHECK(m_readKey.initialize());
38 ATH_CHECK(m_rpcDigitKey.initialize());
41 ATH_CHECK(m_bis78TrigKey.initialize());
42 ATH_CHECK(m_muDetMgrKey.initialize());
43 if(m_nobxs>8){
44 //The RPC simulation uses many arrays that assume maximum 8 BCs are readout
45 //See TrigT1/TrigT1RPChardware/Matrix.h for example
46 ATH_MSG_ERROR("Readout of more than 8 BCs is not supported by the simulation");
47 return StatusCode::FAILURE;
48 }
49 return StatusCode::SUCCESS;
50}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_bczero

Gaudi::Property<int> TrigT1RPC::m_bczero { this, "BCZERO", 3, "Nominal bunch crossing"}
private

Definition at line 88 of file TrigT1RPC.h.

88{ this, "BCZERO", 3, "Nominal bunch crossing"};

◆ m_bis78TrigKey

SG::WriteHandleKey<Muon::RpcBis78_TrigRawDataContainer> TrigT1RPC::m_bis78TrigKey {this, "BIS78TrigContainerLocation", "BIS78TrigContainer", "Location of BIS78 Rpc"}
private

Definition at line 85 of file TrigT1RPC.h.

85{this, "BIS78TrigContainerLocation", "BIS78TrigContainer", "Location of BIS78 Rpc"};

◆ m_bytestream_file

StringProperty TrigT1RPC::m_bytestream_file {this,"RPCbytestreamFile",""}
private

Definition at line 64 of file TrigT1RPC.h.

64{this,"RPCbytestreamFile",""}; // name for the bytestream file

◆ m_bytestream_production

BooleanProperty TrigT1RPC::m_bytestream_production {this,"RPCbytestream",false}
private

Definition at line 63 of file TrigT1RPC.h.

63{this,"RPCbytestream",false}; // flag to produce RPC byte stream

◆ m_cma_debug

IntegerProperty TrigT1RPC::m_cma_debug {this,"CMAdebug",0}
private

Definition at line 46 of file TrigT1RPC.h.

46{this,"CMAdebug",0}; // bits for debugging CMA simulation

◆ m_cma_ro_debug

IntegerProperty TrigT1RPC::m_cma_ro_debug {this,"CMArodebug",0}
private

Definition at line 50 of file TrigT1RPC.h.

50{this,"CMArodebug",0}; // bits for debugging CMA readout

◆ m_cma_rostruct_debug

IntegerProperty TrigT1RPC::m_cma_rostruct_debug {this,"CMArostructdebug",0}
private

Definition at line 55 of file TrigT1RPC.h.

55{this,"CMArostructdebug",0}; // bits for debugging CMA ro struct

◆ m_data_detail

BooleanProperty TrigT1RPC::m_data_detail {this,"DataDetail",false}
private

Definition at line 66 of file TrigT1RPC.h.

66{this,"DataDetail",false}; // flag to printout detailed INFO on

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_fast_debug

IntegerProperty TrigT1RPC::m_fast_debug {this,"FastDebug",0}
private

Definition at line 44 of file TrigT1RPC.h.

44{this,"FastDebug",0}; // bits for debugging "fast" algos

◆ m_firstBC_to_MUCTPI

IntegerProperty TrigT1RPC::m_firstBC_to_MUCTPI {this,"firstBC_to_MUCTPI",-1}
private

Definition at line 69 of file TrigT1RPC.h.

69{this,"firstBC_to_MUCTPI",-1}; // First BC to be sent to muctpi, wrt to BC0, e.g. -1 meanst the BC before the trigger Bc

◆ m_geometric_algo

BooleanProperty TrigT1RPC::m_geometric_algo {this,"Geometric",false}
private

Definition at line 60 of file TrigT1RPC.h.

60{this,"Geometric",false}; // flag to activate fast simu

◆ m_hardware_emulation

BooleanProperty TrigT1RPC::m_hardware_emulation {this,"Hardware",true}
private

Definition at line 62 of file TrigT1RPC.h.

62{this,"Hardware",true}; // flag to activate hardware emula.

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> TrigT1RPC::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 78 of file TrigT1RPC.h.

78{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_lastBC_to_MUCTPI

IntegerProperty TrigT1RPC::m_lastBC_to_MUCTPI {this,"lastBC_to_MUCTPI",1}
private

Definition at line 70 of file TrigT1RPC.h.

70{this,"lastBC_to_MUCTPI",1}; // First BC to be sent to muctpi, wrt to BC0, e.g. -1 meanst the BC before the trigger Bc

◆ m_logic_emulation

BooleanProperty TrigT1RPC::m_logic_emulation {this,"Logic",false}
private

Definition at line 61 of file TrigT1RPC.h.

61{this,"Logic",false}; // flag to activate logic emulation

◆ m_muctpiKey

SG::WriteHandleKey<LVL1MUONIF::Lvl1MuCTPIInput> TrigT1RPC::m_muctpiKey {this, "MuctpiLocationRPC", "L1MuctpiStoreRPC", "Location of muctpi for Rpc"}
private

Definition at line 83 of file TrigT1RPC.h.

83{this, "MuctpiLocationRPC", "L1MuctpiStoreRPC", "Location of muctpi for Rpc"};

◆ m_muctpiPhase1Key

SG::WriteHandleKey<LVL1MUONIF::Lvl1MuCTPIInputPhase1> TrigT1RPC::m_muctpiPhase1Key {this, "MuctpiPhase1LocationRPC", "L1MuctpiStoreRPC", "Location of muctpiPhase1 for Rpc"}
private

Definition at line 84 of file TrigT1RPC.h.

84{this, "MuctpiPhase1LocationRPC", "L1MuctpiStoreRPC", "Location of muctpiPhase1 for Rpc"};

◆ m_muDetMgrKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> TrigT1RPC::m_muDetMgrKey {this, "DetectorManagerKey", "MuonDetectorManager", "Key of input MuonDetectorManager condition data"}
private

Definition at line 77 of file TrigT1RPC.h.

77{this, "DetectorManagerKey", "MuonDetectorManager", "Key of input MuonDetectorManager condition data"};

◆ m_nobxs

Gaudi::Property<int> TrigT1RPC::m_nobxs { this, "NOBXS", 8, "Number of bunch crossings in readout"}
private

Definition at line 87 of file TrigT1RPC.h.

87{ this, "NOBXS", 8, "Number of bunch crossings in readout"};

◆ m_pad_debug

IntegerProperty TrigT1RPC::m_pad_debug {this,"PADdebug",0}
private

Definition at line 47 of file TrigT1RPC.h.

47{this,"PADdebug",0}; // bits for debugging PAD simulation

◆ m_pad_ro_debug

IntegerProperty TrigT1RPC::m_pad_ro_debug {this,"PADrodebug",0}
private

Definition at line 51 of file TrigT1RPC.h.

51{this,"PADrodebug",0}; // bits for debugging PAD readout

◆ m_pad_rostruct_debug

IntegerProperty TrigT1RPC::m_pad_rostruct_debug {this,"PADrostructdebug",0}
private

Definition at line 56 of file TrigT1RPC.h.

56{this,"PADrostructdebug",0}; // bits for debugging PAD ro struct

◆ m_readKey

SG::ReadCondHandleKey<RpcCablingCondData> TrigT1RPC::m_readKey {this, "ReadKey", "RpcCablingCondData", "Key of RpcCablingCondData"}
private

Definition at line 80 of file TrigT1RPC.h.

80{this, "ReadKey", "RpcCablingCondData", "Key of RpcCablingCondData"};

◆ m_rpcDigitKey

SG::ReadHandleKey<RpcDigitContainer> TrigT1RPC::m_rpcDigitKey {this, "RPCDigitContainer", "RPC_DIGITS", "RPC Digit Input Container"}
private

Definition at line 82 of file TrigT1RPC.h.

82{this, "RPCDigitContainer", "RPC_DIGITS", "RPC Digit Input Container"};

◆ m_rx_ro_debug

IntegerProperty TrigT1RPC::m_rx_ro_debug {this,"RXrodebug",0}
private

Definition at line 52 of file TrigT1RPC.h.

52{this,"RXrodebug",0}; // bits for debugging Rx readout

◆ m_rx_rostruct_debug

IntegerProperty TrigT1RPC::m_rx_rostruct_debug {this,"RXrostructdebug",0}
private

Definition at line 57 of file TrigT1RPC.h.

57{this,"RXrostructdebug",0}; // bits for debugging Rx ro struct

◆ m_sl_debug

IntegerProperty TrigT1RPC::m_sl_debug {this,"SLdebug",0}
private

Definition at line 48 of file TrigT1RPC.h.

48{this,"SLdebug",0}; // bits for debugging SL simulation

◆ m_sl_ro_debug

IntegerProperty TrigT1RPC::m_sl_ro_debug {this,"SLrodebug",0}
private

Definition at line 53 of file TrigT1RPC.h.

53{this,"SLrodebug",0}; // bits for debugging SL readout

◆ m_sl_rostruct_debug

IntegerProperty TrigT1RPC::m_sl_rostruct_debug {this,"SLrostructdebug",0}
private

Definition at line 58 of file TrigT1RPC.h.

58{this,"SLrostructdebug",0}; // bits for debugging SL ro struct

◆ m_useRun3Config

BooleanProperty TrigT1RPC::m_useRun3Config {this,"useRun3Config",false}
private

Definition at line 72 of file TrigT1RPC.h.

72{this,"useRun3Config",false}; // flag for using switch between Run3 and Run2 configurations

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: