ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::MuonChamberHoleRecoveryTool::RecoveryState Struct Reference
Collaboration diagram for Muon::MuonChamberHoleRecoveryTool::RecoveryState:

Public Types

enum class  CopyTarget { GlobalTrkStates , ChamberTrkStates }
 Switch indicating whether the track states are copied onto the global cache vector or onto the chamber cache vector. More...

Public Member Functions

 RecoveryState (const Trk::Track &trk)
Trk::TrackStates::const_iterator begin () const
Trk::TrackStates::const_iterator end () const
const Trk::TrackStateOnSurfacetsos () const
bool nextState ()
 Increments the internal iterator.
void copyState (CopyTarget target)
const Trk::TrackParameterschamberPars () const
 Track parameters of the chamber.
void finalizeChamber ()
 Sorts the hits accumulated in the current chamber using the first track parameters in that chamber.
std::unique_ptr< Trk::TrackStatesreleaseStates ()
 Moves the recovered track states on surface onto a Trk::TrackStates to be piped into a new Trk::Track object.

Public Attributes

std::set< IdentifierlayersOnTrk {}
 List of all measurement layers on track.
Identifier tsosId {}
 Identifier of the current trackStateOnSurface.
NewTrackStates chamberStates {}
 Vector of the track states on surface in the current chamber.

Private Attributes

const Trk::Trackm_trk
Trk::TrackStates::const_iterator m_curr_itr {begin()}
bool m_nextCalled {false}
NewTrackStates m_newStates {}
std::set< const Trk::TrackStateOnSurface * > m_copiedStates {}

Detailed Description

Definition at line 53 of file MuonChamberHoleRecoveryTool.h.

Member Enumeration Documentation

◆ CopyTarget

Switch indicating whether the track states are copied onto the global cache vector or onto the chamber cache vector.

The chamber cache vector is sorted and moved onto the global

Enumerator
GlobalTrkStates 
ChamberTrkStates 

Definition at line 66 of file MuonChamberHoleRecoveryTool.h.

66 {
67 GlobalTrkStates,
68 ChamberTrkStates
69 };

Constructor & Destructor Documentation

◆ RecoveryState()

Muon::MuonChamberHoleRecoveryTool::RecoveryState::RecoveryState ( const Trk::Track & trk)

Member Function Documentation

◆ begin()

Trk::TrackStates::const_iterator Muon::MuonChamberHoleRecoveryTool::RecoveryState::begin ( ) const

Definition at line 48 of file MuonChamberHoleRecoveryTool.cxx.

48 {
49 return m_trk.trackStateOnSurfaces()->begin();
50 }

◆ chamberPars()

const Trk::TrackParameters * Muon::MuonChamberHoleRecoveryTool::RecoveryState::chamberPars ( ) const

Track parameters of the chamber.

Usually that are the parameters of the first TSOS in the chamberStates vector

Definition at line 70 of file MuonChamberHoleRecoveryTool.cxx.

70 {
71 return chamberStates.empty() ? tsos()->trackParameters() : chamberStates[0]->trackParameters();
72 }
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
NewTrackStates chamberStates
Vector of the track states on surface in the current chamber.

◆ copyState()

void Muon::MuonChamberHoleRecoveryTool::RecoveryState::copyState ( CopyTarget target)

Definition at line 65 of file MuonChamberHoleRecoveryTool.cxx.

◆ end()

Trk::TrackStates::const_iterator Muon::MuonChamberHoleRecoveryTool::RecoveryState::end ( ) const

Definition at line 51 of file MuonChamberHoleRecoveryTool.cxx.

51 {
52 return m_trk.trackStateOnSurfaces()->end();
53 }

◆ finalizeChamber()

void Muon::MuonChamberHoleRecoveryTool::RecoveryState::finalizeChamber ( )

Sorts the hits accumulated in the current chamber using the first track parameters in that chamber.

The sorted hits are moved onto the final track state vector

Definition at line 73 of file MuonChamberHoleRecoveryTool.cxx.

73 {
74 if (chamberStates.empty()) return;
75 std::stable_sort(chamberStates.begin(), chamberStates.end(), SortTSOSByDistanceToPars(chamberPars()));
76 m_newStates.insert(m_newStates.end(), std::make_move_iterator(chamberStates.begin()),
77 std::make_move_iterator(chamberStates.end()));
78 chamberStates.clear();
79 }
void stable_sort(DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > end)
Specialization of stable_sort for DataVector/List.
const Trk::TrackParameters * chamberPars() const
Track parameters of the chamber.

◆ nextState()

bool Muon::MuonChamberHoleRecoveryTool::RecoveryState::nextState ( )

Increments the internal iterator.

Definition at line 57 of file MuonChamberHoleRecoveryTool.cxx.

57 {
58 if (!m_nextCalled) {
59 m_nextCalled = true;
60 return true;
61 }
62 if (m_curr_itr == end()) return false;
63 return (++m_curr_itr) != end();
64 }

◆ releaseStates()

std::unique_ptr< Trk::TrackStates > Muon::MuonChamberHoleRecoveryTool::RecoveryState::releaseStates ( )

Moves the recovered track states on surface onto a Trk::TrackStates to be piped into a new Trk::Track object.

Definition at line 80 of file MuonChamberHoleRecoveryTool.cxx.

80 {
82 std::unique_ptr<Trk::TrackStates> outVec = std::make_unique<Trk::TrackStates>();
83 for (std::unique_ptr<const Trk::TrackStateOnSurface>& tsos : m_newStates){
84 outVec->push_back(std::move(tsos));
85 }
86 return outVec;
87 }
void finalizeChamber()
Sorts the hits accumulated in the current chamber using the first track parameters in that chamber.

◆ tsos()

const Trk::TrackStateOnSurface * Muon::MuonChamberHoleRecoveryTool::RecoveryState::tsos ( ) const

Definition at line 54 of file MuonChamberHoleRecoveryTool.cxx.

54 {
55 return m_curr_itr != end() ? (*m_curr_itr) : nullptr;
56 }

Member Data Documentation

◆ chamberStates

NewTrackStates Muon::MuonChamberHoleRecoveryTool::RecoveryState::chamberStates {}

Vector of the track states on surface in the current chamber.

Definition at line 78 of file MuonChamberHoleRecoveryTool.h.

78{};

◆ layersOnTrk

std::set<Identifier> Muon::MuonChamberHoleRecoveryTool::RecoveryState::layersOnTrk {}

List of all measurement layers on track.

Definition at line 73 of file MuonChamberHoleRecoveryTool.h.

73{};

◆ m_copiedStates

std::set<const Trk::TrackStateOnSurface*> Muon::MuonChamberHoleRecoveryTool::RecoveryState::m_copiedStates {}
private

Definition at line 97 of file MuonChamberHoleRecoveryTool.h.

97{};

◆ m_curr_itr

Trk::TrackStates::const_iterator Muon::MuonChamberHoleRecoveryTool::RecoveryState::m_curr_itr {begin()}
private

Definition at line 93 of file MuonChamberHoleRecoveryTool.h.

93{begin()};

◆ m_newStates

NewTrackStates Muon::MuonChamberHoleRecoveryTool::RecoveryState::m_newStates {}
private

Definition at line 96 of file MuonChamberHoleRecoveryTool.h.

96{};

◆ m_nextCalled

bool Muon::MuonChamberHoleRecoveryTool::RecoveryState::m_nextCalled {false}
private

Definition at line 94 of file MuonChamberHoleRecoveryTool.h.

94{false};

◆ m_trk

const Trk::Track& Muon::MuonChamberHoleRecoveryTool::RecoveryState::m_trk
private

Definition at line 92 of file MuonChamberHoleRecoveryTool.h.

◆ tsosId

Identifier Muon::MuonChamberHoleRecoveryTool::RecoveryState::tsosId {}

Identifier of the current trackStateOnSurface.

Definition at line 75 of file MuonChamberHoleRecoveryTool.h.

75{};

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