Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
ActsTrk::detail::DuplicateSeedDetector Class Reference

#include <DuplicateSeedDetector.h>

Collaboration diagram for ActsTrk::detail::DuplicateSeedDetector:

Public Types

using index_t = unsigned int
 

Public Member Functions

 DuplicateSeedDetector (std::size_t numSeeds, bool enabled)
 
 DuplicateSeedDetector (const DuplicateSeedDetector &)=delete
 
DuplicateSeedDetectoroperator= (const DuplicateSeedDetector &)=delete
 
 DuplicateSeedDetector (DuplicateSeedDetector &&) noexcept=default
 
DuplicateSeedDetectoroperator= (DuplicateSeedDetector &&) noexcept=default
 
 ~DuplicateSeedDetector ()=default
 
void addSeeds (std::size_t typeIndex, const ActsTrk::SeedContainer &seeds, const MeasurementIndex &measurementIndex)
 
void newTrajectory ()
 
void addMeasurement (const ActsTrk::ATLASUncalibSourceLink &sl, const MeasurementIndex &measurementIndex)
 
bool isDuplicate (std::size_t typeIndex, index_t iseed)
 

Private Attributes

bool m_disabled {false}
 
std::vector< boost::container::small_vector< index_t, 4 > > m_seedIndex
 
std::vector< std::size_t > m_nUsedMeasurements
 
std::vector< std::size_t > m_nSeedMeasurements
 
std::vector< bool > m_isDuplicateSeed
 
std::vector< index_tm_seedOffset
 
index_t m_numSeeds {0u}
 
index_t m_nextSeed {0u}
 
std::size_t m_foundSeeds {0ul}
 

Friends

struct DuplicateSeedDetectorTest
 

Detailed Description

Definition at line 21 of file DuplicateSeedDetector.h.

Member Typedef Documentation

◆ index_t

Definition at line 23 of file DuplicateSeedDetector.h.

Constructor & Destructor Documentation

◆ DuplicateSeedDetector() [1/3]

ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector ( std::size_t  numSeeds,
bool  enabled 
)

Definition at line 11 of file DuplicateSeedDetector.cxx.

13  : m_disabled(!enabled),
14  m_nUsedMeasurements(enabled ? numSeeds : 0ul, 0ul),
15  m_nSeedMeasurements(enabled ? numSeeds : 0ul, 0ul),
16  m_isDuplicateSeed(enabled ? numSeeds : 0ul, false) {
17  if (m_disabled)
18  return;
19  m_seedOffset.reserve(2ul);
20  }

◆ DuplicateSeedDetector() [2/3]

ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector ( const DuplicateSeedDetector )
delete

◆ DuplicateSeedDetector() [3/3]

ActsTrk::detail::DuplicateSeedDetector::DuplicateSeedDetector ( DuplicateSeedDetector &&  )
defaultnoexcept

◆ ~DuplicateSeedDetector()

ActsTrk::detail::DuplicateSeedDetector::~DuplicateSeedDetector ( )
default

Member Function Documentation

◆ addMeasurement()

void ActsTrk::detail::DuplicateSeedDetector::addMeasurement ( const ActsTrk::ATLASUncalibSourceLink sl,
const MeasurementIndex measurementIndex 
)
inline

◆ addSeeds()

void ActsTrk::detail::DuplicateSeedDetector::addSeeds ( std::size_t  typeIndex,
const ActsTrk::SeedContainer seeds,
const MeasurementIndex measurementIndex 
)

Definition at line 22 of file DuplicateSeedDetector.cxx.

24  {
25  if (m_disabled)
26  return;
27  if (!(typeIndex < m_seedOffset.size()))
28  m_seedOffset.resize(typeIndex + 1);
29  m_seedOffset[typeIndex] = m_numSeeds;
30  m_seedIndex.resize(measurementIndex.size()); // will resize for each seed container, but always with the same space
31 
32  for (const ActsTrk::Seed *seed : seeds) {
33  if (!seed)
34  continue;
35 
36  for (const xAOD::SpacePoint *sp : seed->sp()) {
37  const std::vector<const xAOD::UncalibratedMeasurement *> &els = sp->measurements();
38  for (const xAOD::UncalibratedMeasurement *meas : els) {
39  std::size_t hitIndex = measurementIndex.index(*meas);
40  if (!(hitIndex < m_seedIndex.size())) {
41  // std::cout << "ERROR hit index " << hitIndex << " past end of " << m_seedIndex.size() << " hit indices\n";
42  continue;
43  }
44  m_seedIndex[hitIndex].push_back(m_numSeeds);
46  }
47  }
48  ++m_numSeeds;
49  }
50  }

◆ isDuplicate()

bool ActsTrk::detail::DuplicateSeedDetector::isDuplicate ( std::size_t  typeIndex,
index_t  iseed 
)
inline

◆ newTrajectory()

void ActsTrk::detail::DuplicateSeedDetector::newTrajectory ( )
inline

◆ operator=() [1/2]

DuplicateSeedDetector& ActsTrk::detail::DuplicateSeedDetector::operator= ( const DuplicateSeedDetector )
delete

◆ operator=() [2/2]

DuplicateSeedDetector& ActsTrk::detail::DuplicateSeedDetector::operator= ( DuplicateSeedDetector &&  )
defaultnoexcept

Friends And Related Function Documentation

◆ DuplicateSeedDetectorTest

friend struct DuplicateSeedDetectorTest
friend

Definition at line 41 of file DuplicateSeedDetector.h.

Member Data Documentation

◆ m_disabled

bool ActsTrk::detail::DuplicateSeedDetector::m_disabled {false}
private

Definition at line 43 of file DuplicateSeedDetector.h.

◆ m_foundSeeds

std::size_t ActsTrk::detail::DuplicateSeedDetector::m_foundSeeds {0ul}
private

Definition at line 51 of file DuplicateSeedDetector.h.

◆ m_isDuplicateSeed

std::vector<bool> ActsTrk::detail::DuplicateSeedDetector::m_isDuplicateSeed
private

Definition at line 47 of file DuplicateSeedDetector.h.

◆ m_nextSeed

index_t ActsTrk::detail::DuplicateSeedDetector::m_nextSeed {0u}
private

Definition at line 50 of file DuplicateSeedDetector.h.

◆ m_nSeedMeasurements

std::vector<std::size_t> ActsTrk::detail::DuplicateSeedDetector::m_nSeedMeasurements
private

Definition at line 46 of file DuplicateSeedDetector.h.

◆ m_numSeeds

index_t ActsTrk::detail::DuplicateSeedDetector::m_numSeeds {0u}
private

Definition at line 49 of file DuplicateSeedDetector.h.

◆ m_nUsedMeasurements

std::vector<std::size_t> ActsTrk::detail::DuplicateSeedDetector::m_nUsedMeasurements
private

Definition at line 45 of file DuplicateSeedDetector.h.

◆ m_seedIndex

std::vector<boost::container::small_vector<index_t, 4> > ActsTrk::detail::DuplicateSeedDetector::m_seedIndex
private

Definition at line 44 of file DuplicateSeedDetector.h.

◆ m_seedOffset

std::vector<index_t> ActsTrk::detail::DuplicateSeedDetector::m_seedOffset
private

Definition at line 48 of file DuplicateSeedDetector.h.


The documentation for this class was generated from the following files:
ActsTrk::detail::DuplicateSeedDetector::m_numSeeds
index_t m_numSeeds
Definition: DuplicateSeedDetector.h:49
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
xAOD::SpacePoint_v1
Definition: SpacePoint_v1.h:29
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
Generate_dsid_ranseed.seed
seed
Definition: Generate_dsid_ranseed.py:10
ActsTrk::detail::DuplicateSeedDetector::m_isDuplicateSeed
std::vector< bool > m_isDuplicateSeed
Definition: DuplicateSeedDetector.h:47
ActsTrk::detail::DuplicateSeedDetector::m_disabled
bool m_disabled
Definition: DuplicateSeedDetector.h:43
ActsTrk::Seed
Acts::Seed< xAOD::SpacePoint, 3ul > Seed
Definition: Seed.h:12
detail::ul
unsigned long ul
Definition: PrimitiveHelpers.h:46
ActsTrk::detail::DuplicateSeedDetector::m_seedOffset
std::vector< index_t > m_seedOffset
Definition: DuplicateSeedDetector.h:48
ActsTrk::detail::DuplicateSeedDetector::m_nSeedMeasurements
std::vector< std::size_t > m_nSeedMeasurements
Definition: DuplicateSeedDetector.h:46