|
ATLAS Offline Software
|
track candidate object.
More...
#include <MuPatTrack.h>
|
enum | ProcessingStage {
Unknown,
InitialLoop,
LayerRecovery,
ExtendedWithSegment,
SegmentRecovery,
FitRemovedSegment,
RefitRemovedSegment,
AmbiguityCreateCandidateFromSeeds,
AmbiguitySelectCandidates,
MatchFail,
FitFail,
FitWorse,
UnassociatedEM,
FitRemovedLayer,
TrackSelector,
KeptUntilEndOfCombi,
NumberOfProcessingStages
} |
| enum to keep track of the life of candidates More...
|
|
using | MeasVec = std::vector< const Trk::MeasurementBase * > |
|
|
| 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 will increase the usedInFit counter of the MuPatSegment objects by one. More...
|
|
| MuPatTrack (MuPatSegment *segment, std::unique_ptr< Trk::Track > &track) |
| constructor taking a MuPatSegment object, the candidate takes ownership of the track It will increase the usedInFit counter of the MuPatSegment objects by one. More...
|
|
| MuPatTrack (MuPatSegment *segment1, MuPatSegment *segment2, std::unique_ptr< Trk::Track > &track, MuPatSegment *seedSeg=0) |
| constructor taking two MuPatSegment objects, the candidate takes ownership of the track It will increase the usedInFit counter of the MuPatSegment objects by one. More...
|
|
| ~MuPatTrack () |
| destructor, decrease the usedInFit counter of all MuPatSegment objects by one More...
|
|
| MuPatTrack (const MuPatTrack &can) |
| copying constructor. More...
|
|
MuPatTrack & | operator= (const MuPatTrack &can) |
| assignment operator. More...
|
|
Trk::Track & | track () const |
| access to track More...
|
|
void | updateTrack (std::unique_ptr< Trk::Track > &newTrack) |
| update track. More...
|
|
const std::vector< MuPatSegment * > & | segments () const |
| access to segments More...
|
|
MuPatSegment * | seedSegment () const |
| Return pointer to the seed segment. More...
|
|
const std::vector< MuPatSegment * > & | excludedSegments () const |
| access to segments More...
|
|
void | addSegment (MuPatSegment *segment, std::unique_ptr< Trk::Track > &newTrack) |
| add segment + the associated new track. More...
|
|
void | addExcludedSegment (MuPatSegment *segment) |
| add segment that does not match the track More...
|
|
bool | isSegmentExcluded (const MuPatSegment *segment) const |
| loops over the excluded segment collection and checks whether the pointer is in there More...
|
|
const Trk::TrackParameters & | entryPars () const |
| returns first track parameters More...
|
|
bool | hasMomentum () const |
| returns whether canditate has a momentum measurement More...
|
|
std::vector< MuonStationIndex::StIndex > | stationsInOrder () |
| returns vector with contained stationIndices in the order they were added More...
|
|
bool | resetChambersOnCandidate (const std::set< MuonStationIndex::ChIndex > &chambers) |
| reset chambers on the candidate. More...
|
|
std::string | segmentNames () const |
| string containing the names of the segments on the candidate More...
|
|
const MeasVec & | etaHits () const |
| return all eta hits on the entry More...
|
|
const MeasVec & | phiHits () const |
| return all phi hits on the entry More...
|
|
const MeasVec & | fakePhiHits () const |
| return all fake phi hits on the entry More...
|
|
const MeasVec & | hits () 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...
|
|
bool | hasEndcap () const |
| returns whether the entry contains endcap hits More...
|
|
void | hasEndcap (bool hasEC) |
| set whether entry has endcap hits 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 MuPatHitList & | hitList () 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 |
|
track candidate object.
The purpose of the track candidate is three folded:
- provide the generic MuPatCandidateBase interface for tracks
- keep track of segments used to build track
- cache additional information that cannot be stored on the track
The following information is cached:
- the stage during the pattern recognition the candidate was made (Moore legacy)
- the pointer to the track
- a vector of the segments that were used to form the track
- a vector of the segments that were already tested against the candidate but failed. This information can be used to speed up the pat-rec code by avoiding fits that were already tried.
Definition at line 37 of file MuPatTrack.h.
◆ MeasVec
◆ ProcessingStage
enum to keep track of the life of candidates
Enumerator |
---|
Unknown | |
InitialLoop | |
LayerRecovery | |
ExtendedWithSegment | |
SegmentRecovery | |
FitRemovedSegment | |
RefitRemovedSegment | |
AmbiguityCreateCandidateFromSeeds | |
AmbiguitySelectCandidates | |
MatchFail | |
FitFail | |
FitWorse | |
UnassociatedEM | |
FitRemovedLayer | |
TrackSelector | |
KeptUntilEndOfCombi | |
NumberOfProcessingStages | |
Definition at line 42 of file MuPatTrack.h.
◆ MuPatTrack() [1/4]
constructor taking a vector of MuPatSegment object, the candidate takes ownership of the track It will increase the usedInFit counter of the MuPatSegment objects by one.
Definition at line 72 of file MuPatTrack.cxx.
◆ MuPatTrack() [2/4]
constructor taking a MuPatSegment object, the candidate takes ownership of the track It will increase the usedInFit counter of the MuPatSegment objects by one.
Definition at line 93 of file MuPatTrack.cxx.
◆ MuPatTrack() [3/4]
constructor taking two MuPatSegment objects, the candidate takes ownership of the track It will increase the usedInFit counter of the MuPatSegment objects by one.
Definition at line 109 of file MuPatTrack.cxx.
127 m_seedSeg = segment1 ? segment1 : segment2;
128 for (MuPatSegment* seg : {segment1, segment2, seedSeg}) {
◆ ~MuPatTrack()
Muon::MuPatTrack::~MuPatTrack |
( |
| ) |
|
◆ MuPatTrack() [4/4]
copying constructor.
It will not copy the track, just its pointer (lazy). It will increase the usedInFit counter of the MuPatSegment objects by one.
Definition at line 138 of file MuPatTrack.cxx.
145 m_track (std::make_unique<Trk::Track>(
can.track())),
◆ addChamber()
add the chamber to the list of contained chambers.
Will also add the corresponding station.
Definition at line 38 of file MuPatCandidateBase.cxx.
◆ addExcludedSegment()
void Muon::MuPatTrack::addExcludedSegment |
( |
MuPatSegment * |
segment | ) |
|
add segment that does not match the track
Definition at line 212 of file MuPatTrack.cxx.
◆ addSegment()
add segment + the associated new track.
Takes ownership of the track.
Definition at line 216 of file MuPatTrack.cxx.
◆ addToTrash() [1/2]
◆ addToTrash() [2/2]
◆ chamberIds() [1/2]
std::set< Identifier > & Muon::MuPatCandidateBase::chamberIds |
( |
| ) |
|
|
protectedinherited |
◆ chamberIds() [2/2]
const std::set< Identifier > & Muon::MuPatCandidateBase::chamberIds |
( |
| ) |
const |
|
inherited |
◆ 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.
◆ containsChamber()
returns whether the ChamberIndex is already contained in candidate
Definition at line 75 of file MuPatCandidateBase.cxx.
◆ containsStation()
returns whether the StationIndex is already contained in candidate
Definition at line 79 of file MuPatCandidateBase.cxx.
◆ entryPars()
◆ etaHits()
return all eta hits on the entry
◆ excludedSegments()
◆ fakePhiHits()
◆ garbage()
◆ hasEndcap() [1/2]
bool Muon::MuPatCandidateBase::hasEndcap |
( |
| ) |
const |
|
inherited |
◆ hasEndcap() [2/2]
void Muon::MuPatCandidateBase::hasEndcap |
( |
bool |
hasEC | ) |
|
|
inherited |
◆ hasLargeChamber() [1/2]
bool Muon::MuPatCandidateBase::hasLargeChamber |
( |
| ) |
const |
|
inherited |
◆ hasLargeChamber() [2/2]
void Muon::MuPatCandidateBase::hasLargeChamber |
( |
bool |
hasLarge | ) |
|
|
protectedinherited |
◆ hasMomentum() [1/2]
bool Muon::MuPatTrack::hasMomentum |
( |
| ) |
const |
returns whether canditate has a momentum measurement
Definition at line 186 of file MuPatTrack.cxx.
◆ hasMomentum() [2/2]
check whether track measures momentum
Definition at line 191 of file MuPatTrack.cxx.
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 > 1
e-10) { hasMom =
true; }
◆ 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.
◆ hasSmallChamber() [1/2]
bool Muon::MuPatCandidateBase::hasSmallChamber |
( |
| ) |
const |
|
inherited |
◆ hasSmallChamber() [2/2]
void Muon::MuPatCandidateBase::hasSmallChamber |
( |
bool |
hasSmall | ) |
|
|
protectedinherited |
◆ hitList() [1/2]
◆ hitList() [2/2]
◆ hits()
return all hits on the entry.
(Does not including the fake phi hits)
Definition at line 61 of file MuPatCandidateBase.cxx.
◆ initProcessingStageStrings()
std::vector< std::string > Muon::MuPatTrack::initProcessingStageStrings |
( |
| ) |
|
|
staticprivate |
Initialize s_processingStageStrings & s_processingStageStringMaxLen.
Definition at line 30 of file MuPatTrack.cxx.
31 std::vector<std::string> pss;
◆ isSegmentExcluded()
loops over the excluded segment collection and checks whether the pointer is in there
Definition at line 213 of file MuPatTrack.cxx.
◆ modifySegmentCounters()
void Muon::MuPatTrack::modifySegmentCounters |
( |
int |
change | ) |
|
|
private |
increase the segment counters by the passed number
Definition at line 231 of file MuPatTrack.cxx.
235 seg->usedInFit += change;
◆ numberOfInstantiations()
◆ operator=()
assignment operator.
It will not copy the track, just its pointer (lazy). It will increase the usedInFit counter of the MuPatSegment objects by one.
Definition at line 155 of file MuPatTrack.cxx.
165 MuPatCandidateBase::operator=(
can);
171 m_track = std::make_unique<Trk::Track>(
can.track());
◆ phiHits()
◆ processingStageString()
Convert enum to string.
Definition at line 61 of file MuPatTrack.cxx.
64 if (
static_cast<size_t>(
stage) < pss.size()) {
65 return pss[
static_cast<size_t>(
stage)];
◆ processingStageStringMaxLen()
unsigned int Muon::MuPatTrack::processingStageStringMaxLen |
( |
| ) |
|
|
static |
maximum width of the strings corresponding to the ProcessingStage
Definition at line 16 of file MuPatTrack.cxx.
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(); });
◆ processingStageStrings()
const std::vector< std::string > & Muon::MuPatTrack::processingStageStrings |
( |
| ) |
|
|
staticprivate |
Return list of processing stage strings.
Definition at line 54 of file MuPatTrack.cxx.
56 static const std::vector<std::string> processingStrings =
58 return processingStrings;
◆ resetChambersOnCandidate()
reset chambers on the candidate.
Return whether segments were removed.
Definition at line 239 of file MuPatTrack.cxx.
244 bool bRemovedSegments =
false;
248 bool inChamberSet =
false;
258 (*it)->removeTrack(
this);
259 bRemovedSegments =
true;
264 return bRemovedSegments;
◆ seedSegment()
Return pointer to the seed segment.
Definition at line 169 of file MuPatTrack.h.
◆ segmentNames()
std::string Muon::MuPatTrack::segmentNames |
( |
| ) |
const |
string containing the names of the segments on the candidate
Remove the trailing white space
Definition at line 274 of file MuPatTrack.cxx.
◆ segments()
◆ setAllHits()
void Muon::MuPatCandidateBase::setAllHits |
( |
const MeasVec & |
hits | ) |
|
|
protectedinherited |
◆ setChambers()
◆ setEtaHits()
void Muon::MuPatCandidateBase::setEtaHits |
( |
const MeasVec & |
hits | ) |
|
|
protectedinherited |
◆ setFakePhiHits()
void Muon::MuPatCandidateBase::setFakePhiHits |
( |
const MeasVec & |
hits | ) |
|
|
protectedinherited |
◆ setPhiHits()
void Muon::MuPatCandidateBase::setPhiHits |
( |
const MeasVec & |
hits | ) |
|
|
protectedinherited |
◆ shareChambers()
checks whether the two entries contain the same chamber
Definition at line 20 of file MuPatCandidateBase.cxx.
26 return intersectionSize != 0;
◆ stations()
◆ stationsInOrder()
returns vector with contained stationIndices in the order they were added
Definition at line 267 of file MuPatTrack.cxx.
268 std::vector<MuonStationIndex::StIndex>
stations;
◆ track()
◆ updateSegments()
void Muon::MuPatTrack::updateSegments |
( |
bool |
add | ) |
|
|
private |
update segment/track association, if add == true ,will add track to segments else remove it
Definition at line 285 of file MuPatTrack.cxx.
290 seg->removeTrack(
this);
◆ updateTrack()
void Muon::MuPatTrack::updateTrack |
( |
std::unique_ptr< Trk::Track > & |
newTrack | ) |
|
update track.
Candidate takes ownership of track.
Definition at line 210 of file MuPatTrack.cxx.
◆ MuPatCandidateTool
◆ created
◆ lastSegmentChange
◆ m_allHits
MeasVec Muon::MuPatCandidateBase::m_allHits |
|
privateinherited |
◆ m_chamberIds
std::set<Identifier> Muon::MuPatCandidateBase::m_chamberIds |
|
privateinherited |
◆ m_chambers
◆ m_etaHits
MeasVec Muon::MuPatCandidateBase::m_etaHits |
|
privateinherited |
◆ m_excludedSegments
std::vector<MuPatSegment*> Muon::MuPatTrack::m_excludedSegments {} |
|
private |
◆ m_fakePhiHits
MeasVec Muon::MuPatCandidateBase::m_fakePhiHits |
|
privateinherited |
◆ m_garbage
◆ m_hasEndcap
bool Muon::MuPatCandidateBase::m_hasEndcap {false} |
|
privateinherited |
◆ m_hasLargeChamber
bool Muon::MuPatCandidateBase::m_hasLargeChamber {false} |
|
privateinherited |
◆ m_hasMomentum
bool Muon::MuPatCandidateBase::m_hasMomentum {false} |
|
protectedinherited |
◆ m_hasSLOverlap
bool Muon::MuPatCandidateBase::m_hasSLOverlap {false} |
|
privateinherited |
◆ m_hasSmallChamber
bool Muon::MuPatCandidateBase::m_hasSmallChamber {false} |
|
privateinherited |
◆ m_hitList
◆ m_phiHits
MeasVec Muon::MuPatCandidateBase::m_phiHits |
|
privateinherited |
◆ m_seedSeg
The special segment for this track.
Definition at line 159 of file MuPatTrack.h.
◆ m_segments
◆ m_stations
◆ m_track
std::unique_ptr<Trk::Track> Muon::MuPatTrack::m_track {} |
|
private |
◆ ncscHitsEta
unsigned int Muon::MuPatCandidateBase::ncscHitsEta {0} |
|
inherited |
◆ ncscHitsPhi
unsigned int Muon::MuPatCandidateBase::ncscHitsPhi {0} |
|
inherited |
◆ nmdtHitsMl1
unsigned int Muon::MuPatCandidateBase::nmdtHitsMl1 {0} |
|
inherited |
◆ nmdtHitsMl2
unsigned int Muon::MuPatCandidateBase::nmdtHitsMl2 {0} |
|
inherited |
◆ nrpcHitsEta
unsigned int Muon::MuPatCandidateBase::nrpcHitsEta {0} |
|
inherited |
◆ nrpcHitsPhi
unsigned int Muon::MuPatCandidateBase::nrpcHitsPhi {0} |
|
inherited |
◆ ntgcHitsEta
unsigned int Muon::MuPatCandidateBase::ntgcHitsEta {0} |
|
inherited |
◆ ntgcHitsPhi
unsigned int Muon::MuPatCandidateBase::ntgcHitsPhi {0} |
|
inherited |
◆ s_numberOfInstantiations
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
void addToTrash(std::unique_ptr< const Trk::MeasurementBase > meas)
adds the measurement to the garbage container.
static StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
std::string find(const std::string &s)
return a remapped string
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
const std::set< MuonStationIndex::ChIndex > & chambers() const
returns set with contained chamberIndices
void updateSegments(bool add)
update segment/track association, if add == true ,will add track to segments else remove it
std::unique_ptr< Trk::Track > m_track
@ AmbiguitySelectCandidates
std::vector< std::shared_ptr< const Trk::MeasurementBase > > m_garbage
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
@ u
Enums for curvilinear frames.
#define AmgSymMatrix(dim)
static std::vector< std::string > initProcessingStageStrings()
Initialize s_processingStageStrings & s_processingStageStringMaxLen.
@ StraightTrack
A straight track.
bool hasMomentum() const
returns whether canditate has a momentum measurement
MuPatCandidateBase()=default
constructor.
const std::set< Identifier > & chamberIds() const
returns set with contained chamber ids
std::vector< MuPatSegment * > m_excludedSegments
std::set< MuonStationIndex::StIndex > m_stations
void setChambers(const std::set< MuonStationIndex::ChIndex > &chambers)
Set the list of chambers and update list of stations.
static const std::vector< std::string > & processingStageStrings()
Return list of processing stage strings.
bool add(const std::string &hname, TKey *tobj)
MuPatSegment * m_seedSeg
The special segment for this track.
void modifySegmentCounters(int change)
increase the segment counters by the passed number
const Perigee * perigeeParameters() const
return Perigee.
ProcessingStage lastSegmentChange
@ NumberOfProcessingStages
static std::atomic_size_t s_numberOfInstantiations
bool containsChamber(MuonStationIndex::ChIndex chIndex) const
returns whether the ChamberIndex is already contained in candidate
Trk::Track & track() const
access to track
std::set< Identifier > m_chamberIds
std::set< MuonStationIndex::ChIndex > m_chambers
void addChamber(MuonStationIndex::ChIndex chIndex)
add the chamber to the list of contained chambers.
ChIndex
enum to classify the different chamber layers in the muon spectrometer
std::vector< MuPatSegment * > m_segments
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
const std::vector< MuPatSegment * > & segments() const
access to segments
@ AmbiguityCreateCandidateFromSeeds
const MeasVec & hits() const
return all hits on the entry.
bool trackProperties(const TrackProperties &property) const
Access methods for track properties.
const std::set< MuonStationIndex::StIndex > & stations() const
returns set with contained stationIndices
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)