46 ATH_MSG_ERROR(
"Readout of more than 8 BCs is not supported by the simulation");
47 return StatusCode::FAILURE;
49 return StatusCode::SUCCESS;
68 "RPC data loaded from G3:" <<
"\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)
78 unsigned long int debug;
84 ATH_MSG_DEBUG (
"CMApatterns created from RPC digits:" <<
"\n"
112 ATH_CHECK(wh_muctpiRpc.
record(std::make_unique<LVL1MUONIF::Lvl1MuCTPIInputPhase1>()));
113 ctpiPhase1InRPC = wh_muctpiRpc.
ptr();
116 ATH_CHECK(wh_muctpiRpc.
record(std::make_unique<LVL1MUONIF::Lvl1MuCTPIInput>()));
117 ctpiInRPC = wh_muctpiRpc.
ptr();
122 SLdata::PatternsList::iterator SLit = sectors_patterns.begin();
124 while(SLit != sectors_patterns.end())
127 int sector = (*SLit)->sector();
128 int subsystem = (sector > 31)? 1 : 0;
129 int logic_sector = sector%32;
133 unsigned int data_word = 0;
137 catch (
const std::out_of_range& ex) {
141 "Input to MuCTPI: side=" << subsystem
142 <<
", SL= " << logic_sector
146 <<
", data word " << MSG::hex << data_word
155 for(
int icand = 0 ; icand < 2 ; icand++){
156 sldata2.
pt(icand, sldata.
pt(icand) );
157 sldata2.
roi(icand, sldata.
roi(icand) );
158 sldata2.
ovl(icand, sldata.
ovl(icand) );
206 ATH_MSG_DEBUG(
"Start retrieving data from the RPC bytestream class");
209 RPCbytestream::PAD_Readout::iterator it = PADmap.begin();
210 while (it != PADmap.end())
215 (*it).second.give_pad_readout()->bytestream(
PADdata);
218 ATH_MSG_DEBUG (
"Start dumping the PAD " << (*it).second.PAD()
219 <<
" bytestream structure" <<
"\n"
223 for (
int i=0;i<8;++i)
226 <<
" into the PAD n. " << (*it).second.PAD());
228 MatrixReadOut* matrix_read_out=(*it).second.matrices_readout(i);
250 const uint8_t dstrip_phi=1;
251 const uint8_t dstrip_eta=1;
252 const uint16_t bcid=0;
255 ATH_CHECK(wh_bis78RpcTrigData.
record(std::make_unique<Muon::RpcBis78_TrigRawDataContainer>()));
259 return StatusCode::SUCCESS;
270 return StatusCode::SUCCESS;
273 int bisStationIndex =
m_idHelperSvc->rpcIdHelper().stationNameIndex(
"BIS");
278 Identifier moduleId = rpcCollection->identify();
285 for (
const RpcDigit *rpcDigit : *rpcCollection) {
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);
296 int MeasuresPhi =
m_idHelperSvc->rpcIdHelper().measuresPhi(channelId);
306 unsigned long int strip_code_cab = readCdo->
strip_code_fromOffId(StationName, StationEta, StationPhi,
307 DoubletR, DoubletZ, DoubletP, GasGap, MeasuresPhi, Strip);
313 xyz[1] = pos.x() / 10.;
314 xyz[2] = pos.y() / 10.;
315 xyz[3] = pos.z() / 10.;
316 xyz[0] = rpcDigit->time();
318 int param[3] = {0, 0, 0};
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);
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());
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());
353 bis78Sim.
AddStrip(StationEta, StationPhi, GasGap, MeasuresPhi, Strip);
358 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
#define CHECK(...)
Evaluate an expression and check for errors.
An algorithm that can be simultaneously executed in multiple threads.
unsigned int AddStrip(int sectoreta, int sectorphi, int igap, int mphi, int strip)
void build_trigRawData(Muon::RpcBis78_TrigRawDataContainer *trgContainer, uint8_t dstrip_phi, uint8_t dstrip_eta, uint16_t bcid) const
Class representing data from a barrel SL board.
Class representing data from a barrel SL board.
const Lvl1MuSectorLogicData & convertFromWordFormat(const SectorLogicWord &)
Convert SectorLogicData from 32 bit word data.
int charge(size_t id) const
void clear2candidatesInSector()
void set2candidatesInSector()
void clear2candidates(size_t id)
void set2candidates(size_t id)
bool is2candidatesInSector() const
int charge(size_t id) const
bool is2candidates(size_t id) const
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Amg::Vector3D stripPos(const Identifier &id) const
std::map< int, PADreadout, std::less< int > > PAD_Readout
const PAD_Readout & pad_readout(void) const
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
const_pointer_type cptr()
virtual bool isValid() override final
Can the handle be successfully dereferenced?
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
PatternsList give_patterns(void)
std::list< SLpatterns * > PatternsList
CMAword outputToMuCTPI(int deltaBC=0)
IntegerProperty m_sl_rostruct_debug
BooleanProperty m_data_detail
BooleanProperty m_hardware_emulation
IntegerProperty m_rx_rostruct_debug
IntegerProperty m_fast_debug
IntegerProperty m_pad_rostruct_debug
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muDetMgrKey
Gaudi::Property< int > m_nobxs
IntegerProperty m_firstBC_to_MUCTPI
IntegerProperty m_rx_ro_debug
SG::WriteHandleKey< Muon::RpcBis78_TrigRawDataContainer > m_bis78TrigKey
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
SG::WriteHandleKey< LVL1MUONIF::Lvl1MuCTPIInput > m_muctpiKey
SG::ReadHandleKey< RpcDigitContainer > m_rpcDigitKey
IntegerProperty m_lastBC_to_MUCTPI
BooleanProperty m_useRun3Config
virtual StatusCode initialize() override
StringProperty m_bytestream_file
virtual StatusCode execute(const EventContext &ctx) const override
TrigT1RPC(const std::string &name, ISvcLocator *pSvcLocator)
IntegerProperty m_cma_debug
SG::WriteHandleKey< LVL1MUONIF::Lvl1MuCTPIInputPhase1 > m_muctpiPhase1Key
Gaudi::Property< int > m_bczero
SG::ReadCondHandleKey< RpcCablingCondData > m_readKey
StatusCode fill_RPCdata(const EventContext &ctx, RPCsimuData &, BIS78_triggerSimulation &, const RpcCablingCondData *readCdo, const MuonGM::MuonDetectorManager *muDetMgr) const
IntegerProperty m_cma_ro_debug
IntegerProperty m_sl_ro_debug
IntegerProperty m_cma_rostruct_debug
IntegerProperty m_sl_debug
IntegerProperty m_pad_debug
BooleanProperty m_bytestream_production
IntegerProperty m_pad_ro_debug
std::vector< std::string > patterns
Eigen::Matrix< double, 3, 1 > Vector3D
unsigned short int PT1(unsigned long int slword)
unsigned short int ROI1(unsigned long int slword)