17 static const unsigned int maxlen = []() ->
unsigned int {
19 auto it = std::max_element(pss.begin(), pss.end(),
20 [](
const std::string& lhs,
const std::string& rhs) { return lhs.size() < rhs.size(); });
31 std::vector<std::string> pss;
56 static const std::vector<std::string> processingStrings =
58 return processingStrings;
64 if (
static_cast<size_t>(stage) < pss.size()) {
65 return pss[
static_cast<size_t>(stage)];
127 m_seedSeg = segment1 ? segment1 : segment2;
128 for (
MuPatSegment* seg : {segment1, segment2, seedSeg}) {
165 MuPatCandidateBase::operator=(can);
171 m_track = std::make_unique<Trk::Track>(can.track());
202 for (
int i = 0; i < 4; ++i) momCov += std::abs((*cov)(4, i));
203 for (
int i = 0; i < 4; ++i) momCov += std::abs((*cov)(i, 4));
204 if (momCov > 1e-10) { hasMom =
true; }
235 seg->usedInFit += change;
244 bool bRemovedSegments =
false;
245 std::vector<MuPatSegment*>::iterator it =
m_segments.begin();
248 bool inChamberSet =
false;
258 (*it)->removeTrack(
this);
259 bRemovedSegments =
true;
264 return bRemovedSegments;
268 std::vector<MuonStationIndex::StIndex>
stations;
282 return names.substr(0, names.size() - 1);
290 seg->removeTrack(
this);
#define AmgSymMatrix(dim)
MuPatCandidateBase()=default
constructor.
const Trk::MeasurementBase * addToTrash(std::unique_ptr< const Trk::MeasurementBase > meas)
adds the measurement to the garbage container.
std::set< MuonStationIndex::StIndex > m_stations
void setChambers(const std::set< MuonStationIndex::ChIndex > &chambers)
Set the list of chambers and update list of stations.
bool containsChamber(MuonStationIndex::ChIndex chIndex) const
returns whether the ChamberIndex is already contained in candidate
void addChamber(MuonStationIndex::ChIndex chIndex)
add the chamber to the list of contained chambers.
const std::set< MuonStationIndex::StIndex > & stations() const
returns set with contained stationIndices
const std::vector< std::shared_ptr< const Trk::MeasurementBase > > & garbage() const
const std::set< MuonStationIndex::ChIndex > & chambers() const
returns set with contained chamberIndices
std::set< MuonStationIndex::ChIndex > m_chambers
segment candidate object.
void addTrack(MuPatTrack *)
add a new track to the segment
bool isSegmentExcluded(const MuPatSegment *segment) const
loops over the excluded segment collection and checks whether the pointer is in there
static const std::vector< std::string > & processingStageStrings()
Return list of processing stage strings.
void addExcludedSegment(MuPatSegment *segment)
add segment that does not match the track
std::vector< MuonStationIndex::StIndex > stationsInOrder()
returns vector with contained stationIndices in the order they were added
Trk::Track & track() const
access to track
void updateSegments(bool add)
update segment/track association, if add == true ,will add track to segments else remove it
MuPatSegment * m_seedSeg
The special segment for this track.
static std::vector< std::string > initProcessingStageStrings()
Initialize s_processingStageStrings & s_processingStageStringMaxLen.
static const std::string & processingStageString(ProcessingStage stage)
Convert enum to string.
bool hasMomentum() const
returns whether canditate has a momentum measurement
MuPatTrack & operator=(const MuPatTrack &can)
assignment operator.
ProcessingStage
enum to keep track of the life of candidates
@ AmbiguityCreateCandidateFromSeeds
@ AmbiguitySelectCandidates
@ NumberOfProcessingStages
void updateTrack(std::unique_ptr< Trk::Track > &newTrack)
update track.
void addSegment(MuPatSegment *segment, std::unique_ptr< Trk::Track > &newTrack)
add segment + the associated new track.
ProcessingStage lastSegmentChange
~MuPatTrack()
destructor, decrease the usedInFit counter of all MuPatSegment objects by one
void modifySegmentCounters(int change)
increase the segment counters by the passed number
MuPatTrack(const std::vector< MuPatSegment * > &segments, std::unique_ptr< Trk::Track > &track, MuPatSegment *seedSeg=0)
constructor taking a vector of MuPatSegment object, the candidate takes ownership of the track It wil...
std::vector< MuPatSegment * > m_segments
std::vector< MuPatSegment * > m_excludedSegments
bool resetChambersOnCandidate(const std::set< MuonStationIndex::ChIndex > &chambers)
reset chambers on the candidate.
static unsigned int processingStageStringMaxLen()
maximum width of the strings corresponding to the ProcessingStage
std::unique_ptr< Trk::Track > m_track
std::string segmentNames() const
string containing the names of the segments on the candidate
const std::vector< MuPatSegment * > & segments() const
access to segments
@ StraightTrack
A straight track.
bool add(const std::string &hname, TKey *tobj)
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.
Ensure that the ATLAS eigen extensions are properly loaded.
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee