16 const typename ActsTrk::TrackContainer::ConstTrackProxy &track,
20 &measurement_to_summary_type,
23 std::vector<ActsTrk::TrackStateBackend::ConstTrackStateProxy::IndexType > ¶m_state_idx_out,
27 chi2_stat_out.
reset();
30 param_state_idx_out.clear();
32 const auto lastMeasurementIndex = track.tipIndex();
33 tracksContainer.trackStateContainer().visitBackwards(
36 &measurement_to_summary_type,
40 &special_hit_counts_out
41 ](
const typename ActsTrk::TrackStateBackend::ConstTrackStateProxy &state) ->
void
44 auto flag = state.typeFlags();
45 if (flag.test(Acts::TrackStateFlag::HoleFlag)) {
47 if (state.hasReferenceSurface()) {
48 if (state.referenceSurface().associatedDetectorElement()) {
50 actsDetEl =
dynamic_cast<const ActsDetectorElement *
>(state.referenceSurface().associatedDetectorElement());
58 else if (detEl->
isSCT()) {
66 Acts::Vector2 localPos(state.predicted()[Acts::eBoundLoc0],state.predicted()[Acts::eBoundLoc1]);
67 if (state.referenceSurface().insideBounds(localPos)) {
76 else if (flag.test(Acts::TrackStateFlag::MeasurementFlag)) {
78 param_state_idx_out.push_back(state.index());
82 if (state.hasUncalibratedSourceLink()) {
84 assert( sl !=
nullptr );
87 if (
static_cast<unsigned int>(
to_underlying(uncalibMeas.
type())) < siDetEleColl.size()) {
91 if (flag.test(Acts::TrackStateFlag::SharedHitFlag)) {
99 if (state.calibratedSize()>0 && !flag.test(Acts::TrackStateFlag::OutlierFlag)) {
102 double chi2add = std::min(state.chi2(),1e5f) / state.calibratedSize();
103 chi2_stat_out.
add(chi2add );
void gatherTrackSummaryData(const ActsTrk::TrackContainer &tracksContainer, const typename ActsTrk::TrackContainer::ConstTrackProxy &track, const std::array< const InDetDD::SiDetectorElementCollection *, to_underlying(xAOD::UncalibMeasType::nTypes)> &siDetEleColl, const std::array< unsigned short, to_underlying(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, to_underlying(HitCategory::N)>, to_underlying(xAOD::UncalibMeasType::nTypes)> &special_hit_counts_out)
Helper to gather track summary information from the track states of the specified track.