ATLAS Offline Software
DuplicateSeedDetector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 
15 namespace ActsTrk::detail {
16 
17  // === DuplicateSeedDetector ===============================================
18  // Identify duplicate seeds: seeds where all measurements were already located in a previously followed trajectory.
20  public:
21  DuplicateSeedDetector(std::size_t numSeeds, bool enabled);
27 
28  // add seeds from an associated measurements collection.
29  // measurementOffset non-zero is only needed if measurements holds more than one collection (eg. kept for TrackStatePrinter).
30  void addSeeds(std::size_t typeIndex, const ActsTrk::SeedContainer &seeds);
31  void newTrajectory();
33 
34  // For complete removal of duplicate seeds, assumes isDuplicate(iseed) is called for monotonically increasing iseed.
35  bool isDuplicate(std::size_t typeIndex, std::size_t iseed);
36 
37  // Getters
38  inline bool isEnabled() const;
39  inline const std::unordered_multimap<const xAOD::UncalibratedMeasurement *, std::size_t>& seedIndexes() const;
40  inline const std::vector<std::size_t>& nUsedMeasurements() const;
41  inline const std::vector<std::size_t>& nSeedMeasurements() const;
42  inline const std::vector<bool>& isDuplicateSeeds() const;
43  inline const std::vector<std::size_t>& seedOffsets() const;
44  inline std::size_t numSeeds() const;
45  inline std::size_t nextSeeds() const;
46  inline std::size_t foundSeeds() const;
47 
48  private:
49  bool m_disabled {false};
50  std::unordered_multimap<const xAOD::UncalibratedMeasurement *, std::size_t> m_seedIndexes {};
51  std::vector<std::size_t> m_nUsedMeasurements {};
52  std::vector<std::size_t> m_nSeedMeasurements {};
53  std::vector<bool> m_isDuplicateSeeds {};
54  std::vector<std::size_t> m_seedOffsets {};
55  std::size_t m_numSeeds {0ul}; // count of number of seeds so-far added with addSeeds()
56  std::size_t m_nextSeeds {0ul}; // index of next seed expected with isDuplicate()
57  std::size_t m_foundSeeds {0ul}; // count of found seeds for this/last trajectory
58  };
59 
60 } // namespace ActsTrk::detail
61 
63 
64 #endif
ActsTrk::detail::DuplicateSeedDetector::m_foundSeeds
std::size_t m_foundSeeds
Definition: DuplicateSeedDetector.h:57
ActsTrk::detail::DuplicateSeedDetector::m_nUsedMeasurements
std::vector< std::size_t > m_nUsedMeasurements
Definition: DuplicateSeedDetector.h:51
ActsTrk::detail::DuplicateSeedDetector::addSeeds
void addSeeds(std::size_t typeIndex, const ActsTrk::SeedContainer &seeds)
Definition: DuplicateSeedDetector.cxx:22
ActsTrk::detail::DuplicateSeedDetector::nUsedMeasurements
const std::vector< std::size_t > & nUsedMeasurements() const
xAOD::UncalibratedMeasurement
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
Definition: UncalibratedMeasurement.h:13
ActsTrk::detail::DuplicateSeedDetector::isEnabled
bool isEnabled() const
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector
DuplicateSeedDetector(const DuplicateSeedDetector &)=delete
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
ActsTrk::detail::DuplicateSeedDetector::operator=
DuplicateSeedDetector & operator=(const DuplicateSeedDetector &)=delete
ActsTrk::detail::DuplicateSeedDetector::isDuplicateSeeds
const std::vector< bool > & isDuplicateSeeds() const
SeedContainer.h
ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector
DuplicateSeedDetector(std::size_t numSeeds, bool enabled)
Definition: DuplicateSeedDetector.cxx:9
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
vector
Definition: MultiHisto.h:13
UncalibratedMeasurementContainer.h
ActsTrk::detail::DuplicateSeedDetector::m_disabled
bool m_disabled
Definition: DuplicateSeedDetector.h:49
ActsTrk::detail::DuplicateSeedDetector::foundSeeds
std::size_t foundSeeds() const
detail::ul
unsigned long ul
Definition: PrimitiveHelpers.h:45
ActsTrk::detail::DuplicateSeedDetector::m_seedOffsets
std::vector< std::size_t > m_seedOffsets
Definition: DuplicateSeedDetector.h:54
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ActsTrk::detail::DuplicateSeedDetector::nSeedMeasurements
const std::vector< std::size_t > & nSeedMeasurements() const
ActsTrk::detail::DuplicateSeedDetector::addMeasurement
void addMeasurement(const ActsTrk::ATLASUncalibSourceLink &sl)
Definition: DuplicateSeedDetector.cxx:56
ActsTrk::detail::DuplicateSeedDetector::m_numSeeds
std::size_t m_numSeeds
Definition: DuplicateSeedDetector.h:55
ActsTrk::detail::DuplicateSeedDetector::seedIndexes
const std::unordered_multimap< const xAOD::UncalibratedMeasurement *, std::size_t > & seedIndexes() const
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector
DuplicateSeedDetector(DuplicateSeedDetector &&) noexcept=default
ActsTrk::detail::DuplicateSeedDetector::newTrajectory
void newTrajectory()
Definition: DuplicateSeedDetector.cxx:44
ActsTrk::detail::DuplicateSeedDetector::m_seedIndexes
std::unordered_multimap< const xAOD::UncalibratedMeasurement *, std::size_t > m_seedIndexes
Definition: DuplicateSeedDetector.h:50
ActsTrk::detail::DuplicateSeedDetector::m_isDuplicateSeeds
std::vector< bool > m_isDuplicateSeeds
Definition: DuplicateSeedDetector.h:53
ActsTrk::detail::DuplicateSeedDetector::isDuplicate
bool isDuplicate(std::size_t typeIndex, std::size_t iseed)
Definition: DuplicateSeedDetector.cxx:75
DuplicateSeedDetector.icc
ActsTrk::detail::DuplicateSeedDetector::numSeeds
std::size_t numSeeds() const
ATLASSourceLinkSurfaceAccessor.h
ActsTrk::detail::DuplicateSeedDetector::m_nextSeeds
std::size_t m_nextSeeds
Definition: DuplicateSeedDetector.h:56
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:49
ActsTrk::detail::DuplicateSeedDetector::m_nSeedMeasurements
std::vector< std::size_t > m_nSeedMeasurements
Definition: DuplicateSeedDetector.h:52
ActsTrk::detail::DuplicateSeedDetector::nextSeeds
std::size_t nextSeeds() const
ActsTrk::detail::DuplicateSeedDetector::seedOffsets
const std::vector< std::size_t > & seedOffsets() const
ActsTrk::detail
Definition: Decoration.h:14
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
ActsTrk::detail::DuplicateSeedDetector
Definition: DuplicateSeedDetector.h:19