Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | List of all members
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>

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
More...
 
 SpacePointPerLayerSplitter (const HitVec &vec)
 Constructor taking a subset of SpacePoints. More...
 
const HitLayVecmdtHits () const
 Returns the sorted Mdt hits. More...
 
unsigned int nMdtHits () const
 Returns the number of all Mdt hits in the seed. More...
 
const HitLayVecstripHits () const
 Returns the sorted strip hits. More...
 
unsigned int nStripHits () const
 Returns the number of all strip hits in the seed. More...
 
unsigned int firstLayerFrom2ndMl () const
 Returns the layer index with hits from the second multilayer
More...
 

Private Attributes

HitLayVec m_mdtLayers {}
 Sorted Mdt hits per tube layer. More...
 
HitLayVec m_stripLayers {}
 Sorted Strip hits per gasGap strip
More...
 
unsigned int m_nMdtHits {0}
 Number of all Mdt tube hits
More...
 
unsigned int m_nStripHits {0}
 Number of all strip hits. More...
 
unsigned int m_tubeLaySwitch {0}
 Index of the first tube-layer from the second multilayer. More...
 

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 16 of file SpacePointPerLayerSplitter.h.

Member Typedef Documentation

◆ HitLayVec

Definition at line 19 of file SpacePointPerLayerSplitter.h.

◆ HitVec

Definition at line 18 of file SpacePointPerLayerSplitter.h.

Constructor & Destructor Documentation

◆ SpacePointPerLayerSplitter() [1/2]

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

Constructor taking a complete bucket

Definition at line 19 of file SpacePointPerLayerSplitter.cxx.

19  :

◆ SpacePointPerLayerSplitter() [2/2]

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

Constructor taking a subset of SpacePoints.

Definition at line 22 of file SpacePointPerLayerSplitter.cxx.

22  {
23  if (hits.empty()) return;
24 
25  const Muon::IMuonIdHelperSvc* idHelperSvc {hits.front()->msSector()->idHelperSvc()};
26  const MdtIdHelper& idHelper {idHelperSvc->mdtIdHelper()};
27  SpacePointPerLayerSorter laySorter{idHelperSvc};
28 
29  HitVec::const_iterator itr = hits.begin();
30 
31  while (itr != hits.end()) {
32  const Identifier refId = laySorter.detectorLayerId((*itr)->identify());
33 
34  HitVec::const_iterator end_insert = std::find_if(itr, hits.end(),[&refId,&laySorter](const SpacePoint* testMe) {
35  return refId != laySorter.detectorLayerId(testMe->identify());
36  });
37 
38  const bool isMdt = (*itr)->type() == xAOD::UncalibMeasType::MdtDriftCircleType;
39  HitLayVec& pushMe{ isMdt ? m_mdtLayers : m_stripLayers};
40  if (isMdt && !pushMe.empty()){
41  if (idHelper.multilayer((*itr)->identify()) != idHelper.multilayer(pushMe.back().front()->identify())) {
42  m_tubeLaySwitch = pushMe.size();
43  }
44  }
45 
46  (isMdt ? m_nMdtHits : m_nStripHits) += pushMe.emplace_back(itr, end_insert).size();
47  itr = end_insert;
48  }
49  }

Member Function Documentation

◆ firstLayerFrom2ndMl()

unsigned int MuonR4::SpacePointPerLayerSplitter::firstLayerFrom2ndMl ( ) const
inline

Returns the layer index with hits from the second multilayer

Definition at line 41 of file SpacePointPerLayerSplitter.h.

41  {
42  return m_tubeLaySwitch;
43  }

◆ mdtHits()

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

Returns the sorted Mdt hits.

Definition at line 25 of file SpacePointPerLayerSplitter.h.

25  {
26  return m_mdtLayers;
27  }

◆ nMdtHits()

unsigned int MuonR4::SpacePointPerLayerSplitter::nMdtHits ( ) const
inline

Returns the number of all Mdt hits in the seed.

Definition at line 29 of file SpacePointPerLayerSplitter.h.

29  {
30  return m_nMdtHits;
31  }

◆ nStripHits()

unsigned int MuonR4::SpacePointPerLayerSplitter::nStripHits ( ) const
inline

Returns the number of all strip hits in the seed.

Definition at line 37 of file SpacePointPerLayerSplitter.h.

37  {
38  return m_nStripHits;
39  }

◆ stripHits()

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

Returns the sorted strip hits.

Definition at line 33 of file SpacePointPerLayerSplitter.h.

33  {
34  return m_stripLayers;
35  }

Member Data Documentation

◆ m_mdtLayers

HitLayVec MuonR4::SpacePointPerLayerSplitter::m_mdtLayers {}
private

Sorted Mdt hits per tube layer.

Definition at line 46 of file SpacePointPerLayerSplitter.h.

◆ m_nMdtHits

unsigned int MuonR4::SpacePointPerLayerSplitter::m_nMdtHits {0}
private

Number of all Mdt tube hits

Definition at line 50 of file SpacePointPerLayerSplitter.h.

◆ m_nStripHits

unsigned int MuonR4::SpacePointPerLayerSplitter::m_nStripHits {0}
private

Number of all strip hits.

Definition at line 52 of file SpacePointPerLayerSplitter.h.

◆ m_stripLayers

HitLayVec MuonR4::SpacePointPerLayerSplitter::m_stripLayers {}
private

Sorted Strip hits per gasGap strip

Definition at line 48 of file SpacePointPerLayerSplitter.h.

◆ m_tubeLaySwitch

unsigned int MuonR4::SpacePointPerLayerSplitter::m_tubeLaySwitch {0}
private

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

Definition at line 54 of file SpacePointPerLayerSplitter.h.


The documentation for this class was generated from the following files:
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
MuonR4::SpacePointPerLayerSplitter::HitLayVec
std::vector< HitVec > HitLayVec
Definition: SpacePointPerLayerSplitter.h:19
MuonR4::stripSmartPtr
HitVec stripSmartPtr(const SpacePointBucket &bucket)
Definition: SpacePointPerLayerSplitter.cxx:12
SpacePoint
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SpacePoint.h:7
MuonR4::SpacePointPerLayerSplitter::m_nMdtHits
unsigned int m_nMdtHits
Number of all Mdt tube hits
Definition: SpacePointPerLayerSplitter.h:50
MuonR4::SpacePointPerLayerSplitter::m_nStripHits
unsigned int m_nStripHits
Number of all strip hits.
Definition: SpacePointPerLayerSplitter.h:52
MdtIdHelper
Definition: MdtIdHelper.h:61
MuonR4::SpacePointPerLayerSplitter::m_tubeLaySwitch
unsigned int m_tubeLaySwitch
Index of the first tube-layer from the second multilayer.
Definition: SpacePointPerLayerSplitter.h:54
MuonR4::SpacePointPerLayerSplitter::m_stripLayers
HitLayVec m_stripLayers
Sorted Strip hits per gasGap strip
Definition: SpacePointPerLayerSplitter.h:48
MuonR4::SpacePointPerLayerSplitter::m_mdtLayers
HitLayVec m_mdtLayers
Sorted Mdt hits per tube layer.
Definition: SpacePointPerLayerSplitter.h:46
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition: IMuonIdHelperSvc.h:27
MuonR4::SpacePointPerLayerSplitter::SpacePointPerLayerSplitter
SpacePointPerLayerSplitter(const SpacePointBucket &bucket)
Constructor taking a complete bucket
Definition: SpacePointPerLayerSplitter.cxx:19
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
Identifier
Definition: IdentifierFieldParser.cxx:14