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
12
21
22#include <span>
23
24namespace MuonR4{
33 class MsTrackSeederTool: public extends<AthAlgTool, ITrackSeedingDiagnosticsTool> {
34 public:
35
37 using SearchTree_t = Acts::KDTree<3, const xAOD::MuonSegment*, double, std::array, 6>;
43 enum class SeedCoords : std::uint8_t{
50 };
51
52 using TreeRawVec_t = SearchTree_t::vector_t;
53
55 using base_class::base_class;
57 virtual StatusCode initialize() override final;
58
60 virtual StatusCode findTrackSeeds(const EventContext& ctx,
61 std::vector<MsTrackSeed>& outSeeds) const override final;
62
64 virtual Acts::Result<Acts::BoundTrackParameters>
65 estimateStartParameters(const EventContext& ctx,
66 const MsTrackSeed& seed) const override final;
67
69 virtual double estimateQtimesP(const EventContext& ctx,
70 const Amg::Vector3D& planeNorm,
71 std::span<const PosMomPair_t> circlePoints) const override final;
72
74 virtual bool withinBounds(const Amg::Vector2D& projPos,
75 const Location loc) const override final;
77 virtual Amg::Vector2D expressOnCylinder(const Acts::GeometryContext& tgContext,
78 const xAOD::MuonSegment& segment,
79 const Location loc,
80 const ExpandedSector sector) const override final;
81
90 virtual double estimateQtimesP(const Acts::GeometryContext& tgContext,
91 const MsTrackSeed& seed,
92 MagField::AtlasFieldCache& fieldCache) const override final;
93
94 private:
95
103 Amg::Vector3D segPosOntoPhiPlane(const Acts::GeometryContext& tgContext,
104 const Amg::Vector3D& planeNormal,
105 const xAOD::MuonSegment& segment) const;
106
109 SearchTree_t constructTree(const Acts::GeometryContext& tgContext,
110 const xAOD::MuonSegmentContainer& segments) const;
111
121 double estimateQtimesP(const Amg::Vector3D& planeNorm,
122 const PosMomPair_t& p1,
123 const PosMomPair_t& p2,
124 const PosMomPair_t& p3,
125 MagField::AtlasFieldCache& fieldCache) const;
134 double estimateQtimesP(const Amg::Vector3D& planeNorm,
135 const PosMomPair_t& p1,
136 const PosMomPair_t& p2,
137 MagField::AtlasFieldCache& fieldCache) const;
143 double getPtimesQ(const Amg::Vector3D& forceIntegral,
144 const Amg::Vector3D& deltaDir) const;
155 Amg::Vector3D forceIntegration(const PosMomPair_t& point1,
156 const PosMomPair_t& point2,
157 const Amg::Vector3D& planeNorm,
158 MagField::AtlasFieldCache& fieldCache) const;
167 void appendSegment(const Acts::GeometryContext& tgContext,
168 const xAOD::MuonSegment* segment,
169 const Location loc,
170 TreeRawVec_t& outContainer) const;
174 const MuonGMR4::SpectrometerSector* envelope(const xAOD::MuonSegment& segment) const;
178
182 Gaudi::Property<double> m_barrelRadius{this, "BarrelRadius", 7.*Gaudi::Units::m};
185 Gaudi::Property<double> m_barrelLength{this, "BarrelLength", 25.*Gaudi::Units::m};
187 Gaudi::Property<double> m_endcapDiscZ{this, "EndcapDiscZ", 15.*Gaudi::Units::m};
189 Gaudi::Property<double> m_endcapDiscRadius{this, "EndcapRadius", 13.*Gaudi::Units::m};
192 Gaudi::Property<double> m_seedHalfLength{this, "SeedHalfLength", 25.*Gaudi::Units::cm};
194 Gaudi::Property<unsigned> m_nFieldSteps{this, "nFieldSteps", 10};
197 ToolHandle<ISegmentSelectionTool> m_segSelector{this, "SegmentSelectionTool" , "" };
199 PublicToolHandle<ActsTrk::ITrackingGeometryTool> m_trackingGeometryTool{this, "TrackingGeometryTool", ""};
201 ToolHandle<ActsTrk::IExtrapolationTool> m_extrapolationTool{this, "ExtrapolationTool" ,"" };
204 SG::ReadHandleKey<xAOD::MuonSegmentContainer> m_segmentKey{this, "SegmentContainer", "MuonSegmentsFromR4" };
207 };
208}
209
210
211#endif
Eigen::Matrix< double, 3, 1 > Vector3D
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
ToolHandle< ActsTrk::IExtrapolationTool > m_extrapolationTool
Track extrapolation tool.
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.
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Tracking geometry tool.
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.
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.
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:71
STL namespace.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
#define private
Definition testRead.cxx:27