![]() |
ATLAS Offline Software
|
Helper class to group muon sgements that may belong to a muon trajectory. More...
#include <MsTrackSeederTool.h>
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 | TreeRawVec_t = SearchTree_t::vector_t |
| Abbrivation of the KDTree raw data vector. | |
Public Member Functions | |
| virtual StatusCode | initialize () override final |
| virtual StatusCode | findTrackSeeds (const EventContext &ctx, std::vector< MsTrackSeed > &outSeeds) const override final |
| Retrieves the segment container from StoreGate and constructs TrackSeeds from them. | |
| virtual Acts::Result< Acts::BoundTrackParameters > | estimateStartParameters (const EventContext &ctx, const MsTrackSeed &seed) const override final |
| virtual double | estimateQtimesP (const EventContext &ctx, const Amg::Vector3D &planeNorm, std::span< const PosMomPair_t > circlePoints) const override final |
| virtual bool | withinBounds (const Amg::Vector2D &projPos, const Location loc) const override final |
| virtual Amg::Vector2D | expressOnCylinder (const Acts::GeometryContext &tgContext, const xAOD::MuonSegment &segment, const Location loc, const ExpandedSector sector) const override final |
| Expresses the passed segment on the virtual cylinder constructed by the track seeder. | |
| virtual double | estimateQtimesP (const Acts::GeometryContext &tgContext, const MsTrackSeed &seed, MagField::AtlasFieldCache &fieldCache) const override final |
| Estimate the charge times momentum of a muon track candidate from the contained segments. | |
Private Member Functions | |
| Amg::Vector3D | segPosOntoPhiPlane (const Acts::GeometryContext &tgContext, const Amg::Vector3D &planeNormal, const xAOD::MuonSegment &segment) const |
| 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. | |
| SearchTree_t | constructTree (const Acts::GeometryContext &tgContext, const xAOD::MuonSegmentContainer &segments) const |
| Construct a complete search tree from a MuonSegment container. | |
| double | estimateQtimesP (const Amg::Vector3D &planeNorm, const PosMomPair_t &p1, const PosMomPair_t &p2, const PosMomPair_t &p3, MagField::AtlasFieldCache &fieldCache) const |
| Estimate the charge times momentum of a muon candidate when three points are available. | |
| double | estimateQtimesP (const Amg::Vector3D &planeNorm, const PosMomPair_t &p1, const PosMomPair_t &p2, MagField::AtlasFieldCache &fieldCache) const |
| Estimate the charge times momentum of a muon candidate when two points are available. | |
| 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 Acts::GeometryContext &tgContext, const xAOD::MuonSegment *segment, const Location loc, TreeRawVec_t &outContainer) const |
| Append the segment to the raw data container. | |
| const MuonGMR4::SpectrometerSector * | envelope (const xAOD::MuonSegment &segment) const |
| Returns the spectrometer envelope associated to the segment (Coord system where the parameter are expressed). | |
| MsTrackSeedContainer | resolveOverlaps (MsTrackSeedContainer &&unresolved) const |
| Removes exact duplciates or partial subsets of the MsTrackSeeds. | |
Private Attributes | |
| std::vector< double > | m_fieldExtpSteps {} |
| The list of field steps in the force field integration. | |
| Gaudi::Property< double > | m_barrelRadius {this, "BarrelRadius", 7.*Gaudi::Units::m} |
| The radius of he barrel cylinder. | |
| Gaudi::Property< double > | m_barrelLength {this, "BarrelLength", 25.*Gaudi::Units::m} |
| The maximum length of the barrel cylinder, if not capped by the placement of the endcap discs. | |
| Gaudi::Property< double > | m_endcapDiscZ {this, "EndcapDiscZ", 15.*Gaudi::Units::m} |
| Position of the endcap discs. | |
| Gaudi::Property< double > | m_endcapDiscRadius {this, "EndcapRadius", 13.*Gaudi::Units::m} |
| Radius of the endcap discs. | |
| Gaudi::Property< double > | m_seedHalfLength {this, "SeedHalfLength", 25.*Gaudi::Units::cm} |
| Maximum separation of point on the cylinder to be picked up onto a seed. | |
| Gaudi::Property< unsigned > | m_nFieldSteps {this, "nFieldSteps", 10} |
| number of steps between two segments to integrate the magnetic field | |
| ToolHandle< ISegmentSelectionTool > | m_segSelector {this, "SegmentSelectionTool" , "" } |
| Pointer to the segement selection tool which compares two segments for their compatibilitiy. | |
| PublicToolHandle< ActsTrk::ITrackingGeometryTool > | m_trackingGeometryTool {this, "TrackingGeometryTool", ""} |
| Tracking geometry tool. | |
| ToolHandle< ActsTrk::IExtrapolationTool > | m_extrapolationTool {this, "ExtrapolationTool" ,"" } |
| Track extrapolation tool. | |
| SG::ReadHandleKey< xAOD::MuonSegmentContainer > | m_segmentKey {this, "SegmentContainer", "MuonSegmentsFromR4" } |
| Declare the data dependency on the standard Mdt+Rpc+Tgc segment container & on the NSW segment container. | |
| const MuonGMR4::MuonDetectorManager * | m_detMgr {nullptr} |
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 33 of file MsTrackSeederTool.h.
Enum toggling whether the segment is in the endcap or barrel.
Definition at line 39 of file MsTrackSeederTool.h.
| using MuonR4::MsTrackSeederTool::SearchTree_t = Acts::KDTree<3, const xAOD::MuonSegment*, double, std::array, 6> |
Definition of the search tree class.
Definition at line 37 of file MsTrackSeederTool.h.
Recycle the expanded sector.
Definition at line 41 of file MsTrackSeederTool.h.
| using MuonR4::MsTrackSeederTool::TreeRawVec_t = SearchTree_t::vector_t |
Abbrivation of the KDTree raw data vector.
Definition at line 52 of file MsTrackSeederTool.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 43 of file MsTrackSeederTool.h.
|
private |
Append the segment to the raw data container.
If the projection onto the barrel cylinder / endcap discs exceeds the bounds, the segment is not added. Segments at the interval boundaries of the expanded sector are mirred into the bin next, but outside the interval.
| tgContext | Geometry context to find the proper wire direction. |
| 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
Use the sector expanded sector coordinate
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 529 of file MsTrackSeederTool.cxx.
|
private |
Construct a complete search tree from a MuonSegment container.
| segments | Reference to the segment container to construct. |
Definition at line 563 of file MsTrackSeederTool.cxx.
|
private |
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 696 of file MsTrackSeederTool.cxx.
|
finaloverridevirtual |
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.
| tgContext | The geometry context to align the segment w.r.t sector |
| seed | Reference to the seed of interest. |
| fieldCache | The initialized magnetic field map |
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 447 of file MsTrackSeederTool.cxx.
|
private |
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.
| planeNorm | Normal of the bending plane containing the muon trajectory in this simplified approach |
| p1 | First segment |
| p2 | Second segment |
| p3 | Third segment |
| fieldCache | The initialized magnetic field map |
Definition at line 334 of file MsTrackSeederTool.cxx.
|
private |
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.
| planeNorm | Normal of the bending plane containing the muon trajectory in this simplified approach |
| seg1 | First segment |
| seg2 | Second segment |
| fieldCache | The initialized magnetic field map |
Definition at line 402 of file MsTrackSeederTool.cxx.
|
finaloverridevirtual |
Definition at line 320 of file MsTrackSeederTool.cxx.
|
finaloverridevirtual |
Ususally we would like to take the first segment with a sufficient amount of phi hits to set the initial position and direction of the track fit. However in some cases, the segment from the NSW has a missreconstructed phi direction which causes the track fit to loose all BW and OW hits in the first iteration. Therefore if the first segment is a NSW segment, we first try to use a non-NSW segments with enough phi hits. If we don't find any segment with enough phi hits we will use the NSW segment as reference as long as it passes the seeding quality criteria.
The middle or outer segment provide the phi information. Not so easy becasue we want to Take the y0 & precision direction from the inner segment but the phi & x0 from a straight line extrapolation onto the plane
Extrapolate the seed segment onto the inner plane. We want to take the precision intercept from the inner segment and the non-precision intercept from the extrapolated segment
We want the drift radius coordinate from the segment and the coordinate along the tube form the back extrapolated segment
Utility lambda to find the corrct boundary surface on which the start parameters shall be created. The start parameters are linearly extrapolated onto the plane surface. The boundary surface is acceptable if it's in front of the seed position and within the surface bounds.
The extrapolation needs to go backwards and stay within the surface boundaries
Attempt first the propagation towards the bottom boundary surface
If that fails and the volume is alignable, try all the portal surfaces. Volume portals are not sorted in order but the placements are.
Definition at line 75 of file MsTrackSeederTool.cxx.
|
finaloverridevirtual |
Expresses the passed segment on the virtual cylinder constructed by the track seeder.
The segment's position is projected onto the expanded sector plane using the sensor dircection of the first precision measurement. Then projected position and the direction vector are projected into 2D to intersect with the cylinder surface.
| tgContext | The geometry context to align the measurement surfaces associated with the segment |
| segment | The segment that is to be projected. |
| loc | Location of the projection [barrel/endcap] |
| sector | Phi sector onto which the segment is moved |
extrapolated position
Definition at line 273 of file MsTrackSeederTool.cxx.
|
finaloverridevirtual |
Retrieves the segment container from StoreGate and constructs TrackSeeds from them.
The seed canddiates are pushed to the output seed container
| ctx | EventContext to access the xAOD::MuonSegmentContainer from store gate and additional conditions data if needed to construct the seed |
| outSeeds | Mutable reference to the container to whichh the seeds are pushed to. |
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 574 of file MsTrackSeederTool.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 410 of file MsTrackSeederTool.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 438 of file MsTrackSeederTool.cxx.
|
finaloverridevirtual |
Initialize the field extraction steps
Definition at line 55 of file MsTrackSeederTool.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
Definition at line 667 of file MsTrackSeederTool.cxx.
|
private |
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 |
Fall back function for the truth segment test
Definition at line 246 of file MsTrackSeederTool.cxx.
|
finaloverridevirtual |
Definition at line 305 of file MsTrackSeederTool.cxx.
|
private |
The maximum length of the barrel cylinder, if not capped by the placement of the endcap discs.
Definition at line 185 of file MsTrackSeederTool.h.
|
private |
The radius of he barrel cylinder.
Definition at line 182 of file MsTrackSeederTool.h.
|
private |
Definition at line 206 of file MsTrackSeederTool.h.
|
private |
Radius of the endcap discs.
Definition at line 189 of file MsTrackSeederTool.h.
|
private |
Position of the endcap discs.
Definition at line 187 of file MsTrackSeederTool.h.
|
private |
Track extrapolation tool.
Definition at line 201 of file MsTrackSeederTool.h.
|
private |
The list of field steps in the force field integration.
Definition at line 180 of file MsTrackSeederTool.h.
|
private |
number of steps between two segments to integrate the magnetic field
Definition at line 194 of file MsTrackSeederTool.h.
|
private |
Maximum separation of point on the cylinder to be picked up onto a seed.
Definition at line 192 of file MsTrackSeederTool.h.
|
private |
Declare the data dependency on the standard Mdt+Rpc+Tgc segment container & on the NSW segment container.
Definition at line 204 of file MsTrackSeederTool.h.
|
private |
Pointer to the segement selection tool which compares two segments for their compatibilitiy.
Definition at line 197 of file MsTrackSeederTool.h.
|
private |
Tracking geometry tool.
Definition at line 199 of file MsTrackSeederTool.h.