ATLAS Offline Software
Loading...
Searching...
No Matches
MuonML::LayerSpBucket Class Reference

The LayerSpBucket is a space pointbucket where the points are internally sorted by their layer number as defined in the SpacePointLayerSorter. More...

#include <LayerBucket.h>

Inheritance diagram for MuonML::LayerSpBucket:
Collaboration diagram for MuonML::LayerSpBucket:

Public Member Functions

 LayerSpBucket (const MuonR4::SpacePointBucket &bucket)
 Standard constructor taking the space point bucket.
uint8_t nMdtLayers () const
 Returns how many Mdt layers are inside the bucket.
uint8_t nStripLayers () const
 Returns how many Strip layers are inside the bucket.
uint8_t layerNum (const size_t i) const
 Returns the associated layer number of the i-the space point inside the bucket.
double coveredMax () const
 Returns the max covered position of the bucket.
double coveredMin () const
 Returns the min covered position of the bucket.

Public Attributes

elements
 STL member.

Private Attributes

uint8_t m_nMdtLay {0}
uint8_t m_nStripLay {0}
std::vector< uint8_t > m_layNum {}
double m_min {-20. *Gaudi::Units::m}
double m_max {20. * Gaudi::Units::m}

Detailed Description

The LayerSpBucket is a space pointbucket where the points are internally sorted by their layer number as defined in the SpacePointLayerSorter.

The bucket also provides the layer number tag for each space point & the number of total layers

Definition at line 14 of file LayerBucket.h.

Constructor & Destructor Documentation

◆ LayerSpBucket()

MuonML::LayerSpBucket::LayerSpBucket ( const MuonR4::SpacePointBucket & bucket)

Standard constructor taking the space point bucket.

Definition at line 10 of file LayerBucket.cxx.

10 :
11 m_min{bucket.coveredMin()},
12 m_max{bucket.coveredMax()} {
13 reserve(bucket.size());
14 m_layNum.resize(bucket.size());
15 std::vector<uint8_t>::iterator layItr{m_layNum.begin()};
16 const MuonR4::SpacePointPerLayerSplitter splitter {bucket};
17 uint8_t globLayer{0};
18 m_nMdtLay = splitter.mdtHits().size();
19 m_nStripLay = splitter.stripHits().size();
20
21 for (const HitVec& spInLay : splitter.mdtHits()) {
22 for (const MuonR4::SpacePoint* spacePoint: spInLay) {
23 push_back(spacePoint);
24 (*layItr++) = globLayer;
25 }
26 ++globLayer;
27 }
28 for (const HitVec& spInLay : splitter.stripHits()) {
29 for (const MuonR4::SpacePoint* spacePoint: spInLay) {
30 push_back(spacePoint);
31 (*layItr++) = globLayer;
32 }
33 ++globLayer;
34 }
35 }
std::vector< uint8_t > m_layNum
Definition LayerBucket.h:41
const HitLayVec & mdtHits() const
Returns the sorted Mdt hits.
const HitLayVec & stripHits() const
Returns the sorted strip hits.
MuonR4::SpacePointPerLayerSplitter::HitVec HitVec

Member Function Documentation

◆ coveredMax()

double MuonML::LayerSpBucket::coveredMax ( ) const
inline

Returns the max covered position of the bucket.

Definition at line 31 of file LayerBucket.h.

31 {
32 return m_max;
33 }

◆ coveredMin()

double MuonML::LayerSpBucket::coveredMin ( ) const
inline

Returns the min covered position of the bucket.

Definition at line 35 of file LayerBucket.h.

35 {
36 return m_min;
37 }

◆ layerNum()

uint8_t MuonML::LayerSpBucket::layerNum ( const size_t i) const
inline

Returns the associated layer number of the i-the space point inside the bucket.

Definition at line 27 of file LayerBucket.h.

27 {
28 return m_layNum[i];
29 }

◆ nMdtLayers()

uint8_t MuonML::LayerSpBucket::nMdtLayers ( ) const
inline

Returns how many Mdt layers are inside the bucket.

Definition at line 19 of file LayerBucket.h.

19 {
20 return m_nMdtLay;
21 }

◆ nStripLayers()

uint8_t MuonML::LayerSpBucket::nStripLayers ( ) const
inline

Returns how many Strip layers are inside the bucket.

Definition at line 23 of file LayerBucket.h.

23 {
24 return m_nStripLay;
25 }

Member Data Documentation

◆ elements

T std::vector< T >::elements
inherited

STL member.

◆ m_layNum

std::vector<uint8_t> MuonML::LayerSpBucket::m_layNum {}
private

Definition at line 41 of file LayerBucket.h.

41{};

◆ m_max

double MuonML::LayerSpBucket::m_max {20. * Gaudi::Units::m}
private

Definition at line 43 of file LayerBucket.h.

43{20. * Gaudi::Units::m};

◆ m_min

double MuonML::LayerSpBucket::m_min {-20. *Gaudi::Units::m}
private

Definition at line 42 of file LayerBucket.h.

42{-20. *Gaudi::Units::m};

◆ m_nMdtLay

uint8_t MuonML::LayerSpBucket::m_nMdtLay {0}
private

Definition at line 39 of file LayerBucket.h.

39{0};

◆ m_nStripLay

uint8_t MuonML::LayerSpBucket::m_nStripLay {0}
private

Definition at line 40 of file LayerBucket.h.

40{0};

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