ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::SpacePointPerLayerSplitter Class Reference

The SpacePointPerLayerSplitter takes a set of spacepoints already sorted by layer Identifier (see MuonSpacePoint/SpacePointPerLayerSorter.h) and splits them into two sets of hits, one for MDT hits and the other one for strip detector hits. More...

#include <SpacePointPerLayerSplitter.h>

Inheritance diagram for MuonR4::SpacePointPerLayerSplitter:
Collaboration diagram for MuonR4::SpacePointPerLayerSplitter:

Public Types

using HitVec = std::vector<const SpacePoint*>
using HitLayVec = std::vector<HitVec>

Public Member Functions

 SpacePointPerLayerSplitter (const SpacePointBucket &bucket)
 Constructor taking a complete bucket.
 SpacePointPerLayerSplitter (const HitVec &vec)
 Constructor taking a subset of SpacePoints.
const HitLayVecmdtHits () const
 Returns the sorted Mdt hits.
const HitLayVecstrawHits () const
 Returns the sorted Mdt hits.
std::size_t nMdtHits () const
 Returns the number of all Mdt hits in the seed.
const HitLayVecstripHits () const
 Returns the sorted strip hits.
std::size_t nStripHits () const
 Returns the number of all strip hits in the seed.
std::size_t firstLayerFrom2ndMl () const
 Returns the layer index with hits from the second multilayer.

Private Attributes

HitLayVec m_mdtLayers {}
 Sorted Mdt hits per tube layer.
HitLayVec m_stripLayers {}
 Sorted Strip hits per gasGap strip.
std::size_t m_nMdtHits {0}
 Number of all Mdt tube hits.
std::size_t m_nStripHits {0}
 Number of all strip hits.
std::size_t m_tubeLaySwitch {std::numeric_limits<std::size_t>::max()}
 Index of the first tube-layer from the second multilayer.

Detailed Description

The SpacePointPerLayerSplitter takes a set of spacepoints already sorted by layer Identifier (see MuonSpacePoint/SpacePointPerLayerSorter.h) and splits them into two sets of hits, one for MDT hits and the other one for strip detector hits.

Each of these set contains the hits grouped by Layer Identifier.

Definition at line 18 of file SpacePointPerLayerSplitter.h.

Member Typedef Documentation

◆ HitLayVec

Definition at line 21 of file SpacePointPerLayerSplitter.h.

◆ HitVec

Definition at line 20 of file SpacePointPerLayerSplitter.h.

Constructor & Destructor Documentation

◆ SpacePointPerLayerSplitter() [1/2]

MuonR4::SpacePointPerLayerSplitter::SpacePointPerLayerSplitter ( const SpacePointBucket & bucket)

Constructor taking a complete bucket.

Definition at line 13 of file SpacePointPerLayerSplitter.cxx.

13 :
14 SpacePointPerLayerSplitter(Acts::unpackConstSmartPointers(bucket)){}
SpacePointPerLayerSplitter(const SpacePointBucket &bucket)
Constructor taking a complete bucket.

◆ SpacePointPerLayerSplitter() [2/2]

MuonR4::SpacePointPerLayerSplitter::SpacePointPerLayerSplitter ( const HitVec & vec)

Constructor taking a subset of SpacePoints.

Definition at line 16 of file SpacePointPerLayerSplitter.cxx.

16 {
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 }
int multilayer(const Identifier &id) const
Access to components of the ID.
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::size_t m_nStripHits
Number of all strip hits.
virtual const MdtIdHelper & mdtIdHelper() const =0
access to MdtIdHelper

Member Function Documentation

◆ firstLayerFrom2ndMl()

std::size_t MuonR4::SpacePointPerLayerSplitter::firstLayerFrom2ndMl ( ) const
inline

Returns the layer index with hits from the second multilayer.

Definition at line 47 of file SpacePointPerLayerSplitter.h.

47 {
48 return m_tubeLaySwitch;
49 }

◆ mdtHits()

const HitLayVec & MuonR4::SpacePointPerLayerSplitter::mdtHits ( ) const
inline

Returns the sorted Mdt hits.

Definition at line 27 of file SpacePointPerLayerSplitter.h.

27 {
28 return m_mdtLayers;
29 }

◆ nMdtHits()

std::size_t MuonR4::SpacePointPerLayerSplitter::nMdtHits ( ) const
inline

Returns the number of all Mdt hits in the seed.

Definition at line 35 of file SpacePointPerLayerSplitter.h.

35 {
36 return m_nMdtHits;
37 }

◆ nStripHits()

std::size_t MuonR4::SpacePointPerLayerSplitter::nStripHits ( ) const
inline

Returns the number of all strip hits in the seed.

Definition at line 43 of file SpacePointPerLayerSplitter.h.

43 {
44 return m_nStripHits;
45 }

◆ strawHits()

const HitLayVec & MuonR4::SpacePointPerLayerSplitter::strawHits ( ) const
inline

Returns the sorted Mdt hits.

Definition at line 31 of file SpacePointPerLayerSplitter.h.

31 {
32 return m_mdtLayers;
33 }

◆ stripHits()

const HitLayVec & MuonR4::SpacePointPerLayerSplitter::stripHits ( ) const
inline

Returns the sorted strip hits.

Definition at line 39 of file SpacePointPerLayerSplitter.h.

39 {
40 return m_stripLayers;
41 }

Member Data Documentation

◆ m_mdtLayers

HitLayVec MuonR4::SpacePointPerLayerSplitter::m_mdtLayers {}
private

Sorted Mdt hits per tube layer.

Definition at line 52 of file SpacePointPerLayerSplitter.h.

52{};

◆ m_nMdtHits

std::size_t MuonR4::SpacePointPerLayerSplitter::m_nMdtHits {0}
private

Number of all Mdt tube hits.

Definition at line 56 of file SpacePointPerLayerSplitter.h.

56{0};

◆ m_nStripHits

std::size_t MuonR4::SpacePointPerLayerSplitter::m_nStripHits {0}
private

Number of all strip hits.

Definition at line 58 of file SpacePointPerLayerSplitter.h.

58{0};

◆ m_stripLayers

HitLayVec MuonR4::SpacePointPerLayerSplitter::m_stripLayers {}
private

Sorted Strip hits per gasGap strip.

Definition at line 54 of file SpacePointPerLayerSplitter.h.

54{};

◆ m_tubeLaySwitch

std::size_t MuonR4::SpacePointPerLayerSplitter::m_tubeLaySwitch {std::numeric_limits<std::size_t>::max()}
private

Index of the first tube-layer from the second multilayer.

Definition at line 60 of file SpacePointPerLayerSplitter.h.

60{std::numeric_limits<std::size_t>::max()};

The documentation for this class was generated from the following files: