ATLAS Offline Software
Loading...
Searching...
No Matches
SpacePointPerLayerSplitter.cxx
Go to the documentation of this file.
1
2/*
3 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
4*/
9
10#include "Acts/Utilities/Helpers.hpp"
11namespace MuonR4 {
15
17 if (hits.empty()) {
18 return;
19 }
20 const Muon::IMuonIdHelperSvc* idHelperSvc {hits.front()->msSector()->idHelperSvc()};
21 const MdtIdHelper& idHelper {idHelperSvc->mdtIdHelper()};
22 const SpacePointPerLayerSorter laySorter{};
23
24 HitVec::const_iterator itr = hits.begin();
25
26 while (itr != hits.end()) {
27 const std::size_t refLay = laySorter.sectorLayerNum(**itr);
28
29 HitVec::const_iterator end_insert = std::find_if(itr, hits.end(),[&refLay,&laySorter](const SpacePoint* testMe) {
30 return refLay != laySorter.sectorLayerNum(*testMe);
31 });
32
33 const bool isMdt = (*itr)->type() == xAOD::UncalibMeasType::MdtDriftCircleType;
34 HitLayVec& pushMe{isMdt ? m_mdtLayers : m_stripLayers};
35 if (isMdt && !pushMe.empty()){
36 if (idHelper.multilayer((*itr)->identify()) != idHelper.multilayer(pushMe.back().front()->identify())) {
37 m_tubeLaySwitch = pushMe.size();
38 }
39 }
40
41 (isMdt ? m_nMdtHits : m_nStripHits) += pushMe.emplace_back(itr, end_insert).size();
42 itr = end_insert;
43 }
44 }
45}
int multilayer(const Identifier &id) const
Access to components of the ID.
: The muon space point bucket represents a collection of points that will bre processed together in t...
The SpacePointPerLayerSorter sort two given space points by their layer Identifier.
unsigned int sectorLayerNum(const SpacePoint &sp) const
method returning the logic layer number
std::size_t m_tubeLaySwitch
Index of the first tube-layer from the second multilayer.
HitLayVec m_mdtLayers
Sorted Mdt hits per tube layer.
HitLayVec m_stripLayers
Sorted Strip hits per gasGap strip.
std::size_t m_nMdtHits
Number of all Mdt tube hits.
std::vector< const SpacePoint * > HitVec
SpacePointPerLayerSplitter(const SpacePointBucket &bucket)
Constructor taking a complete bucket.
std::size_t m_nStripHits
Number of all strip hits.
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
virtual const MdtIdHelper & mdtIdHelper() const =0
access to MdtIdHelper
This header ties the generic definitions in this package.
SpacePointPerLayerSplitter::HitVec HitVec