 |
ATLAS Offline Software
|
Go to the documentation of this file.
13 m_cfg{std::move(
cfg)}{}
25 lambda = Amg::intersect<2>(projPos, projDir, Amg::Vector2D::UnitX(),
28 lambda = Amg::intersect<2>(projPos, projDir, Amg::Vector2D::UnitY(),
31 return projPos + lambda * projDir;
53 ATH_MSG_VERBOSE(__func__<<
"() "<<__LINE__<<
" - Try to add new segment: "
60 std::array<double, 3> coords{};
65 outContainer.emplace_back(std::move(coords),
segment);
67 if (sector == 1 || sector== 16) {
68 outContainer.emplace_back(outContainer.back()).first[
eSector] = (sector == 1 ? 17 : 0);
73 rawData.reserve(2*segments.
size());
78 ATH_MSG_VERBOSE(
"Create a new tree with "<<rawData.size()<<
" entries. ");
86 for (
const auto& [coords, seedCandidate] : orderedSegs) {
95 SearchTree_t::range_t selectRange{};
108 orderedSegs.rangeSearchMapDiscard(selectRange, [
this, &ctx, &newSeed, &recoCandidate](
109 const SearchTree_t::coordinate_t& ,
114 newSeed.addSegment(extendWithMe);
118 if (newSeed.segments().empty()) {
127 +
z * Amg::Vector3D::UnitZ();
129 newSeed.setPosition(std::move(
pos));
130 trackSeeds.emplace_back(std::move(newSeed));
134 std::unique_ptr<MsTrackSeedContainer>
139 return a.segments().
size() >
b.segments().size();
141 auto outputSeeds = std::make_unique<MsTrackSeedContainer>();
142 outputSeeds->reserve(unresolved.size());
146 const bool add = std::ranges::none_of(*outputSeeds, [&testMe](
const MsTrackSeed& goodSeed){
147 return testMe < goodSeed;
std::unique_ptr< MsTrackSeedContainer > findTrackSeeds(const EventContext &ctx, const xAOD::MuonSegmentContainer &segments) const
Constructs the MS track seeds from the segment container.
int sector() const
Returns the sector of the MS-sector.
double barrelRadius
The radius of the barrel cylinder to seed.
bool withinBounds(const Amg::Vector2D &projPos, const Location loc) const
Returns whether the expression on the cylinder is within the surface bounds.
double barrelLength
The maximum length of the barrel cylinder, if not capped by the placement of the endcap discs.
Eigen::Matrix< double, 2, 1 > Vector2D
Placeholder for what will later be the muon segment EDM representation.
Acts::KDTree< 3, const xAOD::MuonSegment *, double, std::array, 6 > SearchTree_t
Definition of the search tree class.
Class describing a MuonSegment.
void appendSegment(const xAOD::MuonSegment *segment, const Location loc, TreeRawVec_t &outContainer) const
Append the to the raw data container.
#define ATH_MSG_VERBOSE(x)
@ eSector
Sector of the associated spectrometer sector.
double endcapDiscZ
Position of the endcap discs.
std::string identString() const
Returns a string encoding the chamber index & the sector of the MS sector.
Location
Enum defining whether the seed is made in the endcap / barrel.
const Segment * detailedSegment(const xAOD::MuonSegment &seg)
Helper function to navigate from the xAOD::MuonSegment to the MuonR4::Segment.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
SearchTree_t constructTree(const xAOD::MuonSegmentContainer &segments) const
Construct a complete search tree from a MuonSegment container.
SearchTree_t::vector_t TreeRawVec_t
Abbrivation of the KDTree raw data vector.
Out copy_if(In first, const In &last, Out res, const Pred &p)
Class to provide easy MsgStream access and capabilities.
bool add(const std::string &hname, TKey *tobj)
MsTrackSeed::Location Location
Enum toggling whether the segment is in the endcap or barrel.
const MuonGMR4::SpectrometerSector * msSector() const
Returns the associated MS sector.
@ ePosOnCylinder
Extrapolation position along the cylinder surface.
constexpr double sign(const double x)
Returns the sign of a number.
double endcapDiscRadius
Radius of the endcap discs.
MsTrackSeeder::SearchTree_t SearchTree_t
double seedHalfLength
Maximum separation of point on the cylinder to be picked up onto a seed.
Eigen::Matrix< double, 3, 1 > Vector3D
Amg::Vector3D dirFromAngles(const double phi, const double theta)
Constructs a direction vector from the azimuthal & polar angles.
This header ties the generic definitions in this package.
const ISegmentSelectionTool * selector
Pointer to the segement selection tool which compares two segments for their compatibilitiy.
std::vector< MsTrackSeed > MsTrackSeedContainer
std::unique_ptr< MsTrackSeedContainer > resolveOverlaps(MsTrackSeedContainer &&unresolved) const
Removes exact duplciates or partial subsets of the MsTrackSeeds.
void addSegment(const xAOD::MuonSegment *seg)
Append a segment to the seed.
Amg::Vector2D expressOnCylinder(const xAOD::MuonSegment &segment, const Location loc) const
Expresses the segment on the cylinder surface.
@ eDetSection
Encode the seed location (-1,1 -> endcaps, 0 -> barrel
size_type size() const noexcept
Returns the number of elements in the collection.
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
MsTrackSeeder(const std::string &msgName, Config &&cfg)
Standard constructor.