![]() |
ATLAS Offline Software
|
The SegmentAmbiSolver removes ambiguities between segment candidates from the fit. More...
#include <SegmentAmbiSolver.h>
Classes | |
| struct | Config |
| Configuration object to stree the ambiguties. More... | |
Public Types | |
| using | SegmentVec = std::vector<std::unique_ptr<Segment>> |
| Abrivation of the temporary segment container. | |
Public Member Functions | |
| SegmentAmbiSolver (const std::string &name, Config &&config) | |
| Constructor. | |
| SegmentVec | resolveAmbiguity (const ActsTrk::GeometryContext &gctx, SegmentVec &&toResolve) const |
| Launches the ambiguity resoltuion and returns a new temporary contained containing the good candidates only. | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Private Types | |
| enum class | Resolution : std::uint8_t { noOverlap , superSet , subSet } |
| Auxiliary enum to indicate the ambiguity status of the segment candidates. More... | |
| using | MeasurementSet = std::unordered_set<const xAOD::UncalibratedMeasurement*> |
| List of measurements out of which the segment is made of. | |
Private Member Functions | |
| std::vector< int > | driftSigns (const ActsTrk::GeometryContext &gctx, const Segment &segment, const Segment::MeasVec &measurements) const |
| Calculates the left-right ambiguities of the segment w.r.t each measurement. | |
| MeasurementSet | extractPrds (const Segment &segment) const |
| Extract the Uncalibrated measurements used to build the segment. | |
| unsigned int | countShared (const MeasurementSet &measSet1, const MeasurementSet &measSet2) const |
| Counts the number of measurements that're in both sets. | |
| double | redChi2 (const Segment &segment) const |
| Returns the reduced chi2 of the segment. | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| const Config | m_cfg {} |
| Configuration object. | |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) | |
The SegmentAmbiSolver removes ambiguities between segment candidates from the fit.
They typically arise from the sharing of hits between two candidates. The resolution happens in the following steps 1) The passed segment candidates are sorted by the reduced chi2 in increasing order Candidates which already have a sufficiently good chi2 are internally sorted by the degress of freedom in decreasing order 2) The first segment in the list has the most degrees of freedom with an acceptable chi2. Is is added to the list of good candidates. 3) The other segments are compared with the good candidates. If the segment shares at minimum 3 hits with a good candidate and has a worse chi2 and fewer hits it is marked for removal. If the good candidate has worse chi2 the segment takes over the place of the good candidate
Definition at line 27 of file SegmentAmbiSolver.h.
|
private |
List of measurements out of which the segment is made of.
Definition at line 72 of file SegmentAmbiSolver.h.
| using MuonR4::SegmentFit::SegmentAmbiSolver::SegmentVec = std::vector<std::unique_ptr<Segment>> |
Abrivation of the temporary segment container.
Definition at line 47 of file SegmentAmbiSolver.h.
|
strongprivate |
Auxiliary enum to indicate the ambiguity status of the segment candidates.
| Enumerator | |
|---|---|
| noOverlap | |
| superSet | No ambiguity with other candidates detected. |
| subSet | Ambiguity detected and the candidate is of better quality. Ambiguity detected but the candidate is of poorer quality |
Definition at line 58 of file SegmentAmbiSolver.h.
| MuonR4::SegmentFit::SegmentAmbiSolver::SegmentAmbiSolver | ( | const std::string & | name, |
| Config && | config ) |
Constructor.
| name | Name of the algorithm to synchronize the msg output |
| config | Ambiguity resolver configuration object |
Definition at line 10 of file SegmentAmbiSolver.cxx.
|
private |
Counts the number of measurements that're in both sets.
| measSet1 | First set of measurements to compare |
| measSet2 | Second set of measurements to compare |
Definition at line 121 of file SegmentAmbiSolver.cxx.
|
private |
Calculates the left-right ambiguities of the segment w.r.t each measurement.
| gctx | Geometry context to construct the local segment parameters |
| segment | The segment from which the line parameters are extracted |
| measurements | List of segment measurments w.r. the left-right signs need to be evaluated |
Definition at line 97 of file SegmentAmbiSolver.cxx.
|
private |
Extract the Uncalibrated measurements used to build the segment.
| segment | The segment from which the raw measurements should be fetched |
Definition at line 107 of file SegmentAmbiSolver.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 163 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 178 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
private |
Returns the reduced chi2 of the segment.
| segment | Segment of interest |
Definition at line 14 of file SegmentAmbiSolver.cxx.
| SegmentVec MuonR4::SegmentFit::SegmentAmbiSolver::resolveAmbiguity | ( | const ActsTrk::GeometryContext & | gctx, |
| SegmentVec && | toResolve ) const |
Launches the ambiguity resoltuion and returns a new temporary contained containing the good candidates only.
| gctx | Geometry context to construct the local segment parameters |
| toResolve | Collection of segments which need to be ambiguity resolved |
Sort segments with a reduced chi2 better than 5 (normmaly) by the degrees of freedom, otherwise by the reduced chi2 itself
Mark the first object as resolved
Fetch first the Prds
Check whether the two segments share hits at all
Re-evaluate the drift signs of the accepted measurement w.r.t. good one
Left-right solutions differ & the two segments have the same nDOF
Segments below that threshold are not considered for outlier removal Take the one which has more degrees of freedom
No overlap detected thus far
Definition at line 17 of file SegmentAmbiSolver.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
|
mutableprivateinherited |
|
mutableprivateinherited |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.