ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::SeedContainer Struct Reference

#include <SeedContainer.h>

Inheritance diagram for ActsTrk::SeedContainer:
Collaboration diagram for ActsTrk::SeedContainer:

Public Types

using Base = Acts::SeedContainer2
using value_type = Seed
using const_iterator = Acts::detail::ContainerIterator<SeedContainer, value_type, Index, true>
using SpacePointValue = const xAOD::SpacePoint*
using SpacePointContainer = std::vector<SpacePointValue>

Public Member Functions

const_iterator begin () const noexcept
const_iterator end () const noexcept
Seed at (Index index) const
Seed operator[] (Index index) const noexcept
const SpacePointContainerspacePoints () const noexcept
SpacePointContainerspacePoints () noexcept
Acts::MutableSeedProxy2 push_back (Acts::SpacePointIndexSubset2 sp)
Acts::MutableSeedProxy2 push_back (Acts::MutableSeedProxy2 seed)
template<typename SpacePointProxy_t, std::size_t N>
Acts::MutableSeedProxy2 push_back (const Acts::Seed< SpacePointProxy_t, N > *pSeed)
Acts::MutableSeedProxy2 push_back (const Acts::Seed< xAOD::SpacePoint, 3ul > *pSeed)

Private Member Functions

template<typename seed_type, typename spindex_fun>
Acts::MutableSeedProxy2 push_back_helper (seed_type *pSeed, spindex_fun spindex)

Private Attributes

SpacePointContainer m_spacePoints

Detailed Description

Definition at line 18 of file SeedContainer.h.

Member Typedef Documentation

◆ Base

using ActsTrk::SeedContainer::Base = Acts::SeedContainer2

Definition at line 19 of file SeedContainer.h.

◆ const_iterator

using ActsTrk::SeedContainer::const_iterator = Acts::detail::ContainerIterator<SeedContainer, value_type, Index, true>

Definition at line 21 of file SeedContainer.h.

◆ SpacePointContainer

Definition at line 23 of file SeedContainer.h.

◆ SpacePointValue

Definition at line 22 of file SeedContainer.h.

◆ value_type

Definition at line 20 of file SeedContainer.h.

Member Function Documentation

◆ at()

Seed ActsTrk::SeedContainer::at ( Index index) const
inline

Definition at line 106 of file SeedContainer.h.

106{ return static_cast<Seed>(Base::at(index)); }

◆ begin()

const_iterator ActsTrk::SeedContainer::begin ( ) const
inlinenoexcept

Definition at line 25 of file SeedContainer.h.

25{ return const_iterator(*this, 0); }
Acts::detail::ContainerIterator< SeedContainer, value_type, Index, true > const_iterator

◆ end()

const_iterator ActsTrk::SeedContainer::end ( ) const
inlinenoexcept

Definition at line 26 of file SeedContainer.h.

26{ return const_iterator(*this, size()); }

◆ operator[]()

Seed ActsTrk::SeedContainer::operator[] ( Index index) const
inlinenoexcept

Definition at line 107 of file SeedContainer.h.

107{ return static_cast<Seed>(Base::operator[](index)); }

◆ push_back() [1/4]

Acts::MutableSeedProxy2 ActsTrk::SeedContainer::push_back ( Acts::MutableSeedProxy2 seed)
inline

Definition at line 41 of file SeedContainer.h.

41 {
42 Acts::MutableSeedProxy2 newseed = push_back(seed.spacePointIndices());
43 newseed.vertexZ() = seed.vertexZ();
44 newseed.quality() = seed.quality();
45 return newseed;
46 }
Acts::MutableSeedProxy2 push_back(Acts::SpacePointIndexSubset2 sp)

◆ push_back() [2/4]

Acts::MutableSeedProxy2 ActsTrk::SeedContainer::push_back ( Acts::SpacePointIndexSubset2 sp)
inline

Definition at line 35 of file SeedContainer.h.

35 {
36 Acts::MutableSeedProxy2 seed = createSeed();
37 seed.assignSpacePointIndices(sp);
38 return seed;
39 }
static Double_t sp

◆ push_back() [3/4]

template<typename SpacePointProxy_t, std::size_t N>
Acts::MutableSeedProxy2 ActsTrk::SeedContainer::push_back ( const Acts::Seed< SpacePointProxy_t, N > * pSeed)
inline

Definition at line 50 of file SeedContainer.h.

50 {
51 return push_back_helper(pSeed, [this](const SpacePointProxy_t* sp) -> Acts::SpacePointIndex2 {
52 assert(sp->index() < m_spacePoints.size());
53 assert(m_spacePoints[sp->index()] == &sp->externalSpacePoint());
54 std::ignore = m_spacePoints.size(); // Silence Clang warning about unused lambda capture
55 return sp->index();
56 });
57 }
SpacePointContainer m_spacePoints
Acts::MutableSeedProxy2 push_back_helper(seed_type *pSeed, spindex_fun spindex)

◆ push_back() [4/4]

Acts::MutableSeedProxy2 ActsTrk::SeedContainer::push_back ( const Acts::Seed< xAOD::SpacePoint, 3ul > * pSeed)
inline

Definition at line 60 of file SeedContainer.h.

60 {
61 return push_back_helper(pSeed, [this](SpacePointValue sp) -> Acts::SpacePointIndex2 {
62 auto it = std::find(m_spacePoints.begin(), m_spacePoints.end(), sp);
63 if (it == m_spacePoints.end()) {
64 m_spacePoints.push_back(sp);
65 return m_spacePoints.size() - 1ul;
66 } else {
67 return std::distance(m_spacePoints.begin(), it);
68 }
69 });
70 }
const xAOD::SpacePoint * SpacePointValue

◆ push_back_helper()

template<typename seed_type, typename spindex_fun>
Acts::MutableSeedProxy2 ActsTrk::SeedContainer::push_back_helper ( seed_type * pSeed,
spindex_fun spindex )
inlineprivate

Definition at line 75 of file SeedContainer.h.

75 {
76 std::vector<Acts::SpacePointIndex2> spacePointIndices;
77 spacePointIndices.reserve(pSeed->sp().size());
78 for (auto sp2 : pSeed->sp()) {
79 Acts::SpacePointIndex2 ind = spindex(sp2);
80 spacePointIndices.push_back(ind);
81 }
82 Acts::MutableSeedProxy2 seed = createSeed();
83 seed.assignSpacePointIndices(spacePointIndices);
84 seed.vertexZ() = pSeed->z();
85 seed.quality() = pSeed->seedQuality();
86 return seed;
87 }

◆ spacePoints() [1/2]

const SpacePointContainer & ActsTrk::SeedContainer::spacePoints ( ) const
inlinenoexcept

Definition at line 30 of file SeedContainer.h.

30{ return m_spacePoints; }

◆ spacePoints() [2/2]

SpacePointContainer & ActsTrk::SeedContainer::spacePoints ( )
inlinenoexcept

Definition at line 31 of file SeedContainer.h.

31{ return m_spacePoints; }

Member Data Documentation

◆ m_spacePoints

SpacePointContainer ActsTrk::SeedContainer::m_spacePoints
private

Definition at line 89 of file SeedContainer.h.


The documentation for this struct was generated from the following file: