56 InDet::PixelClusterCollection::const_iterator clusStart = clusters->begin();
57 InDet::PixelClusterCollection::const_iterator clusFinish = clusters->end();
59 if ((*clusStart)->detectorElement()) {
61 const Amg::Transform3D& T = (*clusStart)->detectorElement()->surface().transform();
62 double Ax[3] = {T(0,0),T(1,0),T(2,0)};
63 double Ay[3] = {T(0,1),T(1,1),T(2,1)};
64 double Az[3] = {T(0,2),T(1,2),T(2,2)};
66 spacepointCollection->
reserve(spacepointCollection->
size()+clusters->size());
68 for(; clusStart!=clusFinish; ++clusStart){
75 double B0[2] = {Ax[0]*V(0,0)+Ax[1]*V(1,0),Ax[0]*V(1,0)+Ax[1]*V(1,1)};
76 double B1[2] = {Ay[0]*V(0,0)+Ay[1]*V(1,0),Ay[0]*V(1,0)+Ay[1]*V(1,1)};
77 double B2[2] = {Az[0]*V(0,0)+Az[1]*V(1,0),Az[0]*V(1,0)+Az[1]*V(1,1)};
79 double C01 = B1[0]*Ax[0]+B1[1]*Ax[1];
80 double C02 = B2[0]*Ax[0]+B2[1]*Ax[1];
81 double C12 = B2[0]*Ay[0]+B2[1]*Ay[1];
84 cov <<
B0[0] * Ax[0] +
B0[1] * Ax[1], C01, C02, C01,
85 B1[0] * Ay[0] + B1[1] * Ay[1], C12,
87 C02, C12, B2[0] * Az[0] + B2[1] * Az[1];
148 std::array<const SCT_ClusterCollection*, nNeighbours>& clusters,
149 std::array<double, 14>& overlapExtents,
178 constexpr int otherSideIndex{1};
179 constexpr int maxEtaIndex{3};
180 std::array<int, nNeighbours-1> elementIndex{};
185 for(
int n=1; n!=nNeighbours; ++n) {
187 elementIndex[nElements++] = n;
191 if(!nElements)
return;
197 std::vector<SCTinformation> sctInfos;
198 sctInfos.reserve(clusters[0]->size());
201 for (
const auto *
const cluster : *clusters[0]) {
205 sctInfos.push_back(sct);
210 std::vector<Trk::SpacePoint*> tmpSpacePoints;
211 tmpSpacePoints.reserve(sctInfos.size());
217 for(; n < nElements; ++n) {
219 int currentIndex = elementIndex[n];
221 if(currentIndex > maxEtaIndex)
break;
225 IdentifierHash currentId = clusters[currentIndex]->identifyHash();
228 double min = overlapExtents[currentIndex*2-2];
229 double max = overlapExtents[currentIndex*2-1];
241 double lx1_offset = 0.;
250 for (
const auto *
const cluster : *clusters[currentIndex]) {
252 bool processed =
false;
254 double lx1 = locpos.x();
257 for(
auto& sct : sctInfos) {
259 double diff = lx1+lx1_offset-sct.locX();
270 sctInfo.
set(cluster,ends.first, ends.second, vertexVec,lx1);
274 sct, sctInfo, Id, currentId, limit, slimit, dataItemsSCT);
276 tmpSpacePoints.push_back(
sp);
282 if( currentIndex==otherSideIndex && !tmpSpacePoints.empty() ) {
283 spacepointCollection->
reserve(tmpSpacePoints.size()+spacepointCollection->
size());
287 tmpSpacePoints.clear();
293 for(; n < nElements; ++n) {
295 int currentIndex = elementIndex[n];
298 double min = overlapExtents[4*currentIndex-10];
299 double max = overlapExtents[4*currentIndex- 9];
305 std::vector<SCTinformation*> sctPhiInfos;
306 sctPhiInfos.reserve(sctInfos.size());
308 for(
auto& sct : sctInfos) {
309 double lx0 = sct.locX();
310 if (
min <= lx0 && lx0 <=
max) {
311 sctPhiInfos.push_back(&sct);
315 if(sctPhiInfos.empty())
continue;
317 IdentifierHash currentId = clusters[currentIndex]->identifyHash();
319 min = overlapExtents[4*currentIndex-8];
320 max = overlapExtents[4*currentIndex-7];
326 for (
const auto *
const cluster : *clusters[currentIndex]) {
329 double lx1 = locpos.x();
330 if(lx1 < min || lx1 >
max )
continue;
335 for(
auto& sct : sctPhiInfos) {
337 *sct, sctInfo, Id, currentId, limit, slimit, dataItemsSCT);
339 tmpSpacePoints.push_back(
sp);
346 if(!tmpSpacePoints.empty()) {
347 spacepointoverlapCollection->
reserve(tmpSpacePoints.size()+spacepointoverlapCollection->
size());
357 for(
int n=0; n!=nElements; ++n) {
359 int currentIndex = elementIndex[n];
361 IdentifierHash currentId = clusters[currentIndex]->identifyHash();
364 offset(element, currentElement, slimit);
367 for (
const auto *
const cluster : *clusters[currentIndex]) {
373 for(
auto& sct : sctInfos) {
376 tmpSpacePoints.push_back(
sp);
382 if( currentIndex==otherSideIndex && !tmpSpacePoints.empty() ) {
383 spacepointCollection->
reserve(tmpSpacePoints.size()+spacepointCollection->
size());
387 tmpSpacePoints.clear();
391 if(!tmpSpacePoints.empty()) {
392 spacepointoverlapCollection->
reserve(tmpSpacePoints.size()+spacepointoverlapCollection->
size());