ATLAS Offline Software
|
Helper class to generate valid seeds for the segment fit. More...
#include <MdtSegmentSeedGenerator.h>
Classes | |
struct | Config |
Configuration switches of the module More... | |
struct | DriftCircleSeed |
Helper struct from a generated Mdt seed. More... | |
struct | SeedSolution |
Cache of all solutions seen thus far. More... | |
Public Types | |
using | HitVec = SpacePointPerLayerSorter::HitVec |
Public Member Functions | |
MdtSegmentSeedGenerator (const std::string &name, const SegmentSeed *segmentSeed, const Config &configuration) | |
Standard constructor taking the segmentSeed to start with and then few configuration tunes. More... | |
~MdtSegmentSeedGenerator () | |
std::optional< DriftCircleSeed > | nextSeed (const EventContext &ctx) |
returns the next seed in the row More... | |
unsigned int | numGenerated () const |
Returns how many seeds have been generated. More... | |
const Config & | config () const |
Returns the current seed configuration. More... | |
bool | msgLvl (const MSG::Level lvl) const |
Test the output level. More... | |
MsgStream & | msg () const |
The standard message stream. More... | |
MsgStream & | msg (const MSG::Level lvl) const |
The standard message stream. More... | |
void | setLevel (MSG::Level lvl) |
Change the current logging level. More... | |
Private Types | |
using | SignComboType = std::array< int, 2 > |
Sign combinations to draw the 4 lines tangent to 2 drift circles The first two are indicating whether the tangent is left/right to the first/second circle. More... | |
Private Member Functions | |
std::optional< DriftCircleSeed > | buildSeed (const EventContext &ctx, const HoughHitType &topHit, const HoughHitType &bottomHit, const SignComboType &signs) |
Tries to build the seed from the two hits. More... | |
void | fitDriftCircles (DriftCircleSeed &seed) const |
Refine the seed by performing a fast Mdt segment fit. More... | |
void | moveToNextCandidate () |
Prepares the generator to generate the seed from the next pair of drift circles. More... | |
void | initMessaging () const |
Initialize our message level and MessageSvc. More... | |
Private Attributes | |
Config | m_cfg {} |
const SegmentSeed * | m_segmentSeed {nullptr} |
SpacePointPerLayerSorter | m_hitLayers {m_segmentSeed->getHitsInMax()} |
std::size_t | m_upperLayer {0} |
Considered layer to pick the top drift circle from. More... | |
std::size_t | m_lowerLayer {0} |
Considered layer to pick the bottom drift circle from. More... | |
std::size_t | m_lowerHitIndex {0} |
Explicit hit to pick in the selected bottom layer. More... | |
std::size_t | m_upperHitIndex {0} |
Explicit hit to pick in the selected top layer. More... | |
std::size_t | m_signComboIndex {0} |
Explicit hit to pick in the selected top layer. More... | |
std::vector< SeedSolution > | m_seenSolutions {} |
unsigned int | m_nGenSeeds {0} |
Counter on how many seeds have been generated. More... | |
std::string | m_nm |
Message source name. More... | |
boost::thread_specific_ptr< MsgStream > | m_msg_tls |
MsgStream instance (a std::cout like with print-out levels) More... | |
std::atomic< IMessageSvc * > | m_imsg { nullptr } |
MessageSvc pointer. More... | |
std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
Current logging level. More... | |
std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
Messaging initialized (initMessaging) More... | |
Static Private Attributes | |
constexpr static std::array< SignComboType, 4 > | s_signCombos |
Helper class to generate valid seeds for the segment fit.
The generator first returns a seed directly made from the patten recogntion. Afterwards it builds seeds by lying tangent lines to a pair of drift circles. The pairing starts from the innermost & outermost layers with tubes. A valid seed must have at least 4 associated hits which are within a chi2 of 5. If two seeds within the parameter resolution are generated, then the latter one is skipped.
Definition at line 24 of file MdtSegmentSeedGenerator.h.
Definition at line 26 of file MdtSegmentSeedGenerator.h.
|
private |
Sign combinations to draw the 4 lines tangent to 2 drift circles The first two are indicating whether the tangent is left/right to the first/second circle.
The last sign is picking the sign of the solution arising from the final quadratic equation.
Definition at line 97 of file MdtSegmentSeedGenerator.h.
MuonR4::MdtSegmentSeedGenerator::MdtSegmentSeedGenerator | ( | const std::string & | name, |
const SegmentSeed * | segmentSeed, | ||
const Config & | configuration | ||
) |
Standard constructor taking the segmentSeed to start with and then few configuration tunes.
name | Name of the Seed generator's logger |
segmentSeed | Seed from which the seeds for the fit are built |
configuration | Passed configuration settings of the generator |
Check whether the first layer is too busy
Check whether the lower layer is too busy
Definition at line 41 of file MdtSegmentSeedGenerator.cxx.
|
default |
|
private |
Tries to build the seed from the two hits.
Fails if the solution is invalid or if the seed has already been built before
topHit | Hit candidate from the upper layer |
bottomHit | Hit candidate from the lower layer |
sign | Object encoding whether the tangent is left / right |
Create a new line position & direction which also takes the potential phi estimates into account
Recalculate the seed with the calibrated parameters
Check that the is within the predefined window
d/dx asin(x) = 1 / sqrt(1- x*x)
Collect all hits close to the seed line
Reject seeds with too litle Mdt hit association
Last check wheather another seed with the same left-right combination hasn't already been found
All seed hits are of the same size
Including the places where no seed hit was assigned. Both solutions match in terms of left-right solutions. It's very likely that they're converging to the same segment.
Add the solution to the list. That we don't iterate twice over it
If we found a long Mdt seed, then ensure that all subsequent seeds have at least the same amount of Mdt hits.
Let's find out whether they're topological connected by comparing the tube numbers
Associate strip hits
Add all hits with a pull better than the threshold
Definition at line 157 of file MdtSegmentSeedGenerator.cxx.
const MdtSegmentSeedGenerator::Config & MuonR4::MdtSegmentSeedGenerator::config | ( | ) | const |
Returns the current seed configuration.
Definition at line 37 of file MdtSegmentSeedGenerator.cxx.
|
private |
Refine the seed by performing a fast Mdt segment fit.
If the fit converged, the fit parameters and its errors are returned as optional. Otherwise nullopt is returned
seed | Seed built from the tangent adjacent to the two seed circles |
Calculate the coefficients to minimize the chi2
Now it's time to use the guestimate
Definition at line 332 of file MdtSegmentSeedGenerator.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inlineprivate |
Prepares the generator to generate the seed from the next pair of drift circles.
All 8 sign combinations are tried.
Get the next lower hit & check whether boundary is exceeded
Same for the hit in the upper layer
All combinations of hits & lines in both layers are processed Switch to the next lowerLayer. But skip the busy ones. For now place a cut on 3 hits
Definition at line 91 of file MdtSegmentSeedGenerator.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 164 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 179 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.
std::optional< MdtSegmentSeedGenerator::DriftCircleSeed > MuonR4::MdtSegmentSeedGenerator::nextSeed | ( | const EventContext & | ctx | ) |
returns the next seed in the row
Increment for the next candidate
If a candidate is built return it. Otherwise continue the process
Definition at line 117 of file MdtSegmentSeedGenerator.cxx.
unsigned int MuonR4::MdtSegmentSeedGenerator::numGenerated | ( | ) | const |
Returns how many seeds have been generated.
Definition at line 88 of file MdtSegmentSeedGenerator.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 |
Definition at line 142 of file MdtSegmentSeedGenerator.h.
|
private |
Definition at line 146 of file MdtSegmentSeedGenerator.h.
|
mutableprivateinherited |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.h.
|
private |
Explicit hit to pick in the selected bottom layer.
Definition at line 153 of file MdtSegmentSeedGenerator.h.
|
private |
Considered layer to pick the bottom drift circle from.
Definition at line 151 of file MdtSegmentSeedGenerator.h.
|
mutableprivateinherited |
Current logging level.
Definition at line 138 of file AthMessaging.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
private |
Counter on how many seeds have been generated.
Definition at line 161 of file MdtSegmentSeedGenerator.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Definition at line 159 of file MdtSegmentSeedGenerator.h.
|
private |
Definition at line 145 of file MdtSegmentSeedGenerator.h.
|
private |
Explicit hit to pick in the selected top layer.
Definition at line 157 of file MdtSegmentSeedGenerator.h.
|
private |
Explicit hit to pick in the selected top layer.
Definition at line 155 of file MdtSegmentSeedGenerator.h.
|
private |
Considered layer to pick the top drift circle from.
Definition at line 149 of file MdtSegmentSeedGenerator.h.
|
staticconstexprprivate |
Definition at line 98 of file MdtSegmentSeedGenerator.h.