ATLAS Offline Software
Loading...
Searching...
No Matches
MuPatCandidateBase.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include <set>
7
8namespace Muon {
9
13
14 void MuPatCandidateBase::setChambers(const std::set<MuonStationIndex::ChIndex>& chambers) {
16 m_stations.clear();
18 }
19
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 }
28
29 const std::set<MuonStationIndex::StIndex>& MuPatCandidateBase::stations() const { return m_stations; }
30
31 const std::set<MuonStationIndex::ChIndex>& MuPatCandidateBase::chambers() const { return m_chambers; }
32
33 const std::set<Identifier>& MuPatCandidateBase::chamberIds() const { return m_chamberIds; }
34
36 std::set<Identifier>& MuPatCandidateBase::chamberIds() { return m_chamberIds; }
37
42
44
46
48
49 void MuPatCandidateBase::hasSmallChamber(bool hasSmall) { m_hasSmallChamber = hasSmall; }
50
51 void MuPatCandidateBase::hasLargeChamber(bool hasLarge) { m_hasLargeChamber = hasLarge; }
52
54
55 const MuPatCandidateBase::MeasVec& MuPatCandidateBase::MuPatCandidateBase::etaHits() const { return m_etaHits; }
56
58
60
62
64
66
68
70
72
73 void MuPatCandidateBase::hasEndcap(bool hasEC) { m_hasEndcap = hasEC; }
74
78
80 return m_stations.find(stIndex) != m_stations.end();
81 }
82
84 m_chambers.clear();
85 m_stations.clear();
86 m_chamberIds.clear();
87 }
88
90
92 MuPatCandidateBase::addToTrash(std::unique_ptr<const Trk::MeasurementBase> meas)
93 {
94 m_garbage.push_back(std::move(meas));
95 return m_garbage.back().get();
96 }
97 void MuPatCandidateBase::addToTrash(const std::vector<std::shared_ptr<const Trk::MeasurementBase>>& measurements) {
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 }
103 const std::vector<std::shared_ptr<const Trk::MeasurementBase>>& MuPatCandidateBase::garbage()const {return m_garbage;}
104
105} // namespace Muon
MuPatCandidateBase()=default
constructor.
const Trk::MeasurementBase * addToTrash(std::unique_ptr< const Trk::MeasurementBase > meas)
adds the measurement to the garbage container.
const MeasVec & etaHits() const
return all eta hits on the entry
void setAllHits(const MeasVec &hits)
set all hits on the entry
std::set< MuonStationIndex::StIndex > m_stations
bool containsStation(MuonStationIndex::StIndex chIndex) const
returns whether the StationIndex is already contained in candidate
void setChambers(const std::set< MuonStationIndex::ChIndex > &chambers)
Set the list of chambers and update list of stations.
const MeasVec & hits() const
return all hits on the entry.
bool hasLargeChamber() const
returns whether entry contains a small chamber
bool hasSmallChamber() const
returns whether entry contains a small chamber
void clearChambers()
clear the list of contained chambers.
bool containsChamber(MuonStationIndex::ChIndex chIndex) const
returns whether the ChamberIndex is already contained in candidate
const std::set< Identifier > & chamberIds() const
returns set with contained chamber ids
void addChamber(MuonStationIndex::ChIndex chIndex)
add the chamber to the list of contained chambers.
void setPhiHits(const MeasVec &hits)
set phi hits on the entry
std::set< Identifier > m_chamberIds
void setFakePhiHits(const MeasVec &hits)
set fake phi hits on the entry
const MeasVec & fakePhiHits() const
return all fake phi hits on the entry
const std::set< MuonStationIndex::StIndex > & stations() const
returns set with contained stationIndices
const std::vector< std::shared_ptr< const Trk::MeasurementBase > > & garbage() const
bool hasEndcap() const
returns whether the entry contains endcap hits
const std::set< MuonStationIndex::ChIndex > & chambers() const
returns set with contained chamberIndices
bool shareChambers(const MuPatCandidateBase &entry) const
checks whether the two entries contain the same chamber
bool hasMomentum() const
returns whether entry has a momentum measurement
std::set< MuonStationIndex::ChIndex > m_chambers
void setEtaHits(const MeasVec &hits)
set eta hits on the entry
std::vector< const Trk::MeasurementBase * > MeasVec
bool hasSLOverlap() const
returns whether there is at least one small/large overlap in the same station layer
const MeasVec & phiHits() const
return all phi hits on the entry
std::vector< std::shared_ptr< const Trk::MeasurementBase > > m_garbage
This class is the pure abstract base class for all fittable tracking measurements.
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
StIndex
enum to classify the different station layers in the muon spectrometer
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.