ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonPhaseII
Event
MuonSpacePoint
src
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
*/
5
#include "
MuonIdHelpers/MdtIdHelper.h
"
6
#include <
MuonSpacePoint/SpacePointPerLayerSplitter.h
>
7
#include <
MuonIdHelpers/IMuonIdHelperSvc.h
>
8
#include <
MuonSpacePoint/SpacePointPerLayerSorter.h
>
9
10
#include "Acts/Utilities/Helpers.hpp"
11
namespace
MuonR4
{
12
using
HitVec
=
SpacePointPerLayerSplitter::HitVec
;
13
SpacePointPerLayerSplitter::SpacePointPerLayerSplitter
(
const
SpacePointBucket
& bucket):
14
SpacePointPerLayerSplitter
(
Acts
::unpackConstSmartPointers(bucket)){}
15
16
SpacePointPerLayerSplitter::SpacePointPerLayerSplitter
(
const
HitVec
& hits) {
17
if
(hits.empty()) {
18
return
;
19
}
20
const
Muon::IMuonIdHelperSvc
* idHelperSvc {hits.front()->msSector()->idHelperSvc()};
21
const
SpacePointPerLayerSorter
laySorter{};
22
23
HitVec::const_iterator itr = hits.begin();
24
25
while
(itr != hits.end()) {
26
const
std::size_t 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
const
MdtIdHelper
& idHelper = idHelperSvc->
mdtIdHelper
();
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
}
IMuonIdHelperSvc.h
MdtIdHelper.h
SpacePointPerLayerSorter.h
SpacePointPerLayerSplitter.h
MdtIdHelper
Definition
MdtIdHelper.h:61
MdtIdHelper::multilayer
int multilayer(const Identifier &id) const
Access to components of the ID.
Definition
MdtIdHelper.cxx:726
MuonR4::SpacePointBucket
: The muon space point bucket represents a collection of points that will bre processed together in t...
Definition
MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePointContainer.h:21
MuonR4::SpacePointPerLayerSorter
The SpacePointPerLayerSorter sort two given space points by their layer Identifier.
Definition
SpacePointPerLayerSorter.h:15
MuonR4::SpacePointPerLayerSorter::sectorLayerNum
unsigned int sectorLayerNum(const SpacePoint &sp) const
method returning the logic layer number
Definition
SpacePointPerLayerSorter.cxx:13
MuonR4::SpacePointPerLayerSplitter::HitLayVec
std::vector< HitVec > HitLayVec
Definition
SpacePointPerLayerSplitter.h:21
MuonR4::SpacePointPerLayerSplitter::m_tubeLaySwitch
std::size_t m_tubeLaySwitch
Index of the first tube-layer from the second multilayer.
Definition
SpacePointPerLayerSplitter.h:60
MuonR4::SpacePointPerLayerSplitter::m_mdtLayers
HitLayVec m_mdtLayers
Sorted Mdt hits per tube layer.
Definition
SpacePointPerLayerSplitter.h:52
MuonR4::SpacePointPerLayerSplitter::m_stripLayers
HitLayVec m_stripLayers
Sorted Strip hits per gasGap strip.
Definition
SpacePointPerLayerSplitter.h:54
MuonR4::SpacePointPerLayerSplitter::m_nMdtHits
std::size_t m_nMdtHits
Number of all Mdt tube hits.
Definition
SpacePointPerLayerSplitter.h:56
MuonR4::SpacePointPerLayerSplitter::HitVec
std::vector< const SpacePoint * > HitVec
Definition
SpacePointPerLayerSplitter.h:20
MuonR4::SpacePointPerLayerSplitter::SpacePointPerLayerSplitter
SpacePointPerLayerSplitter(const SpacePointBucket &bucket)
Constructor taking a complete bucket.
Definition
SpacePointPerLayerSplitter.cxx:13
MuonR4::SpacePointPerLayerSplitter::m_nStripHits
std::size_t m_nStripHits
Number of all strip hits.
Definition
SpacePointPerLayerSplitter.h:58
MuonR4::SpacePoint
The muon space point is the combination of two uncalibrated measurements one of them measures the eta...
Definition
MuonSpectrometer/MuonPhaseII/Event/MuonSpacePoint/MuonSpacePoint/SpacePoint.h:25
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition
IMuonIdHelperSvc.h:27
Muon::IMuonIdHelperSvc::mdtIdHelper
virtual const MdtIdHelper & mdtIdHelper() const =0
access to MdtIdHelper
Acts
This class is not to needed in AthSimulation.
Definition
MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/xAODMuonPrepData/UtilFunctions.h:23
MuonR4
This header ties the generic definitions in this package.
Definition
GlobalPattern.h:14
MuonR4::HitVec
SpacePointPerLayerSplitter::HitVec HitVec
Definition
SpacePointPerLayerSplitter.cxx:12
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
Definition
MeasurementDefs.h:30
Generated on
for ATLAS Offline Software by
1.17.0