20 return StatusCode::SUCCESS;
26 ATH_MSG_ERROR(
"No input xAOD Pixel Cluster container key provided");
27 return StatusCode::FAILURE;
30 ATH_MSG_ERROR(
"No input xAOD Strip Cluster container key provided");
31 return StatusCode::FAILURE;
35 if (!xAODPixelClusters.
isValid()) {
37 return StatusCode::FAILURE;
40 if (!xAODStripClusters.
isValid()) {
42 return StatusCode::FAILURE;
46 auto sortedxAODPixelClusters = std::make_unique<ConstDataVector<xAOD::PixelClusterContainer>>(
SG::VIEW_ELEMENTS);
50 auto sortedxAODStripClusters = std::make_unique<ConstDataVector<xAOD::StripClusterContainer>>(
SG::VIEW_ELEMENTS);
55 std::vector<const xAOD::PixelCluster*> pixelClustersVec;
56 pixelClustersVec.reserve(xAODPixelClusters->
size());
58 pixelClustersVec.push_back(
cl);
62 std::sort(pixelClustersVec.begin(), pixelClustersVec.end(),
64 return a->identifierHash() < b->identifierHash();
69 sortedxAODPixelClusters->push_back(
cl);
73 std::vector<const xAOD::StripCluster*> stripClustersVec;
74 stripClustersVec.reserve(xAODStripClusters->
size());
76 stripClustersVec.push_back(
cl);
80 std::sort(stripClustersVec.begin(), stripClustersVec.end(),
82 return a->identifierHash() < b->identifierHash();
87 sortedxAODStripClusters->push_back(
cl);
90 ATH_CHECK(sortedxAODPixelClustersHandle.record(std::move(sortedxAODPixelClusters)));
91 ATH_CHECK(sortedxAODStripClustersHandle.record(std::move(sortedxAODStripClusters)));
96 return StatusCode::SUCCESS;