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;
40 std::vector<const Muon::MMPrepDataCollection*> mmCols;
41 std::vector<IdentifierHash> mmHashList;
42 std::vector<IdentifierHash> mmHashList_cache;
45 if(m_mmPrepContainerKey.empty()) {
47 return StatusCode::SUCCESS;
49 auto mmPrepContainerHandle =
SG::makeHandle(m_mmPrepContainerKey, ctx);
50 if (!mmPrepContainerHandle.isValid()) {
51 ATH_MSG_ERROR(
"Cannot retrieve MM PRD Container key: " << m_mmPrepContainerKey.key());
52 return StatusCode::FAILURE;
54 ATH_MSG_DEBUG(
"MM PRD Container retrieved with key: " << m_mmPrepContainerKey.key());
58 if (m_use_RoIBasedDataAccess) {
63 if (iroi) m_regionSelector->lookup(ctx)->HashIDList(*iroi, mmHashList);
66 m_regionSelector->lookup(ctx)->HashIDList(fullscan_roi, mmHashList);
70 std::vector<uint32_t> mmRobList;
71 m_regionSelector->lookup(ctx)->ROBIDList(*iroi, mmRobList);
73 if (!mmHashList.empty()) {
80 if( MMcoll ==
nullptr ) {
84 if( MMcoll->size() == 0) {
89 mmHashList_cache.push_back(
id);
90 mmCols.push_back(MMcoll);
99 for(
const auto mmcoll : *mmPrds) {
100 mmCols.push_back(mmcoll);
108 mmHits.reserve( mmHits.size() +
mm->size() );
114 lutDigit.
eta = prd->globalPosition().eta();
115 lutDigit.
phi = prd->globalPosition().phi();
116 lutDigit.
r = prd->globalPosition().perp();
117 lutDigit.
z = prd->globalPosition().z();
118 lutDigit.
stationEta = m_idHelperSvc->mmIdHelper().stationEta(prd->identify());
119 lutDigit.
stationPhi = m_idHelperSvc->mmIdHelper().stationPhi(prd->identify());
120 lutDigit.
stationName = m_idHelperSvc->mmIdHelper().stationName(prd->identify());
124 lutDigit.
layerNumber = m_idHelperSvc->mmIdHelper().gasGap(prd->identify())-1 + 4*(m_idHelperSvc->mmIdHelper().multilayer(prd->identify())-1);
125 mmHits.push_back(lutDigit);
127 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);
132 return StatusCode::SUCCESS;