ATLAS Offline Software
Loading...
Searching...
No Matches
MsTrackSeederTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONTRACKFINDINGTOOLS_MSTRACKSEEDERTOOL_H
5#define MUONTRACKFINDINGTOOLS_MSTRACKSEEDERTOOL_H
6
8
9#include "GaudiKernel/SystemOfUnits.h"
10#include "Acts/Utilities/KDTree.hpp"
11
13
14
23
24#include <span>
25
26namespace MuonR4{
35 class MsTrackSeederTool: public extends<AthAlgTool, ITrackSeedingDiagnosticsTool> {
36 public:
37
39 using SearchTree_t = Acts::KDTree<3, const xAOD::MuonSegment*, double, std::array, 6>;
45 enum class SeedCoords : std::uint8_t{
52 };
53
54 using TreeRawVec_t = SearchTree_t::vector_t;
55
57 using base_class::base_class;
59 virtual StatusCode initialize() override final;
60
62 virtual StatusCode findTrackSeeds(const EventContext& ctx,
63 std::vector<MsTrackSeed>& outSeeds) const override final;
64
66 virtual Acts::Result<Acts::BoundTrackParameters>
67 estimateStartParameters(const EventContext& ctx,
68 const MsTrackSeed& seed) const override final;
69
71 virtual double estimateQtimesP(const EventContext& ctx,
72 const Amg::Vector3D& planeNorm,
73 std::span<const PosMomPair_t> circlePoints) const override final;
74
76 virtual bool withinBounds(const Amg::Vector2D& projPos,
77 const Location loc) const override final;
79 virtual Amg::Vector2D expressOnCylinder(const Acts::GeometryContext& tgContext,
80 const xAOD::MuonSegment& segment,
81 const Location loc,
82 const ExpandedSector sector) const override final;
83
92 virtual double estimateQtimesP(const Acts::GeometryContext& tgContext,
93 const MsTrackSeed& seed,
94 MagField::AtlasFieldCache& fieldCache) const override final;
95
96 private:
97
105 Amg::Vector3D segPosOntoPhiPlane(const Acts::GeometryContext& tgContext,
106 const Amg::Vector3D& planeNormal,
107 const xAOD::MuonSegment& segment) const;
108
111 SearchTree_t constructTree(const Acts::GeometryContext& tgContext,
112 const xAOD::MuonSegmentContainer& segments) const;
113
123 double estimateQtimesP(const Amg::Vector3D& planeNorm,
124 const PosMomPair_t& p1,
125 const PosMomPair_t& p2,
126 const PosMomPair_t& p3,
127 MagField::AtlasFieldCache& fieldCache) const;
136 double estimateQtimesP(const Amg::Vector3D& planeNorm,
137 const PosMomPair_t& p1,
138 const PosMomPair_t& p2,
139 MagField::AtlasFieldCache& fieldCache) const;
145 double getPtimesQ(const Amg::Vector3D& forceIntegral,
146 const Amg::Vector3D& deltaDir) const;
157 Amg::Vector3D forceIntegration(const PosMomPair_t& point1,
158 const PosMomPair_t& point2,
159 const Amg::Vector3D& planeNorm,
160 MagField::AtlasFieldCache& fieldCache) const;
169 void appendSegment(const Acts::GeometryContext& tgContext,
170 const xAOD::MuonSegment* segment,
171 const Location loc,
172 TreeRawVec_t& outContainer) const;
176 const MuonGMR4::SpectrometerSector* envelope(const xAOD::MuonSegment& segment) const;
180
184 Gaudi::Property<double> m_barrelRadius{this, "BarrelRadius", 7.*Gaudi::Units::m};
187 Gaudi::Property<double> m_barrelLength{this, "BarrelLength", 25.*Gaudi::Units::m};
189 Gaudi::Property<double> m_endcapDiscZ{this, "EndcapDiscZ", 15.*Gaudi::Units::m};
191 Gaudi::Property<double> m_endcapDiscRadius{this, "EndcapRadius", 13.*Gaudi::Units::m};
194 Gaudi::Property<double> m_seedHalfLength{this, "SeedHalfLength", 25.*Gaudi::Units::cm};
196 Gaudi::Property<unsigned> m_nFieldSteps{this, "nFieldSteps", 10};
199 ToolHandle<ISegmentSelectionTool> m_segSelector{this, "SegmentSelectionTool" , "" };
201 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
202
207 SG::ReadHandleKey<xAOD::MuonSegmentContainer> m_segmentKey{this, "SegmentContainer", "MuonSegmentsFromR4" };
210 };
211}
212
213
214#endif
Eigen::Matrix< double, 3, 1 > Vector3D
Utility class to handle the three contexts neeeded in an ACTS reconstruction job 1) GeometryContext -...
SectorProjector
Enumeration to select the sector projection of the regular MS sector.
Location
Enum defining whether the seed is made in the endcap / barrel.
Definition MsTrackSeed.h:25
Helper class to group muon sgements that may belong to a muon 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.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_segmentKey
Declare the data dependency on the standard Mdt+Rpc+Tgc segment container & on the NSW segment contai...
virtual Acts::Result< Acts::BoundTrackParameters > estimateStartParameters(const EventContext &ctx, const MsTrackSeed &seed) const override final
virtual bool withinBounds(const Amg::Vector2D &projPos, const Location loc) const override final
MsTrackSeed::Location Location
Enum toggling whether the segment is in the endcap or barrel.
ToolHandle< ISegmentSelectionTool > m_segSelector
Pointer to the segement selection tool which compares two segments for their compatibilitiy.
Gaudi::Property< double > m_barrelRadius
The radius of he barrel cylinder.
SearchTree_t::vector_t TreeRawVec_t
Abbrivation of the KDTree raw data vector.
Gaudi::Property< double > m_endcapDiscRadius
Radius of the endcap discs.
Gaudi::Property< double > m_barrelLength
The maximum length of the barrel cylinder, if not capped by the placement of the endcap discs.
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
Tracking geometry tool.
SearchTree_t constructTree(const Acts::GeometryContext &tgContext, const xAOD::MuonSegmentContainer &segments) const
Construct a complete search tree from a MuonSegment container.
Acts::KDTree< 3, const xAOD::MuonSegment *, double, std::array, 6 > SearchTree_t
Definition of the search tree class.
ActsTrk::ContextUtility m_ctxProvider
Utility to fetch the geometry, magnetic field and calibration context in the event.
const MuonGMR4::SpectrometerSector * envelope(const xAOD::MuonSegment &segment) const
Returns the spectrometer envelope associated to the segment (Coord system where the parameter are exp...
std::vector< double > m_fieldExtpSteps
The list of field steps in the force field integration.
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 directio...
virtual StatusCode initialize() override final
Gaudi::Property< double > m_endcapDiscZ
Position of the endcap discs.
virtual StatusCode findTrackSeeds(const EventContext &ctx, std::vector< MsTrackSeed > &outSeeds) const override final
Retrieves the segment container from StoreGate and constructs TrackSeeds from them.
Gaudi::Property< unsigned > m_nFieldSteps
number of steps between two segments to integrate the magnetic field
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 arran...
SeedCoords
Abrivation of the seed coordinates.
@ eSector
Sector of the associated spectrometer sector.
@ ePosOnCylinder
Extrapolation position along the cylinder surface.
@ eDetSection
Encode the seed location (-1,1 -> endcaps, 0 -> barrel.
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.
const MuonGMR4::MuonDetectorManager * m_detMgr
Gaudi::Property< double > m_seedHalfLength
Maximum separation of point on the cylinder to be picked up onto a seed.
MsTrackSeedContainer resolveOverlaps(MsTrackSeedContainer &&unresolved) const
Removes exact duplciates or partial subsets of the MsTrackSeeds.
virtual double estimateQtimesP(const EventContext &ctx, const Amg::Vector3D &planeNorm, std::span< const PosMomPair_t > circlePoints) const override final
ExpandedSector::SectorProjector SectorProjector
Recycle the expanded sector.
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 po...
This is the common class for 3D segments used in the muon spectrometer.
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition of ATLAS Math & Geometry primitives (Amg).
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h).
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
This header ties the generic definitions in this package.
std::vector< MsTrackSeed > MsTrackSeedContainer
Definition MsTrackSeed.h:69
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
#define private
Definition testRead.cxx:27