8 const std::string&
name,
11 m_regionSelector(
"RegSelTool/RegSelTool_MM",this)
26 ATH_CHECK(m_mmPrepContainerKey.initialize(!m_mmPrepContainerKey.empty()));
28 return StatusCode::SUCCESS;
39 std::vector<const Muon::MMPrepDataCollection*> mmCols;
40 std::vector<IdentifierHash> mmHashList;
41 std::vector<IdentifierHash> mmHashList_cache;
44 if(m_mmPrepContainerKey.empty()) {
46 return StatusCode::SUCCESS;
49 if (!mmPrepContainerHandle.isValid()) {
50 ATH_MSG_ERROR(
"Cannot retrieve MM PRD Container key: " << m_mmPrepContainerKey.key());
51 return StatusCode::FAILURE;
53 ATH_MSG_DEBUG(
"MM PRD Container retrieved with key: " << m_mmPrepContainerKey.key());
57 if (m_use_RoIBasedDataAccess) {
62 if (iroi) m_regionSelector->lookup( Gaudi::Hive::currentContext() )->HashIDList(*iroi, mmHashList);
65 m_regionSelector->lookup( Gaudi::Hive::currentContext() )->HashIDList(fullscan_roi, mmHashList);
69 std::vector<uint32_t> mmRobList;
70 m_regionSelector->lookup( Gaudi::Hive::currentContext() )->ROBIDList(*iroi, mmRobList);
72 if (!mmHashList.empty()) {
79 if( MMcoll ==
nullptr ) {
83 if( MMcoll->size() == 0) {
88 mmHashList_cache.push_back(
id);
89 mmCols.push_back(MMcoll);
98 for(
const auto mmcoll : *mmPrds) {
99 mmCols.push_back(mmcoll);
107 mmHits.reserve( mmHits.size() +
mm->size() );
113 lutDigit.
eta = prd->globalPosition().eta();
114 lutDigit.
phi = prd->globalPosition().phi();
115 lutDigit.
r = prd->globalPosition().perp();
116 lutDigit.
z = prd->globalPosition().z();
117 lutDigit.
stationEta = m_idHelperSvc->mmIdHelper().stationEta(prd->identify());
118 lutDigit.
stationPhi = m_idHelperSvc->mmIdHelper().stationPhi(prd->identify());
119 lutDigit.
stationName = m_idHelperSvc->mmIdHelper().stationName(prd->identify());
123 lutDigit.
layerNumber = m_idHelperSvc->mmIdHelper().gasGap(prd->identify())-1 + 4*(m_idHelperSvc->mmIdHelper().multilayer(prd->identify())-1);
124 mmHits.push_back(lutDigit);
126 ATH_MSG_DEBUG(
"MmDataPreparator: global eta/phi/r/z station eta/phi/name channel/layer " << lutDigit.
eta <<
"/" << lutDigit.
phi <<
"/" << lutDigit.
r <<
"/" << lutDigit.
z <<
" " << lutDigit.
stationEta <<
"/" << lutDigit.
stationPhi <<
"/" << lutDigit.
stationName <<
" " << m_idHelperSvc->mmIdHelper().channel(prd->identify()) <<
"/" << lutDigit.
layerNumber);
131 return StatusCode::SUCCESS;