![]() |
ATLAS Offline Software
|
Pattern state object storing pattern information during construction. More...
Public Member Functions | |
| PatternState (const CandidateHit &seed, const std::int8_t expSector, const Config *cfg, const AthMessaging *logger) | |
| Constructor taking the seed information. | |
| PatternState ()=delete | |
| Delete default destructor - ensure patterns are always constructed from a seed or another pattern. | |
| PatternState (PatternState &&other) noexcept=default | |
| Move constructor. | |
| PatternState & | operator= (PatternState &&other) noexcept=default |
| Move assignment operator. | |
| PatternState (const PatternState &other)=default | |
| Copy constructor. | |
| PatternState & | operator= (const PatternState &other)=default |
| Copy assignment operator. | |
| ~PatternState ()=default | |
| Destructor. | |
| void | addHit (const CandidateHit &hit, const double residual, const double acceptWindow) |
| Add a hit to the pattern and update the internal state. | |
| void | overWriteHit (const CandidateHit &newHit, const double newResidual, const double newAcceptWindow) |
| Overwrite the hits on the last layer with the new one. | |
| LineTestRes | checkLineComp (const CandidateHit &testHit, const Amg::Vector3D &beamSpot) |
| Method checking line compatibility of a test hit against the pattern. | |
| LineTestRes | computeLineResidual (const CandidateHit &testHit) const |
| Method to compute the residual of a test hit against the pattern line. | |
| Amg::Vector3D | projToPhiPlane (const HitPayload &hit) const |
| Project a certain hit position onto the bending plane where the pattern is defined. | |
| bool | isPhiCompatible (const double testPhi) const |
| Method to check the phi compatibility of a test hit with a given pattern. | |
| bool | isInPattern (const HitPayload &hit) const |
| Check wheter a hit is present in the pattern. | |
| void | finalizePatternPhi () |
| Finalize the pattern building in phi and update its state. | |
| void | moveLineAnchorHit (const CandidateHit &refHit) |
| Move the line anchor hit given a reference hit. | |
| void | updateLineParameters (const Amg::Vector3D &beamSpot) |
| Update the line parameters based on the current hits. | |
| void | updatePatternPhi (const double newPhi) |
| Helper method to update the pattern phi and bending plane normal. | |
| double | getMeanResidual2 () const |
| Return the mean normalized residual squared. | |
| uint8_t | nBendingHits () const |
| Return the number of hits in bending coordinate. | |
| uint8_t | nBendingLayers () const |
| Return the number of layers in bending coordinate. | |
| uint8_t | nStations (const bool onlyGoodStations) const |
| Method returning the number of stations. | |
| std::vector< const SpacePointBucket * > | getParentBuckets () const |
| Get the buckets associated with the pattern. | |
| bool | isInLastLayer (const CandidateHit &hit) const |
| Check whether a given hit is in the last layer. | |
| bool | operator== (const PatternState &other) const =delete |
| Patterns are considered identical if they have the same hit content. | |
| void | print (std::ostream &ostr, bool detailed) const |
| Print the pattern candidate. | |
Public Attributes | |
| const Config * | cfg {nullptr} |
| Pointer to cfg option. | |
| const AthMessaging * | logger {nullptr} |
| Logger. | |
| Acts::CloneablePtr< PatternHitVisualInfo > | visualInfo {nullptr} |
| Pointer to Visual Information for pattern visualization. | |
| CandidateHit | lastInsertedHit {} |
| Last inserted hit. | |
| CandidateHit | prevLayerHit {} |
| Last hit in the second-to-last layer. | |
| CandidateHit | lineAnchorHit {} |
| Line anchor hit. | |
| CandidateHit | seedHit {} |
| Seed hit. | |
| Amg::Vector3D | bendPlaneNorm {Amg::Vector3D::Zero()} |
| Normal vector to the bending plane where the pattern lies. | |
| Amg::Vector3D | linePos {Amg::Vector3D::Zero()} |
| Position and direction of the pattern line. | |
| Amg::Vector3D | lineDir {Amg::Vector3D::Zero()} |
| double | leverArm {0.} |
| Distance between the two points defining the pattern line. | |
| double | meanNormResidual2 {0.} |
| Mean over eta hits of the square of their residual divided by acceptance window. | |
| double | lastResidual {0.} |
| Residual & acceptance window of the last inserted hit (needed when replacing a hit). | |
| double | lastAcceptWindow {0.} |
| double | patPhi {0.} |
| Pattern phi, which is the phi of the bending plane where the pattern lies. | |
| ExpandedSector | expSect {static_cast<int8_t>(0)} |
| expanded MS sector | |
| uint8_t | nPrecisionLayers {0u} |
| Counts of precision / non-precision / phi layers. | |
| uint8_t | nTriggerLayers {0u} |
| uint8_t | nPhiLayers {0u} |
| bool | isFinalized {false} |
| Flag to indicate if the pattern has been finalized. | |
| bool | isOverlap {false} |
| Flag to indicate if the pattern is overlapping with another one, used during overlap removal. | |
| bool | useBeamspot {false} |
| Whether we used the beamspot to compute the line parameters. | |
| bool | needLineUpdate {false} |
| Whether we need to update the pattern line the next time we find a hit in a new layer. | |
| std::array< uint8_t, s_nStations > | nMeasurementLayers {} |
| Counts of measurement layers per station. | |
| std::array< std::vector< CandidateHit >, s_nStations > | hitsPerStation {} |
| Map collection of hits per station. | |
| std::vector< HitPayload > | phiOnlyHits {} |
| Array holding phi-only hits. | |
Pattern state object storing pattern information during construction.
Definition at line 194 of file GlobalPatternFinder.h.
| MuonR4::FastReco::GlobalPatternFinder::PatternState::PatternState | ( | const CandidateHit & | seed, |
| const std::int8_t | expSector, | ||
| const Config * | cfg, | ||
| const AthMessaging * | logger ) |
Constructor taking the seed information.
| seed | seed hit |
| expSector | expanded sector coordinate |
| cfg | pointer to configuration object |
| logger | pointer to messaging object |
Update the hit counts in bending direction
Add now the new hit
Definition at line 747 of file GlobalPatternFinder.cxx.
|
delete |
Delete default destructor - ensure patterns are always constructed from a seed or another pattern.
|
defaultnoexcept |
Move constructor.
| other | other pattern state to move from |
|
default |
Copy constructor.
| other | other pattern state to copy from |
|
default |
Destructor.
| void MuonR4::FastReco::GlobalPatternFinder::PatternState::addHit | ( | const CandidateHit & | hit, |
| const double | residual, | ||
| const double | acceptWindow ) |
Add a hit to the pattern and update the internal state.
| hit | hit to be added |
| residual | residual of the hit |
| acceptWindow | acceptance window |
Update the pointers to previous layer hit
Update the hit counts in bending direction
Update the phi of the pattern if there are no phi hits yet
Add now the new hit
Update the residual. Since we can also add consecutive MDT hits without updating the residual, we need to check the accept window
Definition at line 981 of file GlobalPatternFinder.cxx.
| GlobalPatternFinder::LineTestRes MuonR4::FastReco::GlobalPatternFinder::PatternState::checkLineComp | ( | const CandidateHit & | testHit, |
| const Amg::Vector3D & | beamSpot ) |
Method checking line compatibility of a test hit against the pattern.
| testHit | test hit information |
| beamSpot | Beam spot position, needed to update the pattern line |
Helper function to make the result
| decision | The decision for the test result if the residual is within the acceptance window |
Sanity check: Test hit coincides with the last inserted hit
We add the test hit to the pattern if they are consecutive MDT hits
If they are not consecutive MDT hits && all insterted hits are on the same layer
If the primary measurement is the same and both measure phi, we keep the most compatible in phi
sTGCs: we can have trigger hits (Pad) and precision hits (strip) on the same layer
Test hit is a trigger hit and last inserted is precision, keep the precision hit
Test hit is a precision hit and last inserted is trigger, if compatible we overwrite the last inserted hit
Definition at line 772 of file GlobalPatternFinder.cxx.
| GlobalPatternFinder::LineTestRes MuonR4::FastReco::GlobalPatternFinder::PatternState::computeLineResidual | ( | const CandidateHit & | testHit | ) | const |
Method to compute the residual of a test hit against the pattern line.
| testHit | test hit information |
Dynamic acceptance window derived from the propagation of the measurement variance to the residual. In this simple model, the measurement variance is assumed isotropic. The residual variance increases
with the normalized extrapolation distance alpha = s / L, where s is the projection of the hit onto the pattern direction and L is the pattern lever arm.
Loosen the window when using the beamspot as reference, as the line slope is less well defined, and when we are looking for hits in a new station.
Definition at line 922 of file GlobalPatternFinder.cxx.
| void MuonR4::FastReco::GlobalPatternFinder::PatternState::finalizePatternPhi | ( | ) |
Finalize the pattern building in phi and update its state.
If there are no phi hits, we just use the central phi of the sector/overlap region
Definition at line 1073 of file GlobalPatternFinder.cxx.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::getMeanResidual2 | ( | ) | const |
Return the mean normalized residual squared.
Definition at line 1118 of file GlobalPatternFinder.cxx.
| std::vector< const SpacePointBucket * > MuonR4::FastReco::GlobalPatternFinder::PatternState::getParentBuckets | ( | ) | const |
Get the buckets associated with the pattern.
Definition at line 1124 of file GlobalPatternFinder.cxx.
| bool MuonR4::FastReco::GlobalPatternFinder::PatternState::isInLastLayer | ( | const CandidateHit & | hit | ) | const |
Check whether a given hit is in the last layer.
Definition at line 1135 of file GlobalPatternFinder.cxx.
| bool MuonR4::FastReco::GlobalPatternFinder::PatternState::isInPattern | ( | const HitPayload & | hit | ) | const |
Check wheter a hit is present in the pattern.
| hit | hit to be checked |
Definition at line 1068 of file GlobalPatternFinder.cxx.
| bool MuonR4::FastReco::GlobalPatternFinder::PatternState::isPhiCompatible | ( | const double | testPhi | ) | const |
Method to check the phi compatibility of a test hit with a given pattern.
| testPhi | test global phi |
We check that the test hit is compatible with the pattern phi, if available, which is given by the first phi measurement in the pattern. If the pattern doesn't have a phi yet, we check that the test hit is in the same pattern sector(s)
Definition at line 957 of file GlobalPatternFinder.cxx.
| void MuonR4::FastReco::GlobalPatternFinder::PatternState::moveLineAnchorHit | ( | const CandidateHit & | refHit | ) |
Move the line anchor hit given a reference hit.
The anchor is defined as the closest hit in the closest station to the referece hit,
Definition at line 848 of file GlobalPatternFinder.cxx.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nBendingHits | ( | ) | const |
Return the number of hits in bending coordinate.
Definition at line 1110 of file GlobalPatternFinder.cxx.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nBendingLayers | ( | ) | const |
Return the number of layers in bending coordinate.
Definition at line 1115 of file GlobalPatternFinder.cxx.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nStations | ( | const bool | onlyGoodStations | ) | const |
Method returning the number of stations.
| onlyGoodStations | flag to indicate if only good stations should be counted, i.e. having a minimum number of hits |
Definition at line 1101 of file GlobalPatternFinder.cxx.
|
default |
Copy assignment operator.
| other | other pattern state to copy from |
|
defaultnoexcept |
Move assignment operator.
| other | other pattern state to move from |
|
delete |
Patterns are considered identical if they have the same hit content.
However, map comparison is very expensive
| void MuonR4::FastReco::GlobalPatternFinder::PatternState::overWriteHit | ( | const CandidateHit & | newHit, |
| const double | newResidual, | ||
| const double | newAcceptWindow ) |
Overwrite the hits on the last layer with the new one.
| newHit | new hit to replace with |
| newResidual | residual of the new hit |
| newAcceptWindow | acceptance window of the new hit |
| beamSpot | needed to update line parameters |
Update the phi counts
Update the residual
Add now the new hit
Definition at line 1017 of file GlobalPatternFinder.cxx.
| void MuonR4::FastReco::GlobalPatternFinder::PatternState::print | ( | std::ostream & | ostr, |
| bool | detailed ) const |
Print the pattern candidate.
Definition at line 1267 of file GlobalPatternFinder.cxx.
| Amg::Vector3D MuonR4::FastReco::GlobalPatternFinder::PatternState::projToPhiPlane | ( | const HitPayload & | hit | ) | const |
Project a certain hit position onto the bending plane where the pattern is defined.
The hit is moved along the sensor direction if it does not measure phi, or is rotated around the Z axis if it does.
| hit | hit whose position is to be projected |
Definition at line 948 of file GlobalPatternFinder.cxx.
| void MuonR4::FastReco::GlobalPatternFinder::PatternState::updateLineParameters | ( | const Amg::Vector3D & | beamSpot | ) |
Update the line parameters based on the current hits.
| beamSpot | position of the beam spot, needed when there are not enough hits |
Definition at line 878 of file GlobalPatternFinder.cxx.
| void MuonR4::FastReco::GlobalPatternFinder::PatternState::updatePatternPhi | ( | const double | newPhi | ) |
Helper method to update the pattern phi and bending plane normal.
Definition at line 1153 of file GlobalPatternFinder.cxx.
| Amg::Vector3D MuonR4::FastReco::GlobalPatternFinder::PatternState::bendPlaneNorm {Amg::Vector3D::Zero()} |
Normal vector to the bending plane where the pattern lies.
Definition at line 299 of file GlobalPatternFinder.h.
| ExpandedSector MuonR4::FastReco::GlobalPatternFinder::PatternState::expSect {static_cast<int8_t>(0)} |
expanded MS sector
Definition at line 314 of file GlobalPatternFinder.h.
| std::array<std::vector<CandidateHit>, s_nStations> MuonR4::FastReco::GlobalPatternFinder::PatternState::hitsPerStation {} |
Map collection of hits per station.
A pattern is determined by the hits belonging to it.
Definition at line 331 of file GlobalPatternFinder.h.
| bool MuonR4::FastReco::GlobalPatternFinder::PatternState::isFinalized {false} |
Flag to indicate if the pattern has been finalized.
Definition at line 320 of file GlobalPatternFinder.h.
| bool MuonR4::FastReco::GlobalPatternFinder::PatternState::isOverlap {false} |
Flag to indicate if the pattern is overlapping with another one, used during overlap removal.
Definition at line 322 of file GlobalPatternFinder.h.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::lastAcceptWindow {0.} |
Definition at line 310 of file GlobalPatternFinder.h.
| CandidateHit MuonR4::FastReco::GlobalPatternFinder::PatternState::lastInsertedHit {} |
Last inserted hit.
Needed to speed-up lookup
Definition at line 291 of file GlobalPatternFinder.h.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::lastResidual {0.} |
Residual & acceptance window of the last inserted hit (needed when replacing a hit).
Definition at line 309 of file GlobalPatternFinder.h.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::leverArm {0.} |
Distance between the two points defining the pattern line.
Definition at line 305 of file GlobalPatternFinder.h.
| CandidateHit MuonR4::FastReco::GlobalPatternFinder::PatternState::lineAnchorHit {} |
| Amg::Vector3D MuonR4::FastReco::GlobalPatternFinder::PatternState::lineDir {Amg::Vector3D::Zero()} |
Definition at line 303 of file GlobalPatternFinder.h.
| Amg::Vector3D MuonR4::FastReco::GlobalPatternFinder::PatternState::linePos {Amg::Vector3D::Zero()} |
Position and direction of the pattern line.
Both are constructed to be within the bending plane of the pattern
Definition at line 302 of file GlobalPatternFinder.h.
| const AthMessaging* MuonR4::FastReco::GlobalPatternFinder::PatternState::logger {nullptr} |
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::meanNormResidual2 {0.} |
Mean over eta hits of the square of their residual divided by acceptance window.
Definition at line 307 of file GlobalPatternFinder.h.
| bool MuonR4::FastReco::GlobalPatternFinder::PatternState::needLineUpdate {false} |
Whether we need to update the pattern line the next time we find a hit in a new layer.
Definition at line 326 of file GlobalPatternFinder.h.
| std::array<uint8_t, s_nStations> MuonR4::FastReco::GlobalPatternFinder::PatternState::nMeasurementLayers {} |
Counts of measurement layers per station.
Definition at line 329 of file GlobalPatternFinder.h.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nPhiLayers {0u} |
Definition at line 318 of file GlobalPatternFinder.h.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nPrecisionLayers {0u} |
Counts of precision / non-precision / phi layers.
Definition at line 316 of file GlobalPatternFinder.h.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nTriggerLayers {0u} |
Definition at line 317 of file GlobalPatternFinder.h.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::patPhi {0.} |
Pattern phi, which is the phi of the bending plane where the pattern lies.
Definition at line 312 of file GlobalPatternFinder.h.
| std::vector<HitPayload> MuonR4::FastReco::GlobalPatternFinder::PatternState::phiOnlyHits {} |
| CandidateHit MuonR4::FastReco::GlobalPatternFinder::PatternState::prevLayerHit {} |
| CandidateHit MuonR4::FastReco::GlobalPatternFinder::PatternState::seedHit {} |
| bool MuonR4::FastReco::GlobalPatternFinder::PatternState::useBeamspot {false} |
Whether we used the beamspot to compute the line parameters.
Definition at line 324 of file GlobalPatternFinder.h.
| Acts::CloneablePtr<PatternHitVisualInfo> MuonR4::FastReco::GlobalPatternFinder::PatternState::visualInfo {nullptr} |
Pointer to Visual Information for pattern visualization.
Definition at line 289 of file GlobalPatternFinder.h.