ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsTrackReconstruction
src
detail
DuplicateSeedDetector.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ACTSTRACKRECONSTRUCTION_DUPLICATESEEDDETECTOR_H
6
#define ACTSTRACKRECONSTRUCTION_DUPLICATESEEDDETECTOR_H
7
8
#include "
xAODMeasurementBase/UncalibratedMeasurementContainer.h
"
9
#include "
ActsEvent/SeedContainer.h
"
10
11
#include <unordered_map>
12
#include <vector>
13
#include <boost/container/small_vector.hpp>
14
15
namespace
ActsTrk::detail
{
16
class
MeasurementIndex
;
17
18
// === DuplicateSeedDetector ===============================================
19
// Identify duplicate seeds: seeds where all measurements were already located in a previously followed trajectory.
20
class
DuplicateSeedDetector
{
21
public
:
22
using
index_t
=
unsigned
int;
23
using
SpacePointIndicesFun_t
= std::function<std::array<std::size_t, 3>(std::size_t)>;
// copied from ITrackParamsEstimationTool
24
using
UseTopSpFun_t
= std::function<bool(
const
ActsTrk::Seed
&)>;
25
26
DuplicateSeedDetector
(std::size_t numSeeds,
index_t
measOffset,
bool
enabled);
27
DuplicateSeedDetector
(
const
DuplicateSeedDetector
&) =
delete
;
28
DuplicateSeedDetector
&
operator=
(
const
DuplicateSeedDetector
&) =
delete
;
29
DuplicateSeedDetector
(
DuplicateSeedDetector
&&) noexcept = default;
30
DuplicateSeedDetector
&operator=(
DuplicateSeedDetector
&&) noexcept = default;
31
~
DuplicateSeedDetector
() = default;
32
33
// add seeds from an associated measurements collection.
34
void
addSeeds
(
std
::
size_t
typeIndex,
const
ActsTrk
::
SeedContainer
&seeds,
const
MeasurementIndex
&measurementIndex);
35
void
addSeeds
(
std
::
size_t
typeIndex,
const
ActsTrk
::
SeedContainer
&seeds,
const
MeasurementIndex
&measurementIndex,
36
SpacePointIndicesFun_t
spacePointIndicesFun,
UseTopSpFun_t
useTopSpFun);
37
inline
void
newTrajectory
();
38
inline
void
addMeasurement
(
const
xAOD
::UncalibratedMeasurement* sl,
const
MeasurementIndex
&measurementIndex);
39
40
// For complete removal of duplicate seeds, assumes isDuplicate(typeIndex,iseed) is called for monotonically increasing typeIndex,iseed.
41
inline
bool
isDuplicate
(
std
::
size_t
typeIndex,
index_t
iseed);
42
43
private
:
44
friend struct
DuplicateSeedDetectorTest
;
// allow unit test access to internals
45
46
bool
m_disabled
{
false
};
47
index_t
m_measOffset
{0u};
// if a seed has N hits, only N - m_measOffset are needed to mark it as duplicate
48
std::vector<boost::container::small_vector<index_t, 2>>
m_seedIndex
;
// m_seedIndex[measurementIndex][usedBySeedNumber]
49
std::vector<index_t>
m_nUsedMeasurements
;
50
std::vector<index_t>
m_nSeedMeasurements
;
51
std::vector<bool>
m_isDuplicateSeed
;
52
std::vector<index_t>
m_seedOffset
;
53
index_t
m_numSeeds
{0u};
// count of number of seeds so-far added with addSeeds()
54
std::size_t
m_nextSeed
{0ul};
// index of next seed expected with isDuplicate()
55
index_t
m_foundSeeds
{0u};
// count of found seeds for this/last trajectory
56
57
};
58
59
}
// namespace ActsTrk::detail
60
61
#include "
src/detail/DuplicateSeedDetector.icc
"
62
63
#endif
DuplicateSeedDetector.icc
SeedContainer.h
UncalibratedMeasurementContainer.h
ActsTrk::detail::DuplicateSeedDetector::m_seedOffset
std::vector< index_t > m_seedOffset
Definition
DuplicateSeedDetector.h:52
ActsTrk::detail::DuplicateSeedDetector::m_nUsedMeasurements
std::vector< index_t > m_nUsedMeasurements
Definition
DuplicateSeedDetector.h:49
ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector
DuplicateSeedDetector(std::size_t numSeeds, index_t measOffset, bool enabled)
Definition
DuplicateSeedDetector.cxx:13
ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetectorTest
friend struct DuplicateSeedDetectorTest
Definition
DuplicateSeedDetector.h:44
ActsTrk::detail::DuplicateSeedDetector::m_numSeeds
index_t m_numSeeds
Definition
DuplicateSeedDetector.h:53
ActsTrk::detail::DuplicateSeedDetector::m_disabled
bool m_disabled
Definition
DuplicateSeedDetector.h:46
ActsTrk::detail::DuplicateSeedDetector::m_isDuplicateSeed
std::vector< bool > m_isDuplicateSeed
Definition
DuplicateSeedDetector.h:51
ActsTrk::detail::DuplicateSeedDetector::m_nextSeed
std::size_t m_nextSeed
Definition
DuplicateSeedDetector.h:54
ActsTrk::detail::DuplicateSeedDetector::SpacePointIndicesFun_t
std::function< std::array< std::size_t, 3 >(std::size_t)> SpacePointIndicesFun_t
Definition
DuplicateSeedDetector.h:23
ActsTrk::detail::DuplicateSeedDetector::isDuplicate
bool isDuplicate(std::size_t typeIndex, index_t iseed)
ActsTrk::detail::DuplicateSeedDetector::m_foundSeeds
index_t m_foundSeeds
Definition
DuplicateSeedDetector.h:55
ActsTrk::detail::DuplicateSeedDetector::newTrajectory
void newTrajectory()
ActsTrk::detail::DuplicateSeedDetector::index_t
unsigned int index_t
Definition
DuplicateSeedDetector.h:22
ActsTrk::detail::DuplicateSeedDetector::addMeasurement
void addMeasurement(const xAOD::UncalibratedMeasurement *sl, const MeasurementIndex &measurementIndex)
ActsTrk::detail::DuplicateSeedDetector::m_nSeedMeasurements
std::vector< index_t > m_nSeedMeasurements
Definition
DuplicateSeedDetector.h:50
ActsTrk::detail::DuplicateSeedDetector::operator=
DuplicateSeedDetector & operator=(const DuplicateSeedDetector &)=delete
ActsTrk::detail::DuplicateSeedDetector::m_seedIndex
std::vector< boost::container::small_vector< index_t, 2 > > m_seedIndex
Definition
DuplicateSeedDetector.h:48
ActsTrk::detail::DuplicateSeedDetector::m_measOffset
index_t m_measOffset
Definition
DuplicateSeedDetector.h:47
ActsTrk::detail::DuplicateSeedDetector::addSeeds
void addSeeds(std::size_t typeIndex, const ActsTrk::SeedContainer &seeds, const MeasurementIndex &measurementIndex)
Definition
DuplicateSeedDetector.cxx:26
ActsTrk::detail::DuplicateSeedDetector::UseTopSpFun_t
std::function< bool(const ActsTrk::Seed &)> UseTopSpFun_t
Definition
DuplicateSeedDetector.h:24
ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector
DuplicateSeedDetector(const DuplicateSeedDetector &)=delete
ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector
DuplicateSeedDetector(DuplicateSeedDetector &&) noexcept=default
ActsTrk::detail::MeasurementIndex
Definition
MeasurementIndex.h:16
const
ActsTrk::detail
Hash functions to pack the source link into unordered_maps / unordered_sets.
Definition
MeasurementCalibratorBase.h:31
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
std
STL namespace.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
ActsTrk::SeedContainer
Definition
SeedContainer.h:66
ActsTrk::Seed
Definition
SeedContainer.h:43
private
#define private
Definition
testRead.cxx:27
Generated on
for ATLAS Offline Software by
1.17.0