![]() |
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 class | SeedCoords : std::uint8_t { eDetSection , eSector , 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. | |
| using | Location = MsTrackSeed::Location |
| Enum toggling whether the segment is in the endcap or barrel. | |
| using | SectorProjector = ExpandedSector::SectorProjector |
| Recycle the expanded sector. | |
| using | VecOpt_t = std::optional<Amg::Vector3D> |
| using | PosMomPair_t = std::pair<Amg::Vector3D, Amg::Vector3D> |
Public Member Functions | |
| MsTrackSeeder (const std::string &msgName, Config &&cfg) | |
| Standard constructor. | |
| SearchTree_t | constructTree (const xAOD::MuonSegmentContainer &segments) const |
| Construct a complete search tree from a MuonSegment container. | |
| Amg::Vector2D | expressOnCylinder (const xAOD::MuonSegment &segment, const Location loc, const ExpandedSector sector) const |
| Expresses the segment on the cylinder surface. | |
| double | estimateQtimesP (const AtlasFieldCacheCondObj &magField, const Amg::Vector3D &planeNorm, const PosMomPair_t &p1, const PosMomPair_t &p2, const PosMomPair_t &p3) const |
| Estimate the charge times momentum of a muon candidate when three points are available. | |
| double | estimateQtimesP (const AtlasFieldCacheCondObj &magField, const Amg::Vector3D &planeNorm, const PosMomPair_t &p1, const PosMomPair_t &p2) const |
| Estimate the charge times momentum of a muon candidate when two points are available. | |
| double | estimateQtimesP (const AtlasFieldCacheCondObj &magField, const MsTrackSeed &seed) const |
| Estimate the charge times momentum of a muon track candidate from the contained segments. | |
| bool | withinBounds (const Amg::Vector2D &projPos, const Location loc) const |
| Returns whether the expression on the cylinder is within the surface bounds. | |
| std::unique_ptr< MsTrackSeedContainer > | findTrackSeeds (const EventContext &ctx, const xAOD::MuonSegmentContainer &segments) const |
| Constructs the MS track seeds from the segment container. | |
| 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. | |
Static Public Member Functions | |
| static Amg::Vector3D | segPosOntoPhiPlane (const Amg::Vector3D &planeNorm, const int Sector, const Amg::Vector3D &posToProject) |
| Projects the segment position onto the plane with global phi = x The local coordinate system is arranged such that the x-axis is co-linear to the phi direction. | |
| static Amg::Vector3D | segDirOntoPhiPlane (const Amg::Vector3D &planeNorm, const Amg::Vector3D &dirToProject) |
| Projects the segment direction onto the plane with global phi = x by removing the component orthogonal to the plane. | |
Private Types | |
| using | TreeRawVec_t = SearchTree_t::vector_t |
| Abbrivation of the KDTree raw data vector. | |
Private Member Functions | |
| double | getPtimesQ (const Amg::Vector3D &forceIntegral, const Amg::Vector3D &deltaDir) const |
| Compute the charge times momentum from the integral of lorentz force and the total change in direction. | |
| Amg::Vector3D | forceIntegration (const PosMomPair_t &point1, const PosMomPair_t &point2, const Amg::Vector3D &planeNorm, MagField::AtlasFieldCache &fieldCache) const |
| Compute the integral of magnetic force (v x B ) dS along a trajectory, given the initial and final positions and directions of the trajectory. | |
| void | appendSegment (const xAOD::MuonSegment *segment, const Location loc, TreeRawVec_t &outContainer) const |
| Append the to the raw data container. | |
| std::unique_ptr< MsTrackSeedContainer > | resolveOverlaps (MsTrackSeedContainer &&unresolved) const |
| Removes exact duplciates or partial subsets of the MsTrackSeeds. | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| std::set< double > | m_fieldExtpSteps {} |
| Config | m_cfg {} |
| 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). | |
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::PosMomPair_t = std::pair<Amg::Vector3D, Amg::Vector3D> |
Definition at line 102 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.
Recycle the expanded sector.
Definition at line 58 of file MsTrackSeeder.h.
|
private |
Abbrivation of the KDTree raw data vector.
Definition at line 171 of file MsTrackSeeder.h.
| using MuonR4::MsTrackSeeder::VecOpt_t = std::optional<Amg::Vector3D> |
Definition at line 59 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 61 of file MsTrackSeeder.h.
Standard constructor.
| msgName | Name of the seeder's msgStream |
| cfg | Configured cylinder dimensions, cuts & selection tool |
Initialize the field extraction steps
Definition at line 35 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
| 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 300 of file MsTrackSeeder.cxx.
| SearchTree_t MuonR4::MsTrackSeeder::constructTree | ( | const xAOD::MuonSegmentContainer & | segments | ) | const |
Construct a complete search tree from a MuonSegment container.
| segments | Reference to the segment container to construct. |
Definition at line 334 of file MsTrackSeeder.cxx.
| double MuonR4::MsTrackSeeder::estimateQtimesP | ( | const AtlasFieldCacheCondObj & | magField, |
| const Amg::Vector3D & | planeNorm, | ||
| const PosMomPair_t & | p1, | ||
| const PosMomPair_t & | p2 ) const |
Estimate the charge times momentum of a muon candidate when two points are available.
The position and direction of each point need to be projected onto the given phi plane, and the muon trajectory is approximated as 2D trajectory within this plane.
| magField | Magnetic field |
| planeNorm | Normal of the bending plane containing the muon trajectory in this simplified approach |
| seg1 | First segment |
| seg2 | Second segment |
Definition at line 175 of file MsTrackSeeder.cxx.
| double MuonR4::MsTrackSeeder::estimateQtimesP | ( | const AtlasFieldCacheCondObj & | magField, |
| const Amg::Vector3D & | planeNorm, | ||
| const PosMomPair_t & | p1, | ||
| const PosMomPair_t & | p2, | ||
| const PosMomPair_t & | p3 ) const |
Estimate the charge times momentum of a muon candidate when three points are available.
The given position and direction of each point need to be projected onto the given phi plane, and the muon trajectory is approximated as 2D trajectory within this plane.
| magField | Magnetic field |
| planeNorm | Normal of the bending plane containing the muon trajectory in this simplified approach |
| seg1 | First segment |
| seg2 | Second segment |
| seg3 | Third segment |
Definition at line 104 of file MsTrackSeeder.cxx.
| double MuonR4::MsTrackSeeder::estimateQtimesP | ( | const AtlasFieldCacheCondObj & | magField, |
| const MsTrackSeed & | seed ) const |
Estimate the charge times momentum of a muon track candidate from the contained segments.
The position and direction of the segments are projected onto a given phi plane, defined by the segments with phi information or the sector plane.
The muon trajectory is approximated as 2D trajectory within this plane to avoid side effects from (non)-present phi measurements.
| magFiel | Reference to the magnetic field holder |
| seed | Reference to the seed of interest. |
Calculate the averaged phi from the segments
If less than 3 segments are found check whether the track crosses the BEE or EE chamber and use that segment as the third one.
Definition at line 219 of file MsTrackSeeder.cxx.
| Amg::Vector2D MuonR4::MsTrackSeeder::expressOnCylinder | ( | const xAOD::MuonSegment & | segment, |
| const Location | loc, | ||
| const ExpandedSector | sector ) const |
Expresses the segment on the cylinder surface.
| segment | Reference to the segment of consideration |
| loc | Surface location: [barrel/endcap] |
| expandedSector | The expanded sector number taking the overlap regions between large and small sectors into account [0;32] |
extrapolated position
Definition at line 59 of file MsTrackSeeder.cxx.
| std::unique_ptr< MsTrackSeedContainer > MuonR4::MsTrackSeeder::findTrackSeeds | ( | const EventContext & | ctx, |
| 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 344 of file MsTrackSeeder.cxx.
|
private |
Compute the integral of magnetic force (v x B ) dS along a trajectory, given the initial and final positions and directions of the trajectory.
The trajectory is approximated as a straight line between the two positions, and the magnetic field is evaluated at several points along this line.
| point1 | Initial position and direction |
| point2 | Final position and direction |
| planeNorm | Normal vector of the bending plane used for the momentum estimation, used to extract the orthogonal component to the field |
| fieldCache | Magnetic field cache |
Definition at line 185 of file MsTrackSeeder.cxx.
|
private |
Compute the charge times momentum from the integral of lorentz force and the total change in direction.
| forceIntegral | Cumulative lorentz force |
| deltaDir | Change in direction |
Definition at line 210 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 167 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 182 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 |
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
Definition at line 443 of file MsTrackSeeder.cxx.
|
static |
Projects the segment direction onto the plane with global phi = x by removing the component orthogonal to the plane.
| planeNorm | Normal of the phi plane onto which the segment is projected |
| dirToProject | Direction to project |
Definition at line 55 of file MsTrackSeeder.cxx.
|
static |
Projects the segment position onto the plane with global phi = x The local coordinate system is arranged such that the x-axis is co-linear to the phi direction.
The segment is moved along the MDT's wire direction in that sector.
| planeNorm | Normal of the phi plane onto which the segment is projected |
| Sector | Sector of the segment to be projected, needed to find the wire direction |
| posToProject | Position to project |
Definition at line 45 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 89 of file MsTrackSeeder.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging).
Definition at line 141 of file AthMessaging.h.
|
private |
Definition at line 186 of file MsTrackSeeder.h.
|
private |
Definition at line 185 of file MsTrackSeeder.h.
|
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.