39 ISvcLocator* pSvcLocator)
44 declareProperty(
"ProcessOverlaps", m_overlap=
true,
"process overlaps of SCT wafers.");
45 declareProperty(
"AllClusters", m_allClusters=
false,
"process all clusters without limits.");
46 declareProperty(
"OverlapLimitOpposite", m_overlapLimitOpposite=2.8,
"overlap limit for opposite-neighbour.");
47 declareProperty(
"OverlapLimitPhi", m_overlapLimitPhi=5.64,
"overlap limit for phi-neighbours.");
48 declareProperty(
"OverlapLimitEtaMin", m_overlapLimitEtaMin=1.68,
"low overlap limit for eta-neighbours.");
49 declareProperty(
"OverlapLimitEtaMax", m_overlapLimitEtaMax=3.0,
"high overlap limit for eta-neighbours.");
66 ATH_MSG_FATAL(
"SCTs selected and no name set for SCT clusters");
67 return StatusCode::FAILURE;
72 ATH_MSG_FATAL(
"Pixels selected and no name set for Pixel clusters");
73 return StatusCode::FAILURE;
79 return StatusCode::FAILURE;
85 return StatusCode::FAILURE;
91 return StatusCode::FAILURE;
117 return StatusCode::SUCCESS;
135 elements = sctDetEle.retrieve();
136 if (elements==
nullptr) {
138 return StatusCode::SUCCESS;
144 return StatusCode::SUCCESS;
147 SPFCache r_cache(ctx);
151 r_cache.vertex =
beamSpot->beamVtx().position();
158 std::unique_ptr<DataPool<PixelSpacePoint>> dataItemsPixel =
nullptr;
167 ATH_CHECK( spacePointContainerPixel.
record( std::make_unique<SpacePointContainer>(updateH.ptr()) ) );
171 if (!hasExternalCache) {
172 dataItemsPixel = std::make_unique<DataPool<PixelSpacePoint>>(ctx);
173 dataItemsPixel->reserve(5000);
175 dataItemsPixel = std::make_unique<DataPool<PixelSpacePoint>>(ctx);
181 std::unique_ptr<DataPool<SCT_SpacePoint>> dataItemsSCT =
nullptr;
190 ATH_CHECK( spacePointContainer_SCT.
record( std::make_unique<SpacePointContainer>(updateH.ptr()) ) );
194 if (!hasExternalCache) {
195 dataItemsSCT = std::make_unique<DataPool<SCT_SpacePoint>>(ctx);
196 dataItemsSCT->reserve(10000);
198 dataItemsSCT = std::make_unique<DataPool<SCT_SpacePoint>>(ctx);
206 ATH_CHECK( spacepointoverlapCollection.
record( std::make_unique<SpacePointOverlapCollection>() ) );
211 ATH_MSG_DEBUG(
"Container '" << spacepointoverlapCollection.
name() <<
"' initialised" );
214 int sctCacheCount = 0;
215 int pixCacheCount = 0;
220 if (!sct_clcontainer.isValid()){
221 msg(
MSG:: FATAL) <<
"Could not find the data object "<< sct_clcontainer.name() <<
" !" <<
endmsg;
222 return StatusCode::RECOVERABLE;
225 r_cache.SCTCContainer = sct_clcontainer.cptr();
227 ATH_MSG_DEBUG(
"SCT Cluster container found: " << sct_clcontainer->size() <<
" collections" );
233 SCT_ClusterContainer::const_iterator
it = sct_clcontainer->begin();
234 SCT_ClusterContainer::const_iterator itend = sct_clcontainer->end();
236 for (;
it != itend; ++
it){
243 ATH_MSG_DEBUG(
"SCT Hash " << idHash <<
" is already in cache");
249 auto spacepointCollection = std::make_unique<SpacePointCollection>(idHash);
250 spacepointCollection->setIdentifier(elementID);
258 colNext,
properties, elements, spacepointCollection.get(),
259 spacepointoverlapCollection.
ptr(), r_cache, dataItemsSCT.get());
264 size_t size = spacepointCollection->size();
266 ATH_MSG_VERBOSE(
"SiTrackerSpacePointFinder algorithm found no space points" );
272 return StatusCode::RECOVERABLE;
275 nReceivedSPsSCT +=
size;
285 if (!pixel_clcontainer.isValid()){
286 msg(
MSG:: FATAL) <<
"Could not find the data object "<< pixel_clcontainer.name() <<
" !" <<
endmsg;
287 return StatusCode::RECOVERABLE;
290 ATH_MSG_DEBUG(
"Data object " << pixel_clcontainer.name() <<
" found" );
293 PixelClusterContainer::const_iterator colNext = pixel_clcontainer->begin();
294 PixelClusterContainer::const_iterator lastCol = pixel_clcontainer->end();
298 for (; colNext != lastCol; ++colNext)
304 ATH_MSG_DEBUG(
"pixel Hash " << idHash <<
" is already in cache");
309 Identifier elementID = (*colNext)->identify();
310 auto spacepointCollection = std::make_unique< SpacePointCollection >(idHash);
311 spacepointCollection->setIdentifier(elementID);
317 if (!(*colNext)->empty())
320 *colNext, spacepointCollection.get(), dataItemsPixel.get());
324 size_t size = spacepointCollection->size();
327 ATH_MSG_DEBUG(
"SiTrackerSpacePointFinder algorithm found no space points" );
335 return StatusCode::RECOVERABLE;
338 <<
" SpacePoints successfully added to Container !" );
339 nReceivedSPsPIX +=
size;
348 if (spacepointoverlapCollection->
empty())
354 ATH_MSG_DEBUG( spacepointoverlapCollection->
size() <<
" overlap space points registered." );
364 return StatusCode::SUCCESS;
380 return StatusCode::SUCCESS;
429 std::array<const SCT_ClusterCollection*, nNeighbours> neighbourClusters{};
430 std::array<const InDetDD::SiDetectorElement*, nNeighbours> neighbourElements{};
431 std::array<double, 14> overlapExtents{};
439 const std::vector<IdentifierHash>* others(
properties->neighbours(triggerIdHash));
440 if (others==
nullptr || others->empty() )
return;
443 neighbourElements[0] = triggerElement;
444 neighbourClusters[0] = sctClusters;
456 float hwidth(
properties->halfWidth(triggerIdHash));
469 for (
const auto& otherHash : *others) {
475 if(!otherElement || !otherClusters)
continue;
477 neighbourElements[neigbourIndices[
n]] = otherElement;
478 neighbourClusters[neigbourIndices[
n]] = otherClusters;
488 overlapExtents[ 6] =-hwidth;
491 overlapExtents[ 9] = hwidth;
496 overlapExtents[11] = hwidth;
497 overlapExtents[12] =-hwidth;
526 neighbourElements, neighbourClusters, overlapExtents,
m_allClusters,
527 r_cache.
vertex, spacepointCollection, spacepointOverlapCollection,