ATLAS Offline Software
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
Muon::MuPatCandidateBase Class Referenceabstract

track candidate entry object. More...

#include <MuPatCandidateBase.h>

Inheritance diagram for Muon::MuPatCandidateBase:
Collaboration diagram for Muon::MuPatCandidateBase:

Public Types

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

Public Member Functions

 MuPatCandidateBase ()=default
 constructor. More...
 
 MuPatCandidateBase (const MeasVec &etaHits, const MeasVec &phiHits, const MeasVec &fakePhiHits, const MeasVec &allHits)
 constructor. More...
 
virtual ~MuPatCandidateBase ()=default
 destructor. More...
 
const MeasVecetaHits () const
 return all eta hits on the entry More...
 
const MeasVecphiHits () const
 return all phi hits on the entry More...
 
const MeasVecfakePhiHits () const
 return all fake phi hits on the entry More...
 
const MeasVechits () const
 return all hits on the entry. More...
 
bool hasSmallChamber () const
 returns whether entry contains a small chamber More...
 
bool hasLargeChamber () const
 returns whether entry contains a small chamber More...
 
bool hasSLOverlap () const
 returns whether there is at least one small/large overlap in the same station layer More...
 
virtual const Trk::TrackParametersentryPars () const =0
 return track parameters representing the entry More...
 
bool hasEndcap () const
 returns whether the entry contains endcap hits More...
 
void hasEndcap (bool hasEC)
 set whether entry has endcap hits More...
 
bool hasMomentum () const
 returns whether entry has a momentum measurement More...
 
const std::set< MuonStationIndex::StIndex > & stations () const
 returns set with contained stationIndices More...
 
const std::set< MuonStationIndex::ChIndex > & chambers () const
 returns set with contained chamberIndices More...
 
bool containsChamber (MuonStationIndex::ChIndex chIndex) const
 returns whether the ChamberIndex is already contained in candidate More...
 
bool containsStation (MuonStationIndex::StIndex chIndex) const
 returns whether the StationIndex is already contained in candidate More...
 
const MuPatHitListhitList () const
 returns a reference to the hit list More...
 
const std::set< Identifier > & chamberIds () const
 returns set with contained chamber ids More...
 
bool shareChambers (const MuPatCandidateBase &entry) const
 checks whether the two entries contain the same chamber More...
 
void addToTrash (std::unique_ptr< const Trk::MeasurementBase > meas)
 adds the measurement to the garbage container. More...
 
void addToTrash (const std::vector< std::shared_ptr< const Trk::MeasurementBase >> &measurements)
 
const std::vector< std::shared_ptr< const Trk::MeasurementBase > > & garbage () const
 

Public Attributes

unsigned int nmdtHitsMl1 {0}
 public hit counters More...
 
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}
 

Protected Member Functions

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

Protected Attributes

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

Private Attributes

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 {}
 

Friends

class MuPatCandidateTool
 

Detailed Description

track candidate entry object.

The purpose of the class is to provide a common interface for tracks and segments. It give access to:

Definition at line 46 of file MuPatCandidateBase.h.

Member Typedef Documentation

◆ MeasVec

Definition at line 50 of file MuPatCandidateBase.h.

Constructor & Destructor Documentation

◆ MuPatCandidateBase() [1/2]

Muon::MuPatCandidateBase::MuPatCandidateBase ( )
default

constructor.

◆ MuPatCandidateBase() [2/2]

Muon::MuPatCandidateBase::MuPatCandidateBase ( const MeasVec etaHits,
const MeasVec phiHits,
const MeasVec fakePhiHits,
const MeasVec allHits 
)

constructor.

The constructor takes ownership of the entryPars but not of the hits.

Definition at line 10 of file MuPatCandidateBase.cxx.

◆ ~MuPatCandidateBase()

virtual Muon::MuPatCandidateBase::~MuPatCandidateBase ( )
virtualdefault

destructor.

Member Function Documentation

◆ addChamber()

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

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  }

◆ addToTrash() [1/2]

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

Definition at line 92 of file MuPatCandidateBase.cxx.

92  {
93  if (m_garbage.capacity() < measurements.size() + m_garbage.size()){
94  m_garbage.reserve(measurements.size() + m_garbage.size());
95  }
96  m_garbage.insert(m_garbage.end(), measurements.begin(), measurements.end());
97  }

◆ addToTrash() [2/2]

void Muon::MuPatCandidateBase::addToTrash ( std::unique_ptr< const Trk::MeasurementBase meas)

adds the measurement to the garbage container.

Definition at line 91 of file MuPatCandidateBase.cxx.

91 {m_garbage.push_back(std::move(meas));}

◆ chamberIds() [1/2]

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

returns set with contained chamber ids

Definition at line 36 of file MuPatCandidateBase.cxx.

36 { return m_chamberIds; }

◆ chamberIds() [2/2]

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

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

returns set with contained chamberIndices

Definition at line 31 of file MuPatCandidateBase.cxx.

31 { return m_chambers; }

◆ clearChambers()

void Muon::MuPatCandidateBase::clearChambers ( )
protected

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

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

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()

virtual const Trk::TrackParameters& Muon::MuPatCandidateBase::entryPars ( ) const
pure virtual

return track parameters representing the entry

Implemented in Muon::MuPatTrack, and Muon::MuPatSegment.

◆ etaHits()

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

return all eta hits on the entry

◆ fakePhiHits()

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

return all fake phi hits on the entry

Definition at line 59 of file MuPatCandidateBase.cxx.

59 { return m_fakePhiHits; }

◆ garbage()

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

Definition at line 98 of file MuPatCandidateBase.cxx.

98 {return m_garbage;}

◆ hasEndcap() [1/2]

bool Muon::MuPatCandidateBase::hasEndcap ( ) const

returns whether the entry contains endcap hits

Definition at line 71 of file MuPatCandidateBase.cxx.

71 { return m_hasEndcap; }

◆ hasEndcap() [2/2]

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

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

returns whether entry contains a small chamber

Definition at line 45 of file MuPatCandidateBase.cxx.

45 { return m_hasLargeChamber; }

◆ hasLargeChamber() [2/2]

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

set whether entry has large chamber

Definition at line 51 of file MuPatCandidateBase.cxx.

51 { m_hasLargeChamber = hasLarge; }

◆ hasMomentum()

bool Muon::MuPatCandidateBase::hasMomentum ( ) const

returns whether entry has a momentum measurement

Definition at line 89 of file MuPatCandidateBase.cxx.

89 { return m_hasMomentum; }

◆ hasSLOverlap() [1/2]

bool Muon::MuPatCandidateBase::hasSLOverlap ( ) const

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

Definition at line 47 of file MuPatCandidateBase.cxx.

47 { return m_hasSLOverlap; }

◆ hasSLOverlap() [2/2]

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

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

returns whether entry contains a small chamber

Definition at line 43 of file MuPatCandidateBase.cxx.

43 { return m_hasSmallChamber; }

◆ hasSmallChamber() [2/2]

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

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 ( )
inlineprotected

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
inline

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

return all hits on the entry.

(Does not including the fake phi hits)

Definition at line 61 of file MuPatCandidateBase.cxx.

61 { return m_allHits; }

◆ phiHits()

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

return all phi hits on the entry

Definition at line 57 of file MuPatCandidateBase.cxx.

57 { return m_phiHits; }

◆ setAllHits()

void Muon::MuPatCandidateBase::setAllHits ( const MeasVec hits)
protected

set all hits on the entry

Definition at line 69 of file MuPatCandidateBase.cxx.

69 { m_allHits = hits; }

◆ setChambers()

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

Set the list of chambers and update list of stations.

Definition at line 14 of file MuPatCandidateBase.cxx.

14  {
16  m_stations.clear();
18  }

◆ setEtaHits()

void Muon::MuPatCandidateBase::setEtaHits ( const MeasVec hits)
protected

set eta hits on the entry

Definition at line 63 of file MuPatCandidateBase.cxx.

63 { m_etaHits = hits; }

◆ setFakePhiHits()

void Muon::MuPatCandidateBase::setFakePhiHits ( const MeasVec hits)
protected

set fake phi hits on the entry

Definition at line 67 of file MuPatCandidateBase.cxx.

67 { m_fakePhiHits = hits; }

◆ setPhiHits()

void Muon::MuPatCandidateBase::setPhiHits ( const MeasVec hits)
protected

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

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  }

◆ stations()

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

returns set with contained stationIndices

Definition at line 29 of file MuPatCandidateBase.cxx.

29 { return m_stations; }

Friends And Related Function Documentation

◆ MuPatCandidateTool

friend class MuPatCandidateTool
friend

Definition at line 47 of file MuPatCandidateBase.h.

Member Data Documentation

◆ m_allHits

MeasVec Muon::MuPatCandidateBase::m_allHits
private

Definition at line 163 of file MuPatCandidateBase.h.

◆ m_chamberIds

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

Definition at line 167 of file MuPatCandidateBase.h.

◆ m_chambers

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

Definition at line 170 of file MuPatCandidateBase.h.

◆ m_etaHits

MeasVec Muon::MuPatCandidateBase::m_etaHits
private

Definition at line 160 of file MuPatCandidateBase.h.

◆ m_fakePhiHits

MeasVec Muon::MuPatCandidateBase::m_fakePhiHits
private

Definition at line 162 of file MuPatCandidateBase.h.

◆ m_garbage

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

Definition at line 191 of file MuPatCandidateBase.h.

◆ m_hasEndcap

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

Definition at line 186 of file MuPatCandidateBase.h.

◆ m_hasLargeChamber

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

Definition at line 188 of file MuPatCandidateBase.h.

◆ m_hasMomentum

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

Definition at line 172 of file MuPatCandidateBase.h.

◆ m_hasSLOverlap

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

Definition at line 189 of file MuPatCandidateBase.h.

◆ m_hasSmallChamber

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

Definition at line 187 of file MuPatCandidateBase.h.

◆ m_hitList

MuPatHitList Muon::MuPatCandidateBase::m_hitList
private

Definition at line 165 of file MuPatCandidateBase.h.

◆ m_phiHits

MeasVec Muon::MuPatCandidateBase::m_phiHits
private

Definition at line 161 of file MuPatCandidateBase.h.

◆ m_stations

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

Definition at line 171 of file MuPatCandidateBase.h.

◆ ncscHitsEta

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

Definition at line 178 of file MuPatCandidateBase.h.

◆ ncscHitsPhi

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

Definition at line 179 of file MuPatCandidateBase.h.

◆ nmdtHitsMl1

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

public hit counters

Definition at line 176 of file MuPatCandidateBase.h.

◆ nmdtHitsMl2

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

Definition at line 177 of file MuPatCandidateBase.h.

◆ nrpcHitsEta

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

Definition at line 180 of file MuPatCandidateBase.h.

◆ nrpcHitsPhi

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

Definition at line 181 of file MuPatCandidateBase.h.

◆ ntgcHitsEta

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

Definition at line 182 of file MuPatCandidateBase.h.

◆ ntgcHitsPhi

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

Definition at line 183 of file MuPatCandidateBase.h.


The documentation for this class was generated from the following files:
Muon::MuonStationIndex::toStationIndex
static StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
Definition: MuonStationIndex.cxx:43
Muon::MuPatCandidateBase::m_phiHits
MeasVec m_phiHits
Definition: MuPatCandidateBase.h:161
Muon::MuPatCandidateBase::phiHits
const MeasVec & phiHits() const
return all phi hits on the entry
Definition: MuPatCandidateBase.cxx:57
Muon::MuPatCandidateBase::m_hasMomentum
bool m_hasMomentum
Definition: MuPatCandidateBase.h:172
Muon::MuPatCandidateBase::m_fakePhiHits
MeasVec m_fakePhiHits
Definition: MuPatCandidateBase.h:162
Muon::MuPatCandidateBase::chambers
const std::set< MuonStationIndex::ChIndex > & chambers() const
returns set with contained chamberIndices
Definition: MuPatCandidateBase.cxx:31
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Muon::MuPatCandidateBase::m_hasEndcap
bool m_hasEndcap
Definition: MuPatCandidateBase.h:186
Muon::MuPatCandidateBase::m_garbage
std::vector< std::shared_ptr< const Trk::MeasurementBase > > m_garbage
Definition: MuPatCandidateBase.h:191
intersection
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
Definition: compareFlatTrees.cxx:25
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Muon::MuPatCandidateBase::m_hasSmallChamber
bool m_hasSmallChamber
Definition: MuPatCandidateBase.h:187
Muon::MuPatCandidateBase::fakePhiHits
const MeasVec & fakePhiHits() const
return all fake phi hits on the entry
Definition: MuPatCandidateBase.cxx:59
Muon::MuPatCandidateBase::chamberIds
const std::set< Identifier > & chamberIds() const
returns set with contained chamber ids
Definition: MuPatCandidateBase.cxx:33
Muon::MuPatCandidateBase::etaHits
const MeasVec & etaHits() const
return all eta hits on the entry
Muon::MuPatCandidateBase::m_stations
std::set< MuonStationIndex::StIndex > m_stations
Definition: MuPatCandidateBase.h:171
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
Muon::MuPatCandidateBase::m_etaHits
MeasVec m_etaHits
Definition: MuPatCandidateBase.h:160
Muon::MuPatCandidateBase::m_hasSLOverlap
bool m_hasSLOverlap
Definition: MuPatCandidateBase.h:189
Muon::MuPatCandidateBase::m_hasLargeChamber
bool m_hasLargeChamber
Definition: MuPatCandidateBase.h:188
Muon::MuPatCandidateBase::m_chamberIds
std::set< Identifier > m_chamberIds
Definition: MuPatCandidateBase.h:167
Muon::MuPatCandidateBase::m_chambers
std::set< MuonStationIndex::ChIndex > m_chambers
Definition: MuPatCandidateBase.h:170
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
Muon::MuPatCandidateBase::m_hitList
MuPatHitList m_hitList
Definition: MuPatCandidateBase.h:165
set_intersection
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
Muon::MuPatCandidateBase::hits
const MeasVec & hits() const
return all hits on the entry.
Definition: MuPatCandidateBase.cxx:61
Muon::MuPatCandidateBase::m_allHits
MeasVec m_allHits
Definition: MuPatCandidateBase.h:163