Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
DuplicateSeedDetector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ACTSTRACKRECONSTRUCTION_DUPLICATESEEDDETECTOR_H
6 #define ACTSTRACKRECONSTRUCTION_DUPLICATESEEDDETECTOR_H
7 
11 
12 #include <unordered_map>
13 #include <vector>
14 #include <boost/container/small_vector.hpp>
15 
16 namespace ActsTrk::detail {
17  class MeasurementIndex;
18 
19  // === DuplicateSeedDetector ===============================================
20  // Identify duplicate seeds: seeds where all measurements were already located in a previously followed trajectory.
22  public:
23  using index_t = unsigned int;
24 
25  DuplicateSeedDetector(std::size_t numSeeds, bool enabled);
31 
32  // add seeds from an associated measurements collection.
33  void addSeeds(std::size_t typeIndex, const ActsTrk::SeedContainer &seeds, const MeasurementIndex &measurementIndex);
34  inline void newTrajectory();
36 
37  // For complete removal of duplicate seeds, assumes isDuplicate(typeIndex,iseed) is called for monotonically increasing typeIndex,iseed.
38  inline bool isDuplicate(std::size_t typeIndex, index_t iseed);
39 
40  private:
41  friend struct DuplicateSeedDetectorTest; // allow unit test access to internals
42 
43  bool m_disabled{false};
44  std::vector<boost::container::small_vector<index_t, 4>> m_seedIndex; // m_seedIndex[measurementIndex][usedBySeedNumber]
45  std::vector<std::size_t> m_nUsedMeasurements;
46  std::vector<std::size_t> m_nSeedMeasurements;
47  std::vector<bool> m_isDuplicateSeed;
48  std::vector<index_t> m_seedOffset;
49  index_t m_numSeeds{0u}; // count of number of seeds so-far added with addSeeds()
50  index_t m_nextSeed{0u}; // index of next seed expected with isDuplicate()
51  std::size_t m_foundSeeds{0ul}; // count of found seeds for this/last trajectory
52  };
53 
54 } // namespace ActsTrk::detail
55 
57 
58 #endif
ActsTrk::detail::DuplicateSeedDetector::m_foundSeeds
std::size_t m_foundSeeds
Definition: DuplicateSeedDetector.h:51
ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetectorTest
friend struct DuplicateSeedDetectorTest
Definition: DuplicateSeedDetector.h:41
ActsTrk::detail::DuplicateSeedDetector::m_numSeeds
index_t m_numSeeds
Definition: DuplicateSeedDetector.h:49
ActsTrk::detail::DuplicateSeedDetector::addSeeds
void addSeeds(std::size_t typeIndex, const ActsTrk::SeedContainer &seeds, const MeasurementIndex &measurementIndex)
Definition: DuplicateSeedDetector.cxx:22
ActsTrk::detail::DuplicateSeedDetector::m_nUsedMeasurements
std::vector< std::size_t > m_nUsedMeasurements
Definition: DuplicateSeedDetector.h:45
ActsTrk::detail::DuplicateSeedDetector::m_seedIndex
std::vector< boost::container::small_vector< index_t, 4 > > m_seedIndex
Definition: DuplicateSeedDetector.h:44
ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector
DuplicateSeedDetector(const DuplicateSeedDetector &)=delete
ActsTrk::detail::DuplicateSeedDetector::isDuplicate
bool isDuplicate(std::size_t typeIndex, index_t iseed)
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
ActsTrk::detail::MeasurementIndex
Definition: MeasurementIndex.h:16
ActsTrk::detail::DuplicateSeedDetector::operator=
DuplicateSeedDetector & operator=(const DuplicateSeedDetector &)=delete
SeedContainer.h
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector
DuplicateSeedDetector(std::size_t numSeeds, bool enabled)
Definition: DuplicateSeedDetector.cxx:11
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
ActsTrk::detail::DuplicateSeedDetector::m_isDuplicateSeed
std::vector< bool > m_isDuplicateSeed
Definition: DuplicateSeedDetector.h:47
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
UncalibratedMeasurementContainer.h
ActsTrk::detail::DuplicateSeedDetector::m_disabled
bool m_disabled
Definition: DuplicateSeedDetector.h:43
ActsTrk::detail::DuplicateSeedDetector::addMeasurement
void addMeasurement(const ActsTrk::ATLASUncalibSourceLink &sl, const MeasurementIndex &measurementIndex)
detail::ul
unsigned long ul
Definition: PrimitiveHelpers.h:46
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ActsTrk::detail::DuplicateSeedDetector::m_nextSeed
index_t m_nextSeed
Definition: DuplicateSeedDetector.h:50
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector
DuplicateSeedDetector(DuplicateSeedDetector &&) noexcept=default
ActsTrk::detail::DuplicateSeedDetector::newTrajectory
void newTrajectory()
DuplicateSeedDetector.icc
python.CaloAddPedShiftConfig.default
default
Definition: CaloAddPedShiftConfig.py:43
ATLASSourceLinkSurfaceAccessor.h
ActsTrk::detail::DuplicateSeedDetector::m_seedOffset
std::vector< index_t > m_seedOffset
Definition: DuplicateSeedDetector.h:48
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:55
ActsTrk::detail::DuplicateSeedDetector::m_nSeedMeasurements
std::vector< std::size_t > m_nSeedMeasurements
Definition: DuplicateSeedDetector.h:46
ActsTrk::detail
Definition: Decoration.h:15
ActsTrk::detail::DuplicateSeedDetector::index_t
unsigned int index_t
Definition: DuplicateSeedDetector.h:23
ActsTrk::detail::DuplicateSeedDetector
Definition: DuplicateSeedDetector.h:21