ATLAS Offline Software
Loading...
Searching...
No Matches
MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t > Struct Template Reference

#include <MeasurementSelector.h>

Inheritance diagram for MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >:
Collaboration diagram for MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >:

Classes

struct  CalibratedMeasurementTraits

Public Types

using T_BoundState = MeasurementSelectorTraits<derived_t>::BoundState
using TrackStateProxy = MeasurementSelectorTraits<derived_t>::TrackStateProxy
using abstract_measurement_range_t = MeasurementSelectorTraits<derived_t>::abstract_measurement_range_t
template<std::size_t DIM, typename measurement_t>
using PreCalibrator
template<std::size_t DIM, typename measurement_t>
using PostCalibrator
using Base = MeasurementSelectorBase< NMeasMax, MeasurementSelectorTraits<derived_t>::s_dimMax, derived_t>
using trajectory_t = typename Base::trajectory_t
using Config
using traits

Public Member Functions

template<std::size_t DIM>
ParameterMapping::type< DIM > parameterMap (const Acts::GeometryContext &, const Acts::CalibrationContext &, const Acts::Surface &)
template<std::size_t DIM, typename measurement_t>
const PostCalibrator< DIM, measurement_t > & postCalibrator () const
 the calibrator used after the measurement selection which does not have to be "connected"
template<std::size_t DIM, typename measurement_t>
const PreCalibrator< DIM, measurement_t > & preCalibrator () const
std::tuple< const measurement_container_variant_t &, abstract_measurement_range_t > containerAndRange (const Acts::Surface &surface) const
 Get container and index range for measurements on the given surface.
bool expectMeasurements (const Acts::Surface &surface, const measurement_container_variant_t *container_variant_ptr, const abstract_measurement_range_t &abstract_range) const
Acts::Result< boost::container::small_vector< typename TrackStateProxy::IndexType, s_maxBranchesPerSurface > > createTrackStates (const Acts::GeometryContext &geometryContext, const Acts::CalibrationContext &calibrationContext, const Acts::Surface &surface, const T_BoundState &boundState, typename TrackStateProxy::IndexType prevTip, std::vector< TrackStateProxy > &trackStateCandidates, trajectory_t &trajectory, const Acts::Logger &logger) const
std::tuple< std::size_t, AtlasMeasurementSelectorCuts::Chi2CutsPerDim > getCuts (const Acts::Surface &surface, const T_BoundState &boundState, const Acts::Logger &logger) const

Static Public Member Functions

static const MeasurementSelectorTraits< derived_t >::BoundTrackParameters & boundParams (const T_BoundState &boundState)
static const MeasurementSelectorTraits< derived_t >::BoundMatrix & boundJacobiMatrix (const T_BoundState &boundState)
static double pathLength (const T_BoundState &boundState)
template<typename T>
static const auto & forwardToCalibrator (const T &a)
template<typename measurement_container_t>
static auto rangeForContainer (const measurement_container_t &concrete_container, const abstract_measurement_range_t &abstract_range)
 Create a range over elements of the given container from an abstract range.
static constexpr std::size_t dimMax ()

Public Attributes

Config m_config

Static Public Attributes

static constexpr std::size_t s_maxBranchesPerSurface = Base::s_maxBranchesPerSurface

Protected Member Functions

const derived_t & derived () const
unsigned int makeOutlierFlag (bool value)
Acts::Result< boost::container::small_vector< typename TrackStateProxy::IndexType, s_maxBranchesPerSurface > > selectMeasurementsCreateTrackStates (const Acts::GeometryContext &geometryContext, const Acts::CalibrationContext &calibrationContext, const Acts::Surface &surface, const T_BoundState &boundState, T_MeasurementRange &&measurement_range, std::size_t prevTip, trajectory_t &trajectory, const Acts::Logger &logger, const std::size_t numMeasurementsCut, const std::pair< float, float > &maxChi2Cut, bool forced) const

Static Protected Member Functions

static void createStates (std::size_t n_new_states, const T_BoundState &boundState, std::size_t prevTip, trajectory_t &trajectory, const Acts::BoundSubspaceIndices &subspaceIndices, boost::container::small_vector< typename TrackStateProxy::IndexType, s_maxBranchesPerSurface > &track_states, const Acts::Logger &logger, bool outlier_states)
static std::size_t getEtaBin (const parameters_t &boundParameters, const std::vector< float > &etaBins)

Detailed Description

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
struct MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >

Definition at line 809 of file MeasurementSelector.h.

Member Typedef Documentation

◆ abstract_measurement_range_t

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
using MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::abstract_measurement_range_t = MeasurementSelectorTraits<derived_t>::abstract_measurement_range_t

Definition at line 812 of file MeasurementSelector.h.

◆ Base

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
using MeasurementSelectorWithDispatch< NMeasMax, derived_t, measurement_container_variant_t >::Base = MeasurementSelectorBase< NMeasMax, MeasurementSelectorTraits<derived_t>::s_dimMax, derived_t>
inherited

Definition at line 731 of file MeasurementSelector.h.

◆ Config

using MeasurementSelectorBase< NMeasMax, DIMMAX, derived_t >::Config
inherited

Definition at line 327 of file MeasurementSelector.h.

◆ PostCalibrator

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
template<std::size_t DIM, typename measurement_t>
using MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::PostCalibrator
Initial value:
Acts::Delegate<
void
(const Acts::GeometryContext&,
const Acts::CalibrationContext&,
const measurement_t &,
MeasurementSelectorTraits< derived_t >::TrackStateProxy TrackStateProxy

Definition at line 877 of file MeasurementSelector.h.

◆ PreCalibrator

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
template<std::size_t DIM, typename measurement_t>
using MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::PreCalibrator
Initial value:
Acts::Delegate<
std::tuple < typename MeasurementSelectorTraits<derived_t>::template PreSelectionMeasurement<DIM>,
typename MeasurementSelectorTraits<derived_t>::template PreSelectionMeasurementCovariance<DIM>,
unsigned int>
(const Acts::GeometryContext&,
const Acts::CalibrationContext&,
const Acts::Surface&,
const measurement_t &,
Acts::BoundTrackParameters BoundTrackParameters

Definition at line 864 of file MeasurementSelector.h.

◆ T_BoundState

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
using MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::T_BoundState = MeasurementSelectorTraits<derived_t>::BoundState

Definition at line 810 of file MeasurementSelector.h.

◆ TrackStateProxy

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
using MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::TrackStateProxy = MeasurementSelectorTraits<derived_t>::TrackStateProxy

Definition at line 811 of file MeasurementSelector.h.

◆ traits

using MeasurementSelectorBase< NMeasMax, DIMMAX, derived_t >::traits
inherited

Definition at line 328 of file MeasurementSelector.h.

◆ trajectory_t

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
using MeasurementSelectorWithDispatch< NMeasMax, derived_t, measurement_container_variant_t >::trajectory_t = typename Base::trajectory_t
inherited

Definition at line 733 of file MeasurementSelector.h.

Member Function Documentation

◆ boundJacobiMatrix()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
const MeasurementSelectorTraits< derived_t >::BoundMatrix & MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::boundJacobiMatrix ( const T_BoundState & boundState)
inlinestatic

Definition at line 820 of file MeasurementSelector.h.

◆ boundParams()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
const MeasurementSelectorTraits< derived_t >::BoundTrackParameters & MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::boundParams ( const T_BoundState & boundState)
inlinestatic

Definition at line 815 of file MeasurementSelector.h.

815 {
816 return std::get<0>(boundState);
817 }

◆ containerAndRange()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
std::tuple< const measurement_container_variant_t &, abstract_measurement_range_t > MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::containerAndRange ( const Acts::Surface & surface) const

Get container and index range for measurements on the given surface.

Returns
tuple of container, begin index and end index
Note
return a tuple containing a measurement container variant for the given surface and the index range for measurements on that surface. The index range may be empty.

◆ createStates()

void MeasurementSelectorBase< NMeasMax, DIMMAX, derived_t >::createStates ( std::size_t n_new_states,
const T_BoundState & boundState,
std::size_t prevTip,
trajectory_t & trajectory,
const Acts::BoundSubspaceIndices & subspaceIndices,
boost::container::small_vector< typename TrackStateProxy::IndexType, s_maxBranchesPerSurface > & track_states,
const Acts::Logger & logger,
bool outlier_states )
inlinestaticprotectedinherited

Definition at line 364 of file MeasurementSelector.h.

371 {
372 // create track states for all compatible measurement candidates
375
377
378 track_states.reserve( n_new_states );
381 for (unsigned int state_i=0; state_i<n_new_states; ++state_i) {
383
384 if (firstTrackState.has_value()) {
385 // subsequent track states don't need storage for these as they will
386 // be shared
388 }
389
390 if (outlier_states) {
391 // outlier won't have separate filtered parameters
393 }
394
396 ACTS_VERBOSE("Create SourceLink output track state #"
397 << trackState.index() << " with mask: " << mask);
398
399 if (firstTrackState.has_value()) {
402 }
403 else {
404 // only set these for first
405 trackState.predicted() = boundParams.parameters();
406 if (boundParams.covariance()) {
407 trackState.predictedCovariance() = *boundParams.covariance();
408 }
411 }
412 trackState.pathLength() = pathLength;
413
414 trackState.setReferenceSurface(boundParams.referenceSurface().getSharedPtr());
415
416 trackState.setProjectorSubspaceIndices(subspaceIndices);
417
418 auto typeFlags = trackState.typeFlags();
419 if (trackState.referenceSurface().surfaceMaterial() != nullptr) {
420 typeFlags.setHasMaterial();
421 }
422 typeFlags.setHasParameters();
423
424 // @TODO these track states still need some additional processing. Should there be a special
425 // flag for this ?
426 track_states.push_back( trackState.index());
427 }
428 }

◆ createTrackStates()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
Acts::Result< boost::container::small_vector< typename TrackStateProxy::IndexType, s_maxBranchesPerSurface > > MeasurementSelectorWithDispatch< NMeasMax, derived_t, measurement_container_variant_t >::createTrackStates ( const Acts::GeometryContext & geometryContext,
const Acts::CalibrationContext & calibrationContext,
const Acts::Surface & surface,
const T_BoundState & boundState,
typename TrackStateProxy::IndexType prevTip,
std::vector< TrackStateProxy > & trackStateCandidates,
trajectory_t & trajectory,
const Acts::Logger & logger ) const
inlineinherited

Definition at line 743 of file MeasurementSelector.h.

750 {
751
754 // get associated measurement container and the relevant measurement range for the given surface.
755 auto [a_measurement_container_variant_ptr, range, forced] = this->derived().containerAndRange(surface);
758 return result;
759 }
760 if (!range.empty()) {
762 // numMeasurementsCut is == 0 in case getCuts failed
763 // anyway cannot select anything if numMeasurementsCut==0;
764 if (numMeasurementsCut>0) {
765
766 result = std::visit( [this,
769 &surface,
770 &boundState,
771 &range,
772 prevTip,
773 &trajectory,
774 &logger,
776 &maxChi2Cut,
779 constexpr std::size_t DIM = ArgType::dimension();
782 return
783 this->template
786 surface,
789 prevTip,
791 logger,
794 forced);
795 },
797 }
798 }
799 else {
801 }
802 return result;
803 }
std::tuple< std::size_t, AtlasMeasurementSelectorCuts::Chi2CutsPerDim > getCuts(const Acts::Surface &surface, const T_BoundState &boundState, const Acts::Logger &logger) const
Acts::Result< boost::container::small_vector< typename TrackStateProxy::IndexType, s_maxBranchesPerSurface > > selectMeasurementsCreateTrackStates(const Acts::GeometryContext &geometryContext, const Acts::CalibrationContext &calibrationContext, const Acts::Surface &surface, const T_BoundState &boundState, T_MeasurementRange &&measurement_range, std::size_t prevTip, trajectory_t &trajectory, const Acts::Logger &logger, const std::size_t numMeasurementsCut, const std::pair< float, float > &maxChi2Cut, bool forced) const

◆ derived()

const derived_t & MeasurementSelectorBase< NMeasMax, DIMMAX, derived_t >::derived ( ) const
inlineprotectedinherited

Definition at line 338 of file MeasurementSelector.h.

338{ return *static_cast<const derived_t *>(this); }

◆ dimMax()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
constexpr std::size_t MeasurementSelectorWithDispatch< NMeasMax, derived_t, measurement_container_variant_t >::dimMax ( )
inlinestaticconstexprinherited

Definition at line 738 of file MeasurementSelector.h.

◆ expectMeasurements()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
bool MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::expectMeasurements ( const Acts::Surface & surface,
const measurement_container_variant_t * container_variant_ptr,
const abstract_measurement_range_t & abstract_range ) const
Parameters
surfacea surface
container_variant_ptrabstract measurement container as returned by containerAndRange
abstract_rangethe range as returned by containerAndRange for the given surface
Returns
true if measurements are expected, false if the surface is not supposed to have valid measurements.

◆ forwardToCalibrator()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
template<typename T>
const auto & MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::forwardToCalibrator ( const T & a)
inlinestatic

Definition at line 832 of file MeasurementSelector.h.

832 {
834 return a;
835 }
836 else {
837 return *a;
838 }
839 }

◆ getCuts()

std::tuple< std::size_t, AtlasMeasurementSelectorCuts::Chi2CutsPerDim > MeasurementSelectorBase< NMeasMax, DIMMAX, derived_t >::getCuts ( const Acts::Surface & surface,
const T_BoundState & boundState,
const Acts::Logger & logger ) const
inlineinherited

Definition at line 678 of file MeasurementSelector.h.

680 {
684 // Get geoID of this surface
685 auto geoID = surface.geometryId();
686 // Find the appropriate cuts
687 auto cuts = m_config.find(geoID);
688 if (cuts == m_config.end()) {
689 // indicates failure
691 }
692 else {
693 // num measurement Cut
694 // getchi2 cut
696 numMeasurementsCut = (!cuts->numMeasurementsCutOff.empty()
697 ? cuts->numMeasurementsCutOff[ std::min(cuts->numMeasurementsCutOff.size()-1, eta_bin) ]
698 : NMeasMax);
699 if (!cuts->chi2CutOff.empty()) {
700 maxChi2Cut = cuts->chi2CutOff[ std::min(cuts->chi2CutOff.size()-1, eta_bin) ];
701 }
702 else {
705 }
706 ACTS_VERBOSE("Get cut for eta-bin="
708 << ": chi2 (max,max-outlier) for 1D " << maxChi2Cut[1].first << ", " << maxChi2Cut[1].second
709 << ", 2D " << maxChi2Cut[2].first << ", " << maxChi2Cut[2].second
710 << " max.meas." << numMeasurementsCut);
711 }
712 return result;
713 }

◆ getEtaBin()

std::size_t MeasurementSelectorBase< NMeasMax, DIMMAX, derived_t >::getEtaBin ( const parameters_t & boundParameters,
const std::vector< float > & etaBins )
inlinestaticprotectedinherited

Definition at line 658 of file MeasurementSelector.h.

659 {
660 if (etaBins.empty()) {
661 return 0u; // shortcut if no etaBins
662 }
663 const float eta = std::abs(std::atanh(std::cos(boundParameters.parameters()[Acts::eBoundTheta])));
664 std::size_t bin = 0;
665 for (auto etaBin : etaBins) {
666 if (etaBin >= eta) {
667 break;
668 }
669 bin++;
670 }
671 return bin;
672 }

◆ makeOutlierFlag()

unsigned int MeasurementSelectorBase< NMeasMax, DIMMAX, derived_t >::makeOutlierFlag ( bool value)
inlineprotectedinherited

Definition at line 450 of file MeasurementSelector.h.

450{ return static_cast<unsigned int>(value)<<2u; }

◆ parameterMap()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
template<std::size_t DIM>
ParameterMapping::type< DIM > MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::parameterMap ( const Acts::GeometryContext & ,
const Acts::CalibrationContext & ,
const Acts::Surface &  )
inline

Definition at line 848 of file MeasurementSelector.h.

850 {
852 }
static constexpr type< N > identity()

◆ pathLength()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
double MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::pathLength ( const T_BoundState & boundState)
inlinestatic

Definition at line 824 of file MeasurementSelector.h.

824 {
825 return std::get<2>(boundState);
826 }

◆ postCalibrator()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
template<std::size_t DIM, typename measurement_t>
const PostCalibrator< DIM, measurement_t > & MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::postCalibrator ( ) const

the calibrator used after the measurement selection which does not have to be "connected"

Note
The return value does not have to be a delegate, it can be an arbitrary functor/lambda, which however must be castable to bool to test whether there is a postCalibrator

◆ preCalibrator()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
template<std::size_t DIM, typename measurement_t>
const PreCalibrator< DIM, measurement_t > & MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::preCalibrator ( ) const
Note
The return value does not have to be a delegate, it can be an arbitrary functor/lambda,

◆ rangeForContainer()

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
template<typename measurement_container_t>
auto MeasurementSelectorBaseImpl< NMeasMax, derived_t, measurement_container_variant_t >::rangeForContainer ( const measurement_container_t & concrete_container,
const abstract_measurement_range_t & abstract_range )
static

Create a range over elements of the given container from an abstract range.

Template Parameters
measurement_container_ta concrete container type which is one of one of the possible types of measurement_container_variant_t
Parameters
abstract_rangethe range as returned by containerAndRange
Returns
an itrerable range over elements of the given specified by the abstract range.

◆ selectMeasurementsCreateTrackStates()

Acts::Result< boost::container::small_vector< typename TrackStateProxy::IndexType, s_maxBranchesPerSurface > > MeasurementSelectorBase< NMeasMax, DIMMAX, derived_t >::selectMeasurementsCreateTrackStates ( const Acts::GeometryContext & geometryContext,
const Acts::CalibrationContext & calibrationContext,
const Acts::Surface & surface,
const T_BoundState & boundState,
T_MeasurementRange && measurement_range,
std::size_t prevTip,
trajectory_t & trajectory,
const Acts::Logger & logger,
const std::size_t numMeasurementsCut,
const std::pair< float, float > & maxChi2Cut,
bool forced ) const
inlineprotectedinherited

Definition at line 468 of file MeasurementSelector.h.

478 {
481
482 using iterator_t = decltype(measurement_range.begin());
485 // get calibrator
488
491
492
493
494 // get prediction in the measurement domain
497 surface);
498 auto predicted
503
504 // select n measurents with the smallest chi2.
508 for ( const auto &measurement : measurement_range ) {
510 if (forced && postCalibrator) {
511 // skip preCalibrator and computeChi2, by doing everything else. We start with what's done if no preCalibrator.
512 const auto &m = derived().forwardToCalibrator(measurement);
513 matching_measurement.m_measurement = std::make_tuple( m.template localPosition<DIM>(), m.template localCovariance<DIM>(), 0u );
514 matching_measurement.m_chi2 = 0.0f;
516 if (!selected_measurements.acceptNoSort()) break;
517 } else {
520 surface,
523 matching_measurement.m_chi2 = computeChi2(matching_measurement.m_measurement.position(),
524 matching_measurement.m_measurement.covariance(),
525 predicted.first,
526 predicted.second);
527 // only consider measurements which pass the outlier chi2 cut
528 if (matching_measurement.m_chi2<maxChi2Cut.second) {
530 selected_measurements.acceptAndSort([](const TheMatchingMeasurement &a,
531 const TheMatchingMeasurement &b) {
532 return a.m_chi2 < b.m_chi2;
533 });
534 }
535 }
536 }
537
538 if (selected_measurements.empty()) {
539 auto config_for_surface = m_config.find(surface.geometryId());
540 if (config_for_surface != m_config.end()) {
541 if (config_for_surface->edgeTolerance.has_value()) {
542 // if the prediction failes the bound test, where the edgeTolerance is expected to be negative
543 // then the "hole" is considered to be an edge hole which is not treated as a hole.
544 auto local_coords = derived().boundParams(boundState).parameters().template block<2,1>(0,0);
545 if (!surface.insideBounds(local_coords,config_for_surface->edgeTolerance.value())) {
547 }
548 }
549 }
550 }
551 else {
552
553 // apply final calibration to n-best measurements
554 // First Create states without setting information about the calibrated measurement for the selected measurements
555 // @TODO first create state then copy measurements, or crete state by state and set measurements ?
556 // the lastter has the "advantage" that the outlier flag can be set individually
557 // the former has the advantage that part of the state creation code is independent of the
558 // the measurement.
559
564 prevTip,
567 *result,
568 logger,
569 (!selected_measurements.empty()
570 ? selected_measurements.getSlot( *(selected_measurements.begin())).m_measurement.flags().isOutlier() || postCalibrator
571 : false) );
572 assert( result->size() == selected_measurements.size() );
573
574 if (postCalibrator) {
575 // either run post selection calibrator which will set the calibrated position and covariance
576 // directly to the state.
577 auto predicted_pos_dbl = predicted.first.template cast<double>();
578 auto predicted_cov_dbl = predicted.second.template cast<double>();
579 unsigned int state_i=0u;
583 TrackStateProxy trackState( trajectory.getTrackState( (*result)[state_i] ) );
586
587 // apply the calibration
590 derived().forwardToCalibrator(a_selected_measurement.m_sourceLink.value()),
592 );
593 // update chi2 using calibrated measurement
598 // ... and set outlier flag
599 // and share or create storage for filtered.
600 bool is_outlier = !forced && trackState.chi2() >= maxChi2Cut.first;
601 if (is_outlier) {
602 trackState.typeFlags().setIsOutlier();
605 } else {
606 trackState.typeFlags().setIsMeasurement();
608 }
609 ++state_i;
610 }
611 }
612 else {
613 // or copy the pre-selection calibrated position and covariance to the
614 // track states and adjust the flags.
615 unsigned int state_i=0u;
619 TrackStateProxy trackState( trajectory.getTrackState( (*result)[state_i] ) );
621
622 bool is_outlier = !forced && a_selected_measurement.m_chi2 >= maxChi2Cut.first;
623 auto type_flags = trackState.typeFlags();
624 if (is_outlier) {
625 // the filtered parameters will not be computed for outliers, so has to be shared from the prediction.
626 type_flags.setIsOutlier();
629 } else {
630 // for measurements the filtered parameters will be computed, so space needs to be allocated.
631 type_flags.setIsMeasurement();
633 }
634 if (a_selected_measurement.m_measurement.flags().isSplitHit()) {
635 type_flags.setIsSplitHit();
636 }
637
639 ::pack(std::move(a_selected_measurement.m_sourceLink.value())));
640
641 trackState.allocateCalibrated(DIM);
642 trackState.template calibrated<DIM>()
644 ::MatrixFloatType>(a_selected_measurement.m_measurement.position());
647 ::MatrixFloatType>(a_selected_measurement.m_measurement.covariance());
648 trackState.chi2() = a_selected_measurement.m_chi2;
649 ++state_i;
650 }
651 }
652 }
653
654 return result;
655 }
double computeChi2(const measurement_vector_t &a, const measurement_cov_matrix_t &a_cov, const predicted_vector_t &b, const predicted_cov_matrix_t &b_cov)
size_t size() const
Number of registered mappings.

Member Data Documentation

◆ m_config

Config MeasurementSelectorBase< NMeasMax, DIMMAX, derived_t >::m_config
inherited

Definition at line 330 of file MeasurementSelector.h.

◆ s_maxBranchesPerSurface

template<std::size_t NMeasMax, typename derived_t, typename measurement_container_variant_t>
std::size_t MeasurementSelectorWithDispatch< NMeasMax, derived_t, measurement_container_variant_t >::s_maxBranchesPerSurface = Base::s_maxBranchesPerSurface
staticconstexprinherited

Definition at line 735 of file MeasurementSelector.h.


The documentation for this struct was generated from the following file: