ATLAS Offline Software
Loading...
Searching...
No Matches
SpacePointPerLayerSplitter.cxx
Go to the documentation of this file.
1
2/*
3 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4*/
9
10#include "Acts/Utilities/Helpers.hpp"
11namespace MuonR4 {
15
17 if (hits.empty()) return;
18
19 const Muon::IMuonIdHelperSvc* idHelperSvc {hits.front()->msSector()->idHelperSvc()};
20 const MdtIdHelper& idHelper {idHelperSvc->mdtIdHelper()};
21 const SpacePointPerLayerSorter laySorter{};
22
23 HitVec::const_iterator itr = hits.begin();
24
25 while (itr != hits.end()) {
26 const unsigned int refLay = laySorter.sectorLayerNum(**itr);
27
28 HitVec::const_iterator end_insert = std::find_if(itr, hits.end(),[&refLay,&laySorter](const SpacePoint* testMe) {
29 return refLay != laySorter.sectorLayerNum(*testMe);
30 });
31
32 const bool isMdt = (*itr)->type() == xAOD::UncalibMeasType::MdtDriftCircleType;
33 HitLayVec& pushMe{ isMdt ? m_mdtLayers : m_stripLayers};
34 if (isMdt && !pushMe.empty()){
35 if (idHelper.multilayer((*itr)->identify()) != idHelper.multilayer(pushMe.back().front()->identify())) {
36 m_tubeLaySwitch = pushMe.size();
37 }
38 }
39
40 (isMdt ? m_nMdtHits : m_nStripHits) += pushMe.emplace_back(itr, end_insert).size();
41 itr = end_insert;
42 }
43 }
44}
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
unsigned int m_nMdtHits
Number of all Mdt tube hits.
HitLayVec m_mdtLayers
Sorted Mdt hits per tube layer.
HitLayVec m_stripLayers
Sorted Strip hits per gasGap strip.
std::vector< const SpacePoint * > HitVec
SpacePointPerLayerSplitter(const SpacePointBucket &bucket)
Constructor taking a complete bucket.
unsigned int m_nStripHits
Number of all strip hits.
unsigned int m_tubeLaySwitch
Index of the first tube-layer from the second multilayer.
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