18 &measurement_to_summary_type,
21 std::vector<ActsTrk::TrackStateBackend::ConstTrackStateProxy::IndexType > ¶m_state_idx_out,
22 std::array<std::array<uint8_t, Acts::toUnderlying(
HitCategory::N)>,
25 chi2_stat_out.
reset();
28 param_state_idx_out.clear();
30 const auto lastMeasurementIndex = track.tipIndex();
31 track.container().trackStateContainer().visitBackwards(
33 [&measurement_to_summary_type,
37 &special_hit_counts_out
38 ](
const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state) ->
void
41 auto flag = state.typeFlags();
42 if (!state.hasReferenceSurface()) {
46 const auto* detEl =
dynamic_cast<const IDetectorElementBase*
>(state.referenceSurface().surfacePlacement());
47 if (detEl !=
nullptr) {
52 const Amg::Vector2D localPos{state.parameters()[Acts::eBoundLoc0],
53 state.parameters()[Acts::eBoundLoc1]};
54 if (state.referenceSurface().insideBounds(localPos)) {
56 ++special_hit_counts_out.at(Acts::toUnderlying(det_type)).at(Acts::toUnderlying(
HitCategory::Hole));
62 if (!flag.hasMeasurement() || !state.hasUncalibratedSourceLink()) {
65 param_state_idx_out.push_back(state.index());
69 assert( uncalibMeas !=
nullptr );
70 assert( det_type == uncalibMeas->type());
72 if (measurement_to_summary_type.at(Acts::toUnderlying(uncalibMeas->type())) <
77 if (flag.isSharedHit()) {
81 if (
const auto* idDetEl =
dynamic_cast<const ActsDetectorElement*
>(detEl); idDetEl !=
nullptr) {
84 hit_info_out.
addHit(siDet, hit_selection);
87 if (state.calibratedSize()>0 && !flag.isOutlier()) {
90 double chi2add = std::min(state.chi2(),1e5f) / state.calibratedSize();
91 chi2_stat_out.
add(chi2add );
void gatherTrackSummaryData(const typename ActsTrk::TrackContainer::ConstTrackProxy &track, const std::array< unsigned short, Acts::toUnderlying(xAOD::UncalibMeasType::nTypes)> &measurement_to_summary_type, SumOfValues &chi2_stat_out, HitSummaryData &hit_info_out, std::vector< ActsTrk::TrackStateBackend::ConstTrackStateProxy::IndexType > ¶m_state_idx_out, std::array< std::array< uint8_t, Acts::toUnderlying(HitCategory::N)>, Acts::toUnderlying(xAOD::UncalibMeasType::nTypes)> &special_hit_counts_out)
Helper to gather track summary information from the track states of the specified track.