243 constexpr
int otherSideIndex{1};
244 constexpr
int maxEtaIndex{3};
252 elementIndex[nElements++] =
n;
256 if(!nElements)
return StatusCode::SUCCESS;
260 bool isEndcap = element->
isEndcap();
262 std::vector<StripInformationHelper> stripInfos;
266 for (
auto& cluster_index :
clusters[0]) {
267 size_t stripIndex = -1;
268 auto ends =
getStripEnds(cluster_index.first, element, stripIndex);
269 const auto& localPos = cluster_index.first->localPosition<1>();
270 StripInformationHelper stripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, localPos(0, 0), cluster_index.second, stripIndex);
271 stripInfos.push_back( std::move(stripInfo) );
280 for(;
n < nElements; ++
n) {
281 int currentIndex = elementIndex[
n];
282 if(currentIndex > maxEtaIndex)
break;
288 double min = overlapExtents[currentIndex*2-2];
289 double max = overlapExtents[currentIndex*2-1];
299 for (
auto& cluster_index :
clusters[currentIndex]) {
300 bool processed =
false;
301 const auto& currentLocalPos = cluster_index.first->localPosition<1>();
303 for(
auto& stripInfo : stripInfos) {
304 double diff = currentLocalPos(0, 0)-stripInfo.locX();
306 if(diff < min || diff >
max)
continue;
310 size_t currentStripIndex = 0;
311 auto ends =
getStripEnds(cluster_index.first, currentElement, currentStripIndex);
312 currentStripInfo.set(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
316 if (currentIndex==otherSideIndex) {
326 for(;
n < nElements; ++
n) {
327 int currentIndex = elementIndex[
n];
330 double min = overlapExtents[4*currentIndex-10];
331 double max = overlapExtents[4*currentIndex- 9];
341 std::vector<StripInformationHelper*> stripPhiInfos;
342 stripPhiInfos.reserve(stripInfos.size());
344 for(
auto& stripInfo : stripInfos) {
345 auto stripIndex = stripInfo.stripIndex();
346 auto localPosition = stripInfo.locX();
347 auto centralValue = localPosition;
351 centralValue = stripIndex;
357 stripPhiInfos.push_back(&stripInfo);
361 if(stripPhiInfos.empty())
continue;
363 min = overlapExtents[4*currentIndex-8];
364 max = overlapExtents[4*currentIndex-7];
371 for (
auto& cluster_index :
clusters[currentIndex]) {
372 const auto& currentLocalPos = cluster_index.first->localPosition<1>();
374 size_t currentStripIndex = 0;
375 auto ends =
getStripEnds(cluster_index.first, currentElement, currentStripIndex);
376 StripInformationHelper currentStripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
377 auto centralValue = currentLocalPos(0, 0);
381 centralValue = currentStripIndex;
386 if (centralValue < minValue or centralValue >
maxValue)
389 for(
auto& stripInfo : stripPhiInfos) {
394 return StatusCode::SUCCESS;
397 for(
int n=0;
n!=nElements; ++
n) {
399 int currentIndex = elementIndex[
n];
403 offset(element, currentElement, slimit);
406 for (
auto& cluster_index :
clusters[currentIndex]) {
407 size_t currentStripIndex = 0;
408 auto ends =
getStripEnds(cluster_index.first, element, currentStripIndex);
409 const auto& currentLocalPos = cluster_index.first->localPosition<1>();
410 StripInformationHelper currentStripInfo(cluster_index.first->identifierHash(), ends.first, ends.second, beamSpotVertex, currentLocalPos(0, 0), cluster_index.second, currentStripIndex);
412 for(
auto& stripInfo : stripInfos) {
414 if (currentIndex==otherSideIndex) {
422 return StatusCode::SUCCESS;