![]() |
ATLAS Offline Software
|
Helper class to group muon sgements that may belong to a muon trajectory. More...
#include <MsTrackSeeder.h>
Classes | |
| struct | Config |
| Configuration object. More... | |
Public Types | |
| enum | SectorProjector : std::int8_t { SectorProjector::leftOverlap = -1, SectorProjector::center = 0, SectorProjector::rightOverlap = 1 } |
| Enumeration to select the sector projection. More... | |
| enum | SeedCoords : std::uint8_t { SeedCoords::eDetSection, SeedCoords::eSector, SeedCoords::ePosOnCylinder } |
| Abrivation of the seed coordinates. More... | |
| using | SearchTree_t = Acts::KDTree< 3, const xAOD::MuonSegment *, double, std::array, 6 > |
| Definition of the search tree class. More... | |
| using | Location = MsTrackSeed::Location |
| Enum toggling whether the segment is in the endcap or barrel. More... | |
| using | VecOpt_t = std::optional< Amg::Vector3D > |
Public Member Functions | |
| MsTrackSeeder (const std::string &msgName, Config &&cfg) | |
| Standard constructor. More... | |
| SearchTree_t | constructTree (const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegmentContainer &segments) const |
| Construct a complete search tree from a MuonSegment container. More... | |
| Amg::Vector2D | expressOnCylinder (const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegment &segment, const Location loc, const SectorProjector proj) const |
| Expresses the segment on the cylinder surface. More... | |
| Amg::Vector3D | projectOntoPhiPlane (const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegment &segment, const double projectPhi) const |
| Amg::Vector3D | projectOntoSector (const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegment &segment, const SectorProjector proj) const |
| Projects the segment's position onto the sector centre or onto the overlap point with one of the neighbouring sector. More... | |
| Amg::Vector3D | projectOntoSector (const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegment &segment, const MsTrackSeed &seed) const |
| Projects the segment's position onto the sector centre or onto the overlap point with one of the neighbouring sector. More... | |
| double | estimateQtimesP (const ActsTrk::GeometryContext &gctx, const AtlasFieldCacheCondObj &magField, const MsTrackSeed &seed) const |
| Estimate the q /p of the seed candidate from the contained segments. More... | |
| bool | withinBounds (const Amg::Vector2D &projPos, const Location loc) const |
| Returns whether the expression on the cylinder is within the surface bounds. More... | |
| std::unique_ptr< MsTrackSeedContainer > | findTrackSeeds (const EventContext &ctx, const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegmentContainer &segments) const |
| Constructs the MS track seeds from the segment container. 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... | |
Static Public Member Functions | |
| static double | projectedPhi (const int sector, const SectorProjector proj) |
| Returns the projected phi for a given sector and projector. More... | |
| static SectorProjector | projectorFromSeed (const xAOD::MuonSegment &seg, const MsTrackSeed &refSeed) |
| Returns the Sector projector within the context of a MsTrackSeed. More... | |
Private Types | |
| using | TreeRawVec_t = SearchTree_t::vector_t |
| Abbrivation of the KDTree raw data vector. More... | |
Private Member Functions | |
| const MuonGMR4::SpectrometerSector * | envelope (const xAOD::MuonSegment &segment) const |
| Returns the spectrometer envelope associated to the segment (Coord system where the parameter are expressed) More... | |
| std::optional< double > | calculateRadius (VecOpt_t &&pI, VecOpt_t &&pM, VecOpt_t &&pO, const Amg::Vector3D &planeNorm) const |
| Calculates the radius of the bending circle from three points using the sagitta. More... | |
| void | appendSegment (const ActsTrk::GeometryContext &gctx, const xAOD::MuonSegment *segment, const Location loc, TreeRawVec_t &outContainer) const |
| Append the to the raw data container. More... | |
| std::unique_ptr< MsTrackSeedContainer > | resolveOverlaps (MsTrackSeedContainer &&unresolved) const |
| Removes exact duplciates or partial subsets of the MsTrackSeeds. More... | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. More... | |
Private Attributes | |
| Config | m_cfg {} |
| 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... | |
Helper class to group muon sgements that may belong to a muon trajectory.
The reconstructed muon segments are projected onto the surface of a cylinder crossing roughly the middle stations of the MS. They are then appended to a 3-dimensional search tree using the extrapolated coordinate on the cylnder, the cylinder surface index and the segment's associated sector number.
Definition at line 29 of file MsTrackSeeder.h.
Enum toggling whether the segment is in the endcap or barrel.
Definition at line 56 of file MsTrackSeeder.h.
| using MuonR4::MsTrackSeeder::SearchTree_t = Acts::KDTree<3, const xAOD::MuonSegment*, double, std::array, 6> |
Definition of the search tree class.
Definition at line 54 of file MsTrackSeeder.h.
|
private |
Abbrivation of the KDTree raw data vector.
Definition at line 160 of file MsTrackSeeder.h.
| using MuonR4::MsTrackSeeder::VecOpt_t = std::optional<Amg::Vector3D> |
Definition at line 58 of file MsTrackSeeder.h.
|
strong |
Enumeration to select the sector projection.
| Enumerator | |
|---|---|
| leftOverlap | |
| center | Project the segment onto the overlap with the previous sector. |
| rightOverlap | Project the segment onto the sector centre. |
Definition at line 60 of file MsTrackSeeder.h.
|
strong |
Abrivation of the seed coordinates.
| Enumerator | |
|---|---|
| eDetSection | Encode the seed location (-1,1 -> endcaps, 0 -> barrel |
| eSector | Sector of the associated spectrometer sector. |
| ePosOnCylinder | Extrapolation position along the cylinder surface. |
Definition at line 66 of file MsTrackSeeder.h.
Standard constructor.
| msgName | Name of the seeder's msgStream |
| cfg | Configured cylinder dimensions, cuts & selection tool |
Definition at line 88 of file MsTrackSeeder.cxx.
|
private |
Append the to the raw data container.
If the projection onto the barrel cylinder / endcap discs exceeds the bounds, the segment is not added. Segments in sector 1/16 are mirrored into sector 0/17 to complete the search range
| gctx | Geometry context to fetch the transforms of the associated sector envelope |
| segment | Pointer to the segment to add |
| loc | Switch whether the segment shall be projected onto barrel/endcap |
| outContainer | Raw KDTree data vector where the segment is appended |
Check whether the segment belongs to the left or right sector as well
Blow-up the number of sectors by a factor of 2. The even numbers represent the segments expressed @ the sector centre. The odd numbers represent the overlap region between two adjacent sectors. For sector 16, the right overlap region is mapped to 1
Enumeration to indicate whether the segment is expressed on the negative endcap (-1), the barrel (0) or the positive endcap
Coordinate on the cylinder
Definition at line 357 of file MsTrackSeeder.cxx.
|
private |
Calculates the radius of the bending circle from three points using the sagitta.
If one point is not defined, the origin is inserted instead. If two or more points are not set, a nullopt is returned
Derive the radius from the two equations. The line connecting pI and pO divides up the radius in the sagitta and the complementary section H R = S + H Also H is the catheter of the triangle <R, L / 2, H> R^{2} = L^{2} / 4 + H^{2} —> R^{2} = L^{2} / 4 + (R-S)^{2} —> 2*S*R = L^{2} / 4 + S^{2} (Approximating S^{2} = 0) —> R = L^{2} / (8 * s)
Definition at line 195 of file MsTrackSeeder.cxx.
| SearchTree_t MuonR4::MsTrackSeeder::constructTree | ( | const ActsTrk::GeometryContext & | gctx, |
| const xAOD::MuonSegmentContainer & | segments | ||
| ) | const |
Construct a complete search tree from a MuonSegment container.
| gctx | Geometry context to fetch the transforms of the associated sector envelope |
| segments | Reference to the segment container to construct. |
Definition at line 394 of file MsTrackSeeder.cxx.
|
inlineprivate |
Returns the spectrometer envelope associated to the segment (Coord system where the parameter are expressed)
| segment | Reference to the segment of interest |
Definition at line 106 of file MsTrackSeeder.cxx.
| double MuonR4::MsTrackSeeder::estimateQtimesP | ( | const ActsTrk::GeometryContext & | gctx, |
| const AtlasFieldCacheCondObj & | magField, | ||
| const MsTrackSeed & | seed | ||
| ) | const |
Estimate the q /p of the seed candidate from the contained segments.
A circle from the inner, middle & outer segment points is constructed. To avoid side effects from (non)-present phi measurements, the segments are expressed on the sector planes
| gctx | Geometry context to fetch the transforms of the associated sector envelope |
| magFiel | Reference to the magnetic field holder |
| seed | Reference to the seed of interest. |
Calculate the averaged phi from the segments
Calculate the sagitta points
Sample the magnetic field
Calculate the radius from the barrel segments
Calculate the radius from the endcap segments
If no radius could be calculated return the straight line estimator
Definition at line 228 of file MsTrackSeeder.cxx.
| Amg::Vector2D MuonR4::MsTrackSeeder::expressOnCylinder | ( | const ActsTrk::GeometryContext & | gctx, |
| const xAOD::MuonSegment & | segment, | ||
| const Location | loc, | ||
| const SectorProjector | proj | ||
| ) | const |
Expresses the segment on the cylinder surface.
| gctx | Geometry context to fetch the transforms of the associated sector envelope |
| segment | Reference to the segment of consideration |
| loc | Surface location: [barrel/endcap] |
extrapolated position
Definition at line 159 of file MsTrackSeeder.cxx.
| std::unique_ptr< MsTrackSeedContainer > MuonR4::MsTrackSeeder::findTrackSeeds | ( | const EventContext & | ctx, |
| const ActsTrk::GeometryContext & | gctx, | ||
| const xAOD::MuonSegmentContainer & | segments | ||
| ) | const |
Constructs the MS track seeds from the segment container.
| ctx | EventContext to access conditions / event data |
| segments | Refrence to the overall event's segment container |
Bad segment not suitable for track seeding or the segment coordinates are just mirrored at the overlap between sector 1 -> 16
Define the search range.
Ensure that only endcap / barrel seeds are considered. The values are integers -> add tiny margin
Move 25 cm along the projected plane
Include the neighbouring sectors
Using the cube above, let the tree search for all compatible segments
Ensure that the sector overlap and momentum vectors are compatible with a MS trajectory
No segments were combined
Calculate the seed's position
Definition at line 405 of file MsTrackSeeder.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 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.
|
static |
Returns the projected phi for a given sector and projector.
| sector | Sector of interest [1-16] |
| proj | Enum indicating whether the angle at the left/right overlap or sector center shall be returned |
Definition at line 101 of file MsTrackSeeder.cxx.
| Amg::Vector3D MuonR4::MsTrackSeeder::projectOntoPhiPlane | ( | const ActsTrk::GeometryContext & | gctx, |
| const xAOD::MuonSegment & | segment, | ||
| const double | projectPhi | ||
| ) | const |
Recall that the sector coordinate system is defined such that the x-axis is aligned with the nominal wire direction
Calculate the proper intersection point
Definition at line 138 of file MsTrackSeeder.cxx.
| Amg::Vector3D MuonR4::MsTrackSeeder::projectOntoSector | ( | const ActsTrk::GeometryContext & | gctx, |
| const xAOD::MuonSegment & | segment, | ||
| const MsTrackSeed & | seed | ||
| ) | const |
Projects the segment's position onto the sector centre or onto the overlap point with one of the neighbouring sector.
| gctx | Geometry context to fetch the transforms of the associated sector envelope |
| segment | Reference to the segment to project |
| seed | Reference to the seed w.r.t. which the segment shall be projected |
Definition at line 124 of file MsTrackSeeder.cxx.
| Amg::Vector3D MuonR4::MsTrackSeeder::projectOntoSector | ( | const ActsTrk::GeometryContext & | gctx, |
| const xAOD::MuonSegment & | segment, | ||
| const SectorProjector | proj | ||
| ) | const |
Projects the segment's position onto the sector centre or onto the overlap point with one of the neighbouring sector.
| gctx | Geometry context to fetch the transforms of the associated sector envelope |
| segment | Reference to the segment to project |
| proj | Projector indicating onto which fix point of the sector the projection happens |
Fetch the phi onto which we want to project the segment without leaving the wire.
Definition at line 129 of file MsTrackSeeder.cxx.
|
static |
Returns the Sector projector within the context of a MsTrackSeed.
| seg | Reference to the segment for which the Sector projector shall be returned |
| refSeed | Seed context in which the segment is embedded |
Definition at line 112 of file MsTrackSeeder.cxx.
|
private |
Removes exact duplciates or partial subsets of the MsTrackSeeds.
| unresolved | Input MsTrackSeedContainer with duplicates |
Resort the seeds starting from the ones with the most segments to the lowest
There is no segment which shares at least one segment with this candidate
Take the longer seed
Definition at line 479 of file MsTrackSeeder.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.
| bool MuonR4::MsTrackSeeder::withinBounds | ( | const Amg::Vector2D & | projPos, |
| const Location | loc | ||
| ) | const |
Returns whether the expression on the cylinder is within the surface bounds.
| projPos | Projected position on the cylinder |
| loc | Surface location: [barrel/endcap] |
Definition at line 180 of file MsTrackSeeder.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
Definition at line 176 of file MsTrackSeeder.h.
|
mutableprivateinherited |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.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.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
1.8.18