![]() |
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 double seedTheta, 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. | |
| 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 | finalizePatternEta () |
| Finalize the pattern building in eta and update its state. | |
| 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. | |
| 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. | |
| uint8_t | nMDTLastLayer () const |
| Gives the number of MDT hits on the last layer. | |
| 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 {} |
| Pointer to the last inserted hit. | |
| CandidateHit | prevLayerHit {} |
| Pointer to the last hit in the second-to-last layer. | |
| CandidateHit | lineAnchorHit {} |
| Pointer to the line anchor hit. | |
| double | theta {0.} |
| Average theta & average phi of the pattern. | |
| double | phi {0.} |
| 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 | lineSlope {0.} |
| Simple line model: slope and associated delta Z, i.e. | |
| double | dZ_slope {0.} |
| double | LR_factor {-1.} |
| Simple line model: factor for LR correction to be applied. | |
| double | anchorZ {0.} |
| Simple line model: anchor Z and R. | |
| double | anchorR {0.} |
| 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 190 of file GlobalPatternFinder.h.
| MuonR4::FastReco::GlobalPatternFinder::PatternState::PatternState | ( | const CandidateHit & | seed, |
| const std::int8_t | expSector, | ||
| const double | seedTheta, | ||
| const Config * | cfg, | ||
| const AthMessaging * | logger ) |
Constructor taking the seed information.
| seed | seed hit |
| expSector | expanded sector coordinate |
| seedTheta | global theta of the seed |
Update the hit counts in bending direction
Update the phi of the pattern
Add now the new hit
Definition at line 766 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 1004 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 compatibble 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 793 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 |
The dynamic acceptance window is defined using the error propagation law for the residual. We have two contributions: the line extrapolation distance (propagation factor) and the uncertainty on the line slope (geometrical factor)
Alpha parameter determining the propagation/ line extrapolation magnitude
Loosen the window when using the beamspot as reference, as the line slope is less well defined
Apply LR correction if needed
Definition at line 945 of file GlobalPatternFinder.cxx.
| void MuonR4::FastReco::GlobalPatternFinder::PatternState::finalizePatternEta | ( | ) |
Finalize the pattern building in eta and update its state.
This method is called at the end of pattern building in eta, so we don't have phi-only hits yet
Definition at line 1089 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 1099 of file GlobalPatternFinder.cxx.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::getMeanResidual2 | ( | ) | const |
Return the mean normalized residual squared.
Definition at line 1143 of file GlobalPatternFinder.cxx.
| std::vector< const SpacePointBucket * > MuonR4::FastReco::GlobalPatternFinder::PatternState::getParentBuckets | ( | ) | const |
Get the buckets associated with the pattern.
Definition at line 1160 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 1171 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 1084 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 980 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 867 of file GlobalPatternFinder.cxx.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nBendingHits | ( | ) | const |
Return the number of hits in bending coordinate.
Definition at line 1135 of file GlobalPatternFinder.cxx.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nBendingLayers | ( | ) | const |
Return the number of layers in bending coordinate.
Definition at line 1140 of file GlobalPatternFinder.cxx.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nMDTLastLayer | ( | ) | const |
Gives the number of MDT hits on the last layer.
Definition at line 1149 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 1126 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 1038 of file GlobalPatternFinder.cxx.
| void MuonR4::FastReco::GlobalPatternFinder::PatternState::print | ( | std::ostream & | ostr, |
| bool | detailed ) const |
Print the pattern candidate.
Definition at line 1292 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 897 of file GlobalPatternFinder.cxx.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::anchorR {0.} |
Definition at line 303 of file GlobalPatternFinder.h.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::anchorZ {0.} |
Simple line model: anchor Z and R.
Same as lineAnchorHit, except when using beamspot
Definition at line 302 of file GlobalPatternFinder.h.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::dZ_slope {0.} |
Definition at line 298 of file GlobalPatternFinder.h.
| ExpandedSector MuonR4::FastReco::GlobalPatternFinder::PatternState::expSect {static_cast<int8_t>(0)} |
expanded MS sector
Definition at line 305 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 322 of file GlobalPatternFinder.h.
| bool MuonR4::FastReco::GlobalPatternFinder::PatternState::isFinalized {false} |
Flag to indicate if the pattern has been finalized.
Definition at line 311 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 313 of file GlobalPatternFinder.h.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::lastAcceptWindow {0.} |
Definition at line 295 of file GlobalPatternFinder.h.
| CandidateHit MuonR4::FastReco::GlobalPatternFinder::PatternState::lastInsertedHit {} |
Pointer to the last inserted hit.
Needed to speed-up lookup
Definition at line 283 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 294 of file GlobalPatternFinder.h.
| CandidateHit MuonR4::FastReco::GlobalPatternFinder::PatternState::lineAnchorHit {} |
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::lineSlope {0.} |
Simple line model: slope and associated delta Z, i.e.
the distance in Z between the two points defining the line
Definition at line 297 of file GlobalPatternFinder.h.
| const AthMessaging* MuonR4::FastReco::GlobalPatternFinder::PatternState::logger {nullptr} |
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::LR_factor {-1.} |
Simple line model: factor for LR correction to be applied.
Definition at line 300 of file GlobalPatternFinder.h.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::meanNormResidual2 {0.} |
Mean over eta hits of the square of their residual divided by acceptance window.
Definition at line 292 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 317 of file GlobalPatternFinder.h.
| std::array<uint8_t, s_nStations> MuonR4::FastReco::GlobalPatternFinder::PatternState::nMeasurementLayers {} |
Counts of measurement layers per station.
Definition at line 320 of file GlobalPatternFinder.h.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nPhiLayers {0u} |
Definition at line 309 of file GlobalPatternFinder.h.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nPrecisionLayers {0u} |
Counts of precision / non-precision / phi layers.
Definition at line 307 of file GlobalPatternFinder.h.
| uint8_t MuonR4::FastReco::GlobalPatternFinder::PatternState::nTriggerLayers {0u} |
Definition at line 308 of file GlobalPatternFinder.h.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::phi {0.} |
Definition at line 290 of file GlobalPatternFinder.h.
| std::vector<HitPayload> MuonR4::FastReco::GlobalPatternFinder::PatternState::phiOnlyHits {} |
| CandidateHit MuonR4::FastReco::GlobalPatternFinder::PatternState::prevLayerHit {} |
Pointer to the last hit in the second-to-last layer.
Definition at line 285 of file GlobalPatternFinder.h.
| double MuonR4::FastReco::GlobalPatternFinder::PatternState::theta {0.} |
Average theta & average phi of the pattern.
Definition at line 289 of file GlobalPatternFinder.h.
| bool MuonR4::FastReco::GlobalPatternFinder::PatternState::useBeamspot {false} |
Whether we used the beamspot to compute the line parameters.
Definition at line 315 of file GlobalPatternFinder.h.
| Acts::CloneablePtr<PatternHitVisualInfo> MuonR4::FastReco::GlobalPatternFinder::PatternState::visualInfo {nullptr} |
Pointer to Visual Information for pattern visualization.
Definition at line 281 of file GlobalPatternFinder.h.