ATLAS Offline Software
Loading...
Searching...
No Matches
MuPatCandidateBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUPATCANDIDATEBASE_H
6#define MUPATCANDIDATEBASE_H
7
8#include <set>
9
10#include "Identifier/Identifier.h"
15
16namespace Muon {
17
47 friend class MuPatCandidateTool;
48
49 public:
50 using MeasVec = std::vector<const Trk::MeasurementBase*>;
51
52 public:
54 MuPatCandidateBase() = default;
55
57 MuPatCandidateBase(const MeasVec& etaHits, const MeasVec& phiHits, const MeasVec& fakePhiHits, const MeasVec& allHits);
58
60 virtual ~MuPatCandidateBase() = default;
61
63 const MeasVec& etaHits() const;
64
66 const MeasVec& phiHits() const;
67
69 const MeasVec& fakePhiHits() const;
70
72 const MeasVec& hits() const;
73
75 bool hasSmallChamber() const;
76
78 bool hasLargeChamber() const;
79
81 bool hasSLOverlap() const;
82
84 virtual const Trk::TrackParameters& entryPars() const = 0;
85
87 bool hasEndcap() const;
88
90 void hasEndcap(bool hasEC);
91
93 bool hasMomentum() const;
94
96 const std::set<MuonStationIndex::StIndex>& stations() const;
97
99 const std::set<MuonStationIndex::ChIndex>& chambers() const;
100
103
106
108 const MuPatHitList& hitList() const { return m_hitList; }
109
111 const std::set<Identifier>& chamberIds() const;
112
114 bool shareChambers(const MuPatCandidateBase& entry) const;
115
117 const Trk::MeasurementBase* addToTrash(std::unique_ptr<const Trk::MeasurementBase> meas);
118 void addToTrash(const std::vector<std::shared_ptr<const Trk::MeasurementBase>>& measurements);
119 const std::vector<std::shared_ptr<const Trk::MeasurementBase>>& garbage() const;
120 protected:
121 // all non-const functions protected, only accessible by derived classes and MCTBEntryHandler and MuPatHitHandler
122
124 void hasSLOverlap(bool hasSL);
125
127 void hasSmallChamber(bool hasSmall);
128
130 void hasLargeChamber(bool hasLarge);
131
133 void setEtaHits(const MeasVec& hits);
134
136 void setPhiHits(const MeasVec& hits);
137
139 void setFakePhiHits(const MeasVec& hits);
140
142 void setAllHits(const MeasVec& hits);
143
146
148 std::set<Identifier>& chamberIds();
149
151 void clearChambers();
152
155
157 void setChambers(const std::set<MuonStationIndex::ChIndex>& chambers);
158
159 private:
160 MeasVec m_etaHits; //<! vector containing all eta measurements
161 MeasVec m_phiHits; //<! vector containing all phi measurements
162 MeasVec m_fakePhiHits; //<! vector containing all fake phi measurements
163 MeasVec m_allHits; //<! vector containing all measurements (except fake phi measurements)
164
166
167 std::set<Identifier> m_chamberIds; //<! set to store chamber Ids of hits associated with candidate
168
169 protected:
170 std::set<MuonStationIndex::ChIndex> m_chambers; //<! set to store chamber indices of segments associated with candidate
171 std::set<MuonStationIndex::StIndex> m_stations; //<! set to store station indices of segments associated with candidate
172 bool m_hasMomentum{false};
173
174 public:
176 unsigned int nmdtHitsMl1{0};
177 unsigned int nmdtHitsMl2{0};
178 unsigned int ncscHitsEta{0};
179 unsigned int ncscHitsPhi{0};
180 unsigned int nrpcHitsEta{0};
181 unsigned int nrpcHitsPhi{0};
182 unsigned int ntgcHitsEta{0};
183 unsigned int ntgcHitsPhi{0};
184
185 private:
186 bool m_hasEndcap{false};
187 bool m_hasSmallChamber{false};
188 bool m_hasLargeChamber{false};
189 bool m_hasSLOverlap{false};
190
191 std::vector<std::shared_ptr<const Trk::MeasurementBase>> m_garbage{};
192 };
193
194} // namespace Muon
195
196#endif
track candidate entry object.
MuPatCandidateBase()=default
constructor.
const Trk::MeasurementBase * addToTrash(std::unique_ptr< const Trk::MeasurementBase > meas)
adds the measurement to the garbage container.
virtual const Trk::TrackParameters & entryPars() const =0
return track parameters representing the entry
const MeasVec & etaHits() const
return all eta hits on the entry
void setAllHits(const MeasVec &hits)
set all hits on the entry
const MuPatHitList & hitList() const
returns a reference to the hit list
virtual ~MuPatCandidateBase()=default
destructor.
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
unsigned int nmdtHitsMl1
public hit counters
MuPatHitList & hitList()
returns a reference to the hit list
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.
StIndex
enum to classify the different station layers in the muon spectrometer
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
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.
std::vector< MuPatHitPtr > MuPatHitList
Definition MuPatHit.h:26
NSWSeed::MeasVec MeasVec
Stereo seeds can be formed using hits from 4 independent layers by solving the following system of eq...
ParametersBase< TrackParametersDim, Charged > TrackParameters