17 const std::string&
name,
30 return StatusCode::SUCCESS;
34 const std::vector<IdentifierHash>& idVect)
const {
43 const std::unordered_set<IdentifierHash> hashToSelect(idVect.begin(), idVect.end());
44 using RdoPairs = std::array<const xAOD::NRPCRDO*, 2>;
49 cabling.subDetector = rdo->subdetector();
50 cabling.tdcSector = rdo->tdcsector();
52 cabling.channelId = rdo->channel();
56 return StatusCode::FAILURE;
61 return StatusCode::FAILURE;
63 if (hashToSelect.size() && !hashToSelect.count(
m_idHelperSvc->moduleHash(offId))) {
68 const bool stripSide =
cabling.stripSide();
69 sortedRdos[offId][stripSide] = rdo;
73 ATH_CHECK(stripHandle.record(std::make_unique<xAOD::RpcStripContainer>(),
74 std::make_unique<xAOD::RpcStripAuxContainer>()));
79 ATH_CHECK(strip2DHandle.record(std::make_unique<xAOD::RpcStrip2DContainer>(),
80 std::make_unique<xAOD::RpcStrip2DAuxContainer>()));
91 outputMeas->setIdentifierHash(
m_idHelperSvc->detElementHash(offId));
92 outputMeas->setReadoutElement(reElement);
93 outputMeas->setIdentifier(offId.get_compact());
94 outputMeas->setDoubletPhi(idHelper.doubletPhi(offId));
95 outputMeas->setGasGap(idHelper.gasGap(offId));
96 outputMeas->setStripNumber(idHelper.channel(offId));
97 outputMeas->setTimeOverThreshold(rdo->timeoverthr());
99 outputMeas->setTime(rdo->time());
105 for (
const auto& [offId, rdoPairs] : sortedRdos) {
110 CheckVector2D stripPos = design.center(idHelper.channel(offId));
115 const double stripLocX = (*stripPos).x();
116 const double stripCovX =
std::pow(design.stripPitch(), 2) / std::sqrt(12.);
119 xAOD::RpcStrip2D* measurement = strip2DHandle->push_back(std::make_unique<xAOD::RpcStrip2D>());
126 lCov(0,0) = stripCovX;
131 setMeasValues(measurement, rdoPairs[0], offId);
136 xAOD::RpcStrip* strip = stripHandle->push_back(std::make_unique<xAOD::RpcStrip>());
140 lCov(0,0) = stripCovX;
142 strip->setMeasuresPhi(idHelper.measuresPhi(offId));
144 strip->setMeasurement<1>(0, lPos, lCov);
145 setMeasValues(strip, rdoPairs[0] ? rdoPairs[0] : rdoPairs[1], offId);
147 return StatusCode::SUCCESS;
151 const std::vector<uint32_t>& robIds)
const {
158 ATH_CHECK(stripHandle.record(std::make_unique<xAOD::RpcStripContainer>(),
159 std::make_unique<xAOD::RpcStripAuxContainer>()));
163 ATH_CHECK(strip2DHandle.record(std::make_unique<xAOD::RpcStrip2DContainer>(),
164 std::make_unique<xAOD::RpcStrip2DAuxContainer>()));
167 return StatusCode::SUCCESS;