21 unsigned int typeIndex32 =
static_cast<unsigned int>(typeIndex);
41 std::size_t n_elements = clusterContainer.
size();
42 unsigned int sl_idx = 0;
43 Acts::GeometryIdentifier measurementSurfaceId{};
44 for (; sl_idx < n_elements; ++sl_idx) {
45 const auto *measurement = clusterContainer[sl_idx];
47 if (idHash != lastIdHash) {
49 currentRange->
updateEnd(typeIndex, sl_idx);
57 if (measurementIndex) {
61 std::size_t idx = measurementIndex->
index(*measurement);
68 currentRange->
updateEnd(typeIndex, sl_idx);
74 template <
typename MeasurementRangeList_t>
77 unsigned int typeIndex,
79 unsigned int sl_idx_end,
81 Acts::GeometryIdentifier measurementSurfaceId) {
82 if (measurementSurfaceId.value() == 0u) {
83 std::stringstream
msg;
84 msg <<
"No Acts surface associated to measurement "
85 << sl_idx <<
" type = " <<
static_cast<unsigned int>(measurement->
type())
87 throw std::domain_error(
msg.str());
94 std::stringstream
msg;
95 msg <<
"Measurement not clustered by identifierHash / geometryId. New measurement "
96 << sl_idx <<
" with geo Id " << measurementSurfaceId
97 <<
" type = " <<
static_cast<unsigned int>(measurement->
type())
99 <<
" but already recorded for this geo ID the range : [" << ret.first->second.containerIndex() <<
"]"
100 << ret.first->second.elementBeginIndex()
101 <<
" .. " << ret.first->second.elementEndIndex()
102 << (ret.first->second.isConsistentRange() ?
"" :
" !Container index inconsistent or not in increasing order!");
103 throw std::runtime_error(
msg.str());
105 return &ret.first->second;
112 return ret.first->second;
122 measurementRangesForced.reserve(seed.sp().size());
125 std::size_t idx = measurementIndex.
index(*measurement);
132 if (measurementSurfaceId.value() == 0ul) {
138 assert(
container(typeIndex)->at(sl_idx) == measurement);
145 measurementSurfaceId);
148 return measurementRangesForced;
void setContainer(unsigned int container_index, const xAOD::UncalibratedMeasurementContainer *container)
std::size_t index(const xAOD::UncalibratedMeasurement &hit) const
std::vector< const xAOD::UncalibratedMeasurementContainer * > m_containers
const xAOD::UncalibratedMeasurementContainer * container(std::size_t typeIndex) const
std::vector< MeasurementSurfaceIndex > m_surfaceIndices
std::vector< std::size_t > m_measurementOffsets
MeasurementRangeList m_measurementRanges
std::size_t m_measurementsTotal
void addMeasurements(std::size_t typeIndex, const xAOD::UncalibratedMeasurementContainer &clusterContainer, const DetectorElementToActsGeometryIdMap &detectorElementToGeoid, const MeasurementIndex *measurementIndex=nullptr)
MeasurementRangeListFlat setMeasurementRangesForced(const ActsTrk::Seed &seed, const MeasurementIndex &measurementIndex) const
const MeasurementRangeList & measurementRanges() const
static MeasurementRange * addMeasurementToRange(MeasurementRangeList_t &measurementRanges, unsigned int typeIndex, unsigned int sl_idx, unsigned int sl_idx_end, const xAOD::UncalibratedMeasurement *measurement, Acts::GeometryIdentifier measurementSurfaceId)
MeasurementRange markSurfaceInsensitive(const Acts::GeometryIdentifier &identifier)
TrackFindingMeasurements(std::size_t nMeasurementContainerMax)
size_type size() const noexcept
Returns the number of elements in the collection.
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash)
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
Athena definition of the Eigen plugin.
GenMeasurementRangeListFlat< AtlasMeasurementContainerList > MeasurementRangeListFlat
Acts::GeometryIdentifier getSurfaceGeometryIdOfMeasurement(const DetectorElementToActsGeometryIdMap &detector_element_to_geoid, const xAOD::UncalibratedMeasurement &measurement)
UncalibratedMeasurementContainer_v1 UncalibratedMeasurementContainer
Define the version of the uncalibrated measurement container.
unsigned int DetectorIDHashType
@ detector ID element hash
UncalibratedMeasurement_v1 UncalibratedMeasurement
Define the version of the uncalibrated measurement class.
static MeasurementRange noMeasurementExpected()
void updateEnd(std::size_t container_idx, unsigned int end_element_idx)