ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::MuPatSegment Class Reference

segment candidate object. More...

#include <MuPatSegment.h>

Inheritance diagram for Muon::MuPatSegment:
Collaboration diagram for Muon::MuPatSegment:

Public Types

using ChIdx = MuonStationIndex::ChIndex
using StIdx = MuonStationIndex::StIndex
using MeasVec = std::vector<const Trk::MeasurementBase*>

Public Member Functions

 MuPatSegment ()=default
 ~MuPatSegment ()=default
const Trk::TrackParametersentryPars () const
 returns first track parameters
void addTrack (MuPatTrack *)
 add a new track to the segment
void removeTrack (MuPatTrack *)
 remove a track from the segment
const std::set< MuPatTrack * > & tracks () const
 access to the tracks the segment is associated with
const MeasVecetaHits () const
 return all eta hits on the entry
const MeasVecphiHits () const
 return all phi hits on the entry
const MeasVecfakePhiHits () const
 return all fake phi hits on the entry
const MeasVechits () const
 return all hits on the entry.
bool hasSmallChamber () const
 returns whether entry contains a small chamber
bool hasLargeChamber () const
 returns whether entry contains a small chamber
bool hasSLOverlap () const
 returns whether there is at least one small/large overlap in the same station layer
bool hasEndcap () const
 returns whether the entry contains endcap hits
void hasEndcap (bool hasEC)
 set whether entry has endcap hits
bool hasMomentum () const
 returns whether entry has a momentum measurement
const std::set< MuonStationIndex::StIndex > & stations () const
 returns set with contained stationIndices
const std::set< MuonStationIndex::ChIndex > & chambers () const
 returns set with contained chamberIndices
bool containsChamber (MuonStationIndex::ChIndex chIndex) const
 returns whether the ChamberIndex is already contained in candidate
bool containsStation (MuonStationIndex::StIndex chIndex) const
 returns whether the StationIndex is already contained in candidate
const MuPatHitListhitList () const
 returns a reference to the hit list
const std::set< Identifier > & chamberIds () const
 returns set with contained chamber ids
bool shareChambers (const MuPatCandidateBase &entry) const
 checks whether the two entries contain the same chamber
const Trk::MeasurementBaseaddToTrash (std::unique_ptr< const Trk::MeasurementBase > meas)
 adds the measurement to the garbage container.
void addToTrash (const std::vector< std::shared_ptr< const Trk::MeasurementBase > > &measurements)
const std::vector< std::shared_ptr< const Trk::MeasurementBase > > & garbage () const

Static Public Member Functions

static std::size_t numberOfInstantiations ()

Public Attributes

int quality {0}
const MuonSegmentQualitysegQuality {nullptr}
const MuonSegmentsegment {nullptr}
std::shared_ptr< const Trk::AtaPlanesegPars {nullptr}
int segmentIndex {-1}
 index of segment within station
int usedInFit {0}
Identifier chid {0}
std::string name {}
ChIdx chIndex {ChIdx::ChUnknown}
StIdx stIndex {StIdx::StUnknown}
bool isEndcap {false}
bool isMdt {false}
 true for MDT, false for CSC
unsigned int nmdtHitsMl1 {0}
 public hit counters
unsigned int nmdtHitsMl2 {0}
unsigned int ncscHitsEta {0}
unsigned int ncscHitsPhi {0}
unsigned int nrpcHitsEta {0}
unsigned int nrpcHitsPhi {0}
unsigned int ntgcHitsEta {0}
unsigned int ntgcHitsPhi {0}

Static Public Attributes

static std::atomic_size_t s_numberOfInstantiations

Protected Member Functions

void hasSmallChamber (bool hasSmall)
 set whether entry has small chamber
void hasLargeChamber (bool hasLarge)
 set whether entry has large chamber
void hasSLOverlap (bool hasSL)
 set whether entry has at least one small/large overlap in the same station layer
MuPatHitListhitList ()
 returns a reference to the hit list
std::set< Identifier > & chamberIds ()
 returns set with contained chamber ids
void setEtaHits (const MeasVec &hits)
 set eta hits on the entry
void setPhiHits (const MeasVec &hits)
 set phi hits on the entry
void setFakePhiHits (const MeasVec &hits)
 set fake phi hits on the entry
void setAllHits (const MeasVec &hits)
 set all hits on the entry
void clearChambers ()
 clear the list of contained chambers.
void addChamber (MuonStationIndex::ChIndex chIndex)
 add the chamber to the list of contained chambers.
void setChambers (const std::set< MuonStationIndex::ChIndex > &chambers)
 Set the list of chambers and update list of stations.

Protected Attributes

std::set< MuonStationIndex::ChIndexm_chambers
std::set< MuonStationIndex::StIndexm_stations
bool m_hasMomentum {false}

Private Attributes

std::set< MuPatTrack * > m_associatedTracks
MeasVec m_etaHits
MeasVec m_phiHits
MeasVec m_fakePhiHits
MeasVec m_allHits
MuPatHitList m_hitList
std::set< Identifierm_chamberIds
bool m_hasEndcap {false}
bool m_hasSmallChamber {false}
bool m_hasLargeChamber {false}
bool m_hasSLOverlap {false}
std::vector< std::shared_ptr< const Trk::MeasurementBase > > m_garbage {}

Detailed Description

segment candidate object.

The purpose of the segment candidate is three folded:

  • provide the generic MuPatCandidateBase interface for tracks
  • keep track of tracks the segment is accociated to
  • cache additional information that cannot be stored on the track

The following information is cached:

  • the segment quality integer calculated by the MuonSegmentSelectionTool
  • the MuonSegmentQuality
  • a AtaPlane that represents the segment and allows extrapolation
  • the index of the segment in the order list of segments in the track steering cache
  • an integer (usedInFit) showing on how many track candidates the segment is included
  • the identifier of the chamber with most hits on the segment
  • a string summarizing the segment that can be used for dumping it to screen
  • a chamber index
  • a station index
  • a flag indicating whether the segment is in the barrel or endcap
  • a flag indicating whether the segment contains MDT hits

Definition at line 43 of file MuPatSegment.h.

Member Typedef Documentation

◆ ChIdx

◆ MeasVec

using Muon::MuPatCandidateBase::MeasVec = std::vector<const Trk::MeasurementBase*>
inherited

Definition at line 50 of file MuPatCandidateBase.h.

◆ StIdx

Constructor & Destructor Documentation

◆ MuPatSegment()

Muon::MuPatSegment::MuPatSegment ( )
default

◆ ~MuPatSegment()

Muon::MuPatSegment::~MuPatSegment ( )
default

Member Function Documentation

◆ addChamber()

void Muon::MuPatCandidateBase::addChamber ( MuonStationIndex::ChIndex chIndex)
protectedinherited

add the chamber to the list of contained chambers.

Will also add the corresponding station.

Definition at line 38 of file MuPatCandidateBase.cxx.

38 {
39 m_chambers.insert(chIndex);
41 }
std::set< MuonStationIndex::StIndex > m_stations
std::set< MuonStationIndex::ChIndex > m_chambers
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex

◆ addToTrash() [1/2]

void Muon::MuPatCandidateBase::addToTrash ( const std::vector< std::shared_ptr< const Trk::MeasurementBase > > & measurements)
inherited

Definition at line 97 of file MuPatCandidateBase.cxx.

97 {
98 if (m_garbage.capacity() < measurements.size() + m_garbage.size()){
99 m_garbage.reserve(measurements.size() + m_garbage.size());
100 }
101 m_garbage.insert(m_garbage.end(), measurements.begin(), measurements.end());
102 }
std::vector< std::shared_ptr< const Trk::MeasurementBase > > m_garbage

◆ addToTrash() [2/2]

const Trk::MeasurementBase * Muon::MuPatCandidateBase::addToTrash ( std::unique_ptr< const Trk::MeasurementBase > meas)
inherited

adds the measurement to the garbage container.

Definition at line 92 of file MuPatCandidateBase.cxx.

93 {
94 m_garbage.push_back(std::move(meas));
95 return m_garbage.back().get();
96 }

◆ addTrack()

void Muon::MuPatSegment::addTrack ( MuPatTrack * track)

add a new track to the segment

Definition at line 10 of file MuPatSegment.cxx.

10 {
11 m_associatedTracks.insert(track);
12 }
std::set< MuPatTrack * > m_associatedTracks

◆ chamberIds() [1/2]

std::set< Identifier > & Muon::MuPatCandidateBase::chamberIds ( )
protectedinherited

returns set with contained chamber ids

Definition at line 36 of file MuPatCandidateBase.cxx.

36{ return m_chamberIds; }
std::set< Identifier > m_chamberIds

◆ chamberIds() [2/2]

const std::set< Identifier > & Muon::MuPatCandidateBase::chamberIds ( ) const
inherited

returns set with contained chamber ids

Definition at line 33 of file MuPatCandidateBase.cxx.

33{ return m_chamberIds; }

◆ chambers()

const std::set< MuonStationIndex::ChIndex > & Muon::MuPatCandidateBase::chambers ( ) const
inherited

returns set with contained chamberIndices

Definition at line 31 of file MuPatCandidateBase.cxx.

31{ return m_chambers; }

◆ clearChambers()

void Muon::MuPatCandidateBase::clearChambers ( )
protectedinherited

clear the list of contained chambers.

Will also clear the list of contained stations and list of chamber Ids.

Definition at line 83 of file MuPatCandidateBase.cxx.

83 {
84 m_chambers.clear();
85 m_stations.clear();
86 m_chamberIds.clear();
87 }

◆ containsChamber()

bool Muon::MuPatCandidateBase::containsChamber ( MuonStationIndex::ChIndex chIndex) const
inherited

returns whether the ChamberIndex is already contained in candidate

Definition at line 75 of file MuPatCandidateBase.cxx.

75 {
76 return m_chambers.find(chIndex) != m_chambers.end();
77 }

◆ containsStation()

bool Muon::MuPatCandidateBase::containsStation ( MuonStationIndex::StIndex chIndex) const
inherited

returns whether the StationIndex is already contained in candidate

Definition at line 79 of file MuPatCandidateBase.cxx.

79 {
80 return m_stations.find(stIndex) != m_stations.end();
81 }

◆ entryPars()

const Trk::TrackParameters & Muon::MuPatSegment::entryPars ( ) const
inlinevirtual

returns first track parameters

Implements Muon::MuPatCandidateBase.

Definition at line 84 of file MuPatSegment.h.

84{ return *segPars; }
std::shared_ptr< const Trk::AtaPlane > segPars

◆ etaHits()

const MeasVec & Muon::MuPatCandidateBase::etaHits ( ) const
inherited

return all eta hits on the entry

◆ fakePhiHits()

const MuPatCandidateBase::MeasVec & Muon::MuPatCandidateBase::fakePhiHits ( ) const
inherited

return all fake phi hits on the entry

Definition at line 59 of file MuPatCandidateBase.cxx.

◆ garbage()

const std::vector< std::shared_ptr< const Trk::MeasurementBase > > & Muon::MuPatCandidateBase::garbage ( ) const
inherited

Definition at line 103 of file MuPatCandidateBase.cxx.

103{return m_garbage;}

◆ hasEndcap() [1/2]

bool Muon::MuPatCandidateBase::hasEndcap ( ) const
inherited

returns whether the entry contains endcap hits

Definition at line 71 of file MuPatCandidateBase.cxx.

◆ hasEndcap() [2/2]

void Muon::MuPatCandidateBase::hasEndcap ( bool hasEC)
inherited

set whether entry has endcap hits

Definition at line 73 of file MuPatCandidateBase.cxx.

73{ m_hasEndcap = hasEC; }

◆ hasLargeChamber() [1/2]

bool Muon::MuPatCandidateBase::hasLargeChamber ( ) const
inherited

returns whether entry contains a small chamber

Definition at line 45 of file MuPatCandidateBase.cxx.

◆ hasLargeChamber() [2/2]

void Muon::MuPatCandidateBase::hasLargeChamber ( bool hasLarge)
protectedinherited

set whether entry has large chamber

Definition at line 51 of file MuPatCandidateBase.cxx.

51{ m_hasLargeChamber = hasLarge; }

◆ hasMomentum()

bool Muon::MuPatCandidateBase::hasMomentum ( ) const
inherited

returns whether entry has a momentum measurement

Definition at line 89 of file MuPatCandidateBase.cxx.

◆ hasSLOverlap() [1/2]

bool Muon::MuPatCandidateBase::hasSLOverlap ( ) const
inherited

returns whether there is at least one small/large overlap in the same station layer

Definition at line 47 of file MuPatCandidateBase.cxx.

◆ hasSLOverlap() [2/2]

void Muon::MuPatCandidateBase::hasSLOverlap ( bool hasSL)
protectedinherited

set whether entry has at least one small/large overlap in the same station layer

Definition at line 53 of file MuPatCandidateBase.cxx.

53{ m_hasSLOverlap = hasSL; }

◆ hasSmallChamber() [1/2]

bool Muon::MuPatCandidateBase::hasSmallChamber ( ) const
inherited

returns whether entry contains a small chamber

Definition at line 43 of file MuPatCandidateBase.cxx.

◆ hasSmallChamber() [2/2]

void Muon::MuPatCandidateBase::hasSmallChamber ( bool hasSmall)
protectedinherited

set whether entry has small chamber

Definition at line 49 of file MuPatCandidateBase.cxx.

49{ m_hasSmallChamber = hasSmall; }

◆ hitList() [1/2]

MuPatHitList & Muon::MuPatCandidateBase::hitList ( )
inlineprotectedinherited

returns a reference to the hit list

Definition at line 145 of file MuPatCandidateBase.h.

145{ return m_hitList; }

◆ hitList() [2/2]

const MuPatHitList & Muon::MuPatCandidateBase::hitList ( ) const
inlineinherited

returns a reference to the hit list

Definition at line 108 of file MuPatCandidateBase.h.

108{ return m_hitList; }

◆ hits()

const MuPatCandidateBase::MeasVec & Muon::MuPatCandidateBase::hits ( ) const
inherited

return all hits on the entry.

(Does not including the fake phi hits)

Definition at line 61 of file MuPatCandidateBase.cxx.

◆ numberOfInstantiations()

std::size_t Trk::ObjectCounter< MuPatSegment >::numberOfInstantiations ( )
inlinestaticinherited

Definition at line 25 of file TrkObjectCounter.h.

26 {
27#ifndef NDEBUG
28 return s_numberOfInstantiations.load();
29#endif
30 return 0;
31 }
Helper to enable counting number of instantiations in debug builds.

◆ phiHits()

const MuPatCandidateBase::MeasVec & Muon::MuPatCandidateBase::phiHits ( ) const
inherited

return all phi hits on the entry

Definition at line 57 of file MuPatCandidateBase.cxx.

◆ removeTrack()

void Muon::MuPatSegment::removeTrack ( MuPatTrack * track)

remove a track from the segment

Definition at line 13 of file MuPatSegment.cxx.

13 {
14 // look up track
15 std::set<MuPatTrack*>::iterator pos = m_associatedTracks.find(track);
16 if (pos != m_associatedTracks.end()) {
17 // if found remove it from list
18 m_associatedTracks.erase(pos);
19 }
20
21 }

◆ setAllHits()

void Muon::MuPatCandidateBase::setAllHits ( const MeasVec & hits)
protectedinherited

set all hits on the entry

Definition at line 69 of file MuPatCandidateBase.cxx.

69{ m_allHits = hits; }
const MeasVec & hits() const
return all hits on the entry.

◆ setChambers()

void Muon::MuPatCandidateBase::setChambers ( const std::set< MuonStationIndex::ChIndex > & chambers)
protectedinherited

Set the list of chambers and update list of stations.

Definition at line 14 of file MuPatCandidateBase.cxx.

14 {
16 m_stations.clear();
18 }
const std::set< MuonStationIndex::ChIndex > & chambers() const
returns set with contained chamberIndices
ChIndex
enum to classify the different chamber layers in the muon spectrometer

◆ setEtaHits()

void Muon::MuPatCandidateBase::setEtaHits ( const MeasVec & hits)
protectedinherited

set eta hits on the entry

Definition at line 63 of file MuPatCandidateBase.cxx.

◆ setFakePhiHits()

void Muon::MuPatCandidateBase::setFakePhiHits ( const MeasVec & hits)
protectedinherited

set fake phi hits on the entry

Definition at line 67 of file MuPatCandidateBase.cxx.

◆ setPhiHits()

void Muon::MuPatCandidateBase::setPhiHits ( const MeasVec & hits)
protectedinherited

set phi hits on the entry

Definition at line 65 of file MuPatCandidateBase.cxx.

65{ m_phiHits = hits; }

◆ shareChambers()

bool Muon::MuPatCandidateBase::shareChambers ( const MuPatCandidateBase & entry) const
inherited

checks whether the two entries contain the same chamber

Definition at line 20 of file MuPatCandidateBase.cxx.

20 {
21 std::vector<Identifier> intersection;
22 std::set_intersection(entry.chamberIds().begin(), entry.chamberIds().end(), chamberIds().begin(), chamberIds().end(),
23 std::back_inserter(intersection));
24
25 unsigned int intersectionSize = intersection.size();
26 return intersectionSize != 0;
27 }
const std::set< Identifier > & chamberIds() const
returns set with contained chamber ids
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)

◆ stations()

const std::set< MuonStationIndex::StIndex > & Muon::MuPatCandidateBase::stations ( ) const
inherited

returns set with contained stationIndices

Definition at line 29 of file MuPatCandidateBase.cxx.

29{ return m_stations; }

◆ tracks()

const std::set< MuPatTrack * > & Muon::MuPatSegment::tracks ( ) const
inline

access to the tracks the segment is associated with

Definition at line 74 of file MuPatSegment.h.

74{ return m_associatedTracks; }

Member Data Documentation

◆ chid

Identifier Muon::MuPatSegment::chid {0}

Definition at line 57 of file MuPatSegment.h.

57{0};

◆ chIndex

ChIdx Muon::MuPatSegment::chIndex {ChIdx::ChUnknown}

Definition at line 59 of file MuPatSegment.h.

59{ChIdx::ChUnknown};

◆ isEndcap

bool Muon::MuPatSegment::isEndcap {false}

Definition at line 61 of file MuPatSegment.h.

61{false};

◆ isMdt

bool Muon::MuPatSegment::isMdt {false}

true for MDT, false for CSC

Definition at line 62 of file MuPatSegment.h.

62{false};

◆ m_allHits

MeasVec Muon::MuPatCandidateBase::m_allHits
privateinherited

Definition at line 163 of file MuPatCandidateBase.h.

◆ m_associatedTracks

std::set<MuPatTrack*> Muon::MuPatSegment::m_associatedTracks
private

Definition at line 77 of file MuPatSegment.h.

◆ m_chamberIds

std::set<Identifier> Muon::MuPatCandidateBase::m_chamberIds
privateinherited

Definition at line 167 of file MuPatCandidateBase.h.

◆ m_chambers

std::set<MuonStationIndex::ChIndex> Muon::MuPatCandidateBase::m_chambers
protectedinherited

Definition at line 170 of file MuPatCandidateBase.h.

◆ m_etaHits

MeasVec Muon::MuPatCandidateBase::m_etaHits
privateinherited

Definition at line 160 of file MuPatCandidateBase.h.

◆ m_fakePhiHits

MeasVec Muon::MuPatCandidateBase::m_fakePhiHits
privateinherited

Definition at line 162 of file MuPatCandidateBase.h.

◆ m_garbage

std::vector<std::shared_ptr<const Trk::MeasurementBase> > Muon::MuPatCandidateBase::m_garbage {}
privateinherited

Definition at line 191 of file MuPatCandidateBase.h.

191{};

◆ m_hasEndcap

bool Muon::MuPatCandidateBase::m_hasEndcap {false}
privateinherited

Definition at line 186 of file MuPatCandidateBase.h.

186{false};

◆ m_hasLargeChamber

bool Muon::MuPatCandidateBase::m_hasLargeChamber {false}
privateinherited

Definition at line 188 of file MuPatCandidateBase.h.

188{false};

◆ m_hasMomentum

bool Muon::MuPatCandidateBase::m_hasMomentum {false}
protectedinherited

Definition at line 172 of file MuPatCandidateBase.h.

172{false};

◆ m_hasSLOverlap

bool Muon::MuPatCandidateBase::m_hasSLOverlap {false}
privateinherited

Definition at line 189 of file MuPatCandidateBase.h.

189{false};

◆ m_hasSmallChamber

bool Muon::MuPatCandidateBase::m_hasSmallChamber {false}
privateinherited

Definition at line 187 of file MuPatCandidateBase.h.

187{false};

◆ m_hitList

MuPatHitList Muon::MuPatCandidateBase::m_hitList
privateinherited

Definition at line 165 of file MuPatCandidateBase.h.

◆ m_phiHits

MeasVec Muon::MuPatCandidateBase::m_phiHits
privateinherited

Definition at line 161 of file MuPatCandidateBase.h.

◆ m_stations

std::set<MuonStationIndex::StIndex> Muon::MuPatCandidateBase::m_stations
protectedinherited

Definition at line 171 of file MuPatCandidateBase.h.

◆ name

std::string Muon::MuPatSegment::name {}

Definition at line 58 of file MuPatSegment.h.

58{};

◆ ncscHitsEta

unsigned int Muon::MuPatCandidateBase::ncscHitsEta {0}
inherited

Definition at line 178 of file MuPatCandidateBase.h.

178{0};

◆ ncscHitsPhi

unsigned int Muon::MuPatCandidateBase::ncscHitsPhi {0}
inherited

Definition at line 179 of file MuPatCandidateBase.h.

179{0};

◆ nmdtHitsMl1

unsigned int Muon::MuPatCandidateBase::nmdtHitsMl1 {0}
inherited

public hit counters

Definition at line 176 of file MuPatCandidateBase.h.

176{0};

◆ nmdtHitsMl2

unsigned int Muon::MuPatCandidateBase::nmdtHitsMl2 {0}
inherited

Definition at line 177 of file MuPatCandidateBase.h.

177{0};

◆ nrpcHitsEta

unsigned int Muon::MuPatCandidateBase::nrpcHitsEta {0}
inherited

Definition at line 180 of file MuPatCandidateBase.h.

180{0};

◆ nrpcHitsPhi

unsigned int Muon::MuPatCandidateBase::nrpcHitsPhi {0}
inherited

Definition at line 181 of file MuPatCandidateBase.h.

181{0};

◆ ntgcHitsEta

unsigned int Muon::MuPatCandidateBase::ntgcHitsEta {0}
inherited

Definition at line 182 of file MuPatCandidateBase.h.

182{0};

◆ ntgcHitsPhi

unsigned int Muon::MuPatCandidateBase::ntgcHitsPhi {0}
inherited

Definition at line 183 of file MuPatCandidateBase.h.

183{0};

◆ quality

int Muon::MuPatSegment::quality {0}

Definition at line 51 of file MuPatSegment.h.

51{0};

◆ s_numberOfInstantiations

std::atomic_size_t Trk::ObjectCounter< MuPatSegment >::s_numberOfInstantiations
inlinestaticinherited

Definition at line 22 of file TrkObjectCounter.h.

◆ segment

const MuonSegment* Muon::MuPatSegment::segment {nullptr}

Definition at line 53 of file MuPatSegment.h.

53{nullptr};

◆ segmentIndex

int Muon::MuPatSegment::segmentIndex {-1}

index of segment within station

Definition at line 55 of file MuPatSegment.h.

55{-1};

◆ segPars

std::shared_ptr<const Trk::AtaPlane> Muon::MuPatSegment::segPars {nullptr}

Definition at line 54 of file MuPatSegment.h.

54{nullptr};

◆ segQuality

const MuonSegmentQuality* Muon::MuPatSegment::segQuality {nullptr}

Definition at line 52 of file MuPatSegment.h.

52{nullptr};

◆ stIndex

StIdx Muon::MuPatSegment::stIndex {StIdx::StUnknown}

Definition at line 60 of file MuPatSegment.h.

60{StIdx::StUnknown};

◆ usedInFit

int Muon::MuPatSegment::usedInFit {0}

Definition at line 56 of file MuPatSegment.h.

56{0};

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