23 return StatusCode::SUCCESS;
30 std::vector<Muon::sTgcPrepData>&& stripsVect,
31 std::vector<std::unique_ptr<Muon::sTgcPrepData>>& clustersVect)
const {
33 ATH_MSG_DEBUG(
"Size of the input vector: " << stripsVect.size());
35 if (stripsVect.empty())
return StatusCode::SUCCESS;
39 Identifier chanId = stripsVect.at(0).identify();
40 IdentifierHash
hash = m_idHelperSvc->moduleHash(chanId);
44 ATH_MSG_DEBUG(
" channelType " << m_idHelperSvc->stgcIdHelper().channelType(chanId));
48 if (!errorCalibDB.isValid()) {
49 ATH_MSG_FATAL(
"Failed to retrieve the parameterized errors "<<m_uncertCalibKey.fullKey());
50 return StatusCode::FAILURE;
54 std::array<std::vector<Muon::sTgcPrepData>, 8> stgcPrdsPerLayer = stgcClusterCommon.
sortSTGCPrdPerLayer(std::move(stripsVect));
56 for (std::vector<Muon::sTgcPrepData>& layPrds : stgcPrdsPerLayer) {
58 std::vector<std::vector<Muon::sTgcPrepData>> layerClusters = stgcClusterCommon.
findStripCluster(std::move(layPrds),
62 for (
const std::vector<Muon::sTgcPrepData>& cluster: layerClusters) {
63 if (cluster.empty())
continue;
69 std::stringstream sstr{};
71 sstr << m_idHelperSvc->toString(prd.identify())
73 <<
"), charge: " << prd.charge() <<
", time: " <<
static_cast<int>(prd.time())
76 ATH_MSG_VERBOSE(
"Reject invalid cluster..." << std::endl << std::endl << sstr.str());
81 Identifier clusterId = (*optClusterPos).getClusterId();
82 double posY = cluster[0].localPosition().y();
85 covN(0,0) = (*optClusterPos).getErrorSquared();
87 std::vector<Identifier> rdoList;
88 std::vector<int> elementsCharge;
89 std::vector<short int> elementsTime;
90 std::vector<uint16_t> elementsChannel;
92 rdoList.push_back(prd.identify());
93 elementsCharge.push_back(prd.charge());
94 elementsChannel.push_back(m_idHelperSvc->stgcIdHelper().channel(prd.identify()));
95 elementsTime.push_back(prd.time());
101 std::unique_ptr<sTgcPrepData> prdN = std::make_unique<sTgcPrepData>(
104 std::move(localPosition),
107 cluster.at(0).detectorElement(),
110 std::move(elementsChannel),
111 std::move(elementsTime),
112 std::move(elementsCharge));
115 clustersVect.push_back(std::move(prdN));
119 ATH_MSG_DEBUG(
"Size of the output cluster vector: " << clustersVect.size());
121 return StatusCode::SUCCESS;
129 for (
const auto&
it : stripsVect ) {
135 for (
auto *
it : clustersVect ) {