38 ISvcLocator* pSvcLocator)
47 ATH_MSG_FATAL(
"SCTs selected and no name set for SCT clusters");
48 return StatusCode::FAILURE;
53 ATH_MSG_FATAL(
"Pixels selected and no name set for Pixel clusters");
54 return StatusCode::FAILURE;
60 return StatusCode::FAILURE;
66 return StatusCode::FAILURE;
72 return StatusCode::FAILURE;
99 ATH_MSG_INFO(
"Use SCT SP overlap cuts based on layer number parity");
101 return StatusCode::SUCCESS;
119 elements = sctDetEle.retrieve();
120 if (elements==
nullptr) {
122 return StatusCode::SUCCESS;
128 return StatusCode::SUCCESS;
131 SPFCache r_cache(ctx);
135 r_cache.vertex =
beamSpot->beamVtx().position();
142 std::unique_ptr<DataPool<PixelSpacePoint>> dataItemsPixel =
nullptr;
151 ATH_CHECK( spacePointContainerPixel.
record( std::make_unique<SpacePointContainer>(updateH.ptr()) ) );
155 if (!hasExternalCache) {
156 dataItemsPixel = std::make_unique<DataPool<PixelSpacePoint>>(ctx);
157 dataItemsPixel->reserve(5000);
159 dataItemsPixel = std::make_unique<DataPool<PixelSpacePoint>>(ctx);
165 std::unique_ptr<DataPool<SCT_SpacePoint>> dataItemsSCT =
nullptr;
174 ATH_CHECK( spacePointContainer_SCT.
record( std::make_unique<SpacePointContainer>(updateH.ptr()) ) );
178 if (!hasExternalCache) {
179 dataItemsSCT = std::make_unique<DataPool<SCT_SpacePoint>>(ctx);
180 dataItemsSCT->reserve(10000);
182 dataItemsSCT = std::make_unique<DataPool<SCT_SpacePoint>>(ctx);
190 ATH_CHECK( spacepointoverlapCollection.
record( std::make_unique<SpacePointOverlapCollection>() ) );
195 ATH_MSG_DEBUG(
"Container '" << spacepointoverlapCollection.
name() <<
"' initialised" );
198 int sctCacheCount = 0;
199 int pixCacheCount = 0;
204 if (!sct_clcontainer.isValid()){
205 msg(
MSG:: FATAL) <<
"Could not find the data object "<< sct_clcontainer.name() <<
" !" <<
endmsg;
206 return StatusCode::RECOVERABLE;
209 r_cache.SCTCContainer = sct_clcontainer.cptr();
211 ATH_MSG_DEBUG(
"SCT Cluster container found: " << sct_clcontainer->size() <<
" collections" );
217 SCT_ClusterContainer::const_iterator
it = sct_clcontainer->begin();
218 SCT_ClusterContainer::const_iterator itend = sct_clcontainer->end();
220 for (;
it != itend; ++
it){
227 ATH_MSG_DEBUG(
"SCT Hash " << idHash <<
" is already in cache");
233 auto spacepointCollection = std::make_unique<SpacePointCollection>(idHash);
234 spacepointCollection->setIdentifier(elementID);
242 colNext,
properties, elements, spacepointCollection.get(),
243 spacepointoverlapCollection.
ptr(), r_cache, dataItemsSCT.get());
248 size_t size = spacepointCollection->size();
250 ATH_MSG_VERBOSE(
"SiTrackerSpacePointFinder algorithm found no space points" );
256 return StatusCode::RECOVERABLE;
259 nReceivedSPsSCT +=
size;
269 if (!pixel_clcontainer.isValid()){
270 msg(
MSG:: FATAL) <<
"Could not find the data object "<< pixel_clcontainer.name() <<
" !" <<
endmsg;
271 return StatusCode::RECOVERABLE;
274 ATH_MSG_DEBUG(
"Data object " << pixel_clcontainer.name() <<
" found" );
277 PixelClusterContainer::const_iterator colNext = pixel_clcontainer->begin();
278 PixelClusterContainer::const_iterator lastCol = pixel_clcontainer->end();
282 for (; colNext != lastCol; ++colNext)
288 ATH_MSG_DEBUG(
"pixel Hash " << idHash <<
" is already in cache");
293 Identifier elementID = (*colNext)->identify();
294 auto spacepointCollection = std::make_unique< SpacePointCollection >(idHash);
295 spacepointCollection->setIdentifier(elementID);
301 if (!(*colNext)->empty())
304 *colNext, spacepointCollection.get(), dataItemsPixel.get());
308 size_t size = spacepointCollection->size();
311 ATH_MSG_DEBUG(
"SiTrackerSpacePointFinder algorithm found no space points" );
319 return StatusCode::RECOVERABLE;
322 <<
" SpacePoints successfully added to Container !" );
323 nReceivedSPsPIX +=
size;
332 if (spacepointoverlapCollection->
empty())
338 ATH_MSG_DEBUG( spacepointoverlapCollection->
size() <<
" overlap space points registered." );
348 return StatusCode::SUCCESS;
364 return StatusCode::SUCCESS;
413 std::array<const SCT_ClusterCollection*, nNeighbours> neighbourClusters{};
414 std::array<const InDetDD::SiDetectorElement*, nNeighbours> neighbourElements{};
415 std::array<double, 14> overlapExtents{};
423 const std::vector<IdentifierHash>* others(
properties->neighbours(triggerIdHash));
424 if (others==
nullptr || others->empty() )
return;
427 neighbourElements[0] = triggerElement;
428 neighbourClusters[0] = sctClusters;
440 float hwidth(
properties->halfWidth(triggerIdHash));
453 for (
const auto& otherHash : *others) {
459 if(!otherElement || !otherClusters)
continue;
461 neighbourElements[neigbourIndices[
n]] = otherElement;
462 neighbourClusters[neigbourIndices[
n]] = otherClusters;
472 overlapExtents[ 6] =-hwidth;
475 overlapExtents[ 9] = hwidth;
480 overlapExtents[11] = hwidth;
481 overlapExtents[12] =-hwidth;
508 neighbourElements, neighbourClusters, overlapExtents,
m_allClusters,
509 r_cache.
vertex, spacepointCollection, spacepointOverlapCollection,