Method to extrapolate to a target surface given a track The method computes which track state is closest to the surface to choose which one to use to extrapolate.
This method doesn't use a measurement, but whatever first/last track state is defined.
102 {
103
104 auto outermost = *(track.trackStatesReversed().begin());
105 auto begin = track.trackStatesReversed().begin();
106 std::advance(begin, track.nTrackStates() - 1);
107 auto innermost = *begin;
108
109
110
111
112 double first_dis = std::abs(
113 innermost.referenceSurface().transform(gctx_).translation()(0) -
114 target_surface->transform(gctx_).translation()(0));
115
116 double last_dis = std::abs(
117 outermost.referenceSurface().transform(gctx_).translation()(0) -
118 target_surface->transform(gctx_).translation()(0));
119
120
121
122 const auto& ts = first_dis < last_dis ? innermost : outermost;
123
124
125
126 const auto& surface = ts.referenceSurface();
127 const auto& smoothed = ts.smoothed();
128 bool hasSmoothed = ts.hasSmoothed();
129 const auto& filtered = ts.filtered();
130 const auto& cov = ts.smoothedCovariance();
131
132 if (debug_) {
133 std::cout << "Surface::" << surface.transform(gctx_).translation()
134 << std::endl;
135 if (hasSmoothed)
136 std::cout << "Smoothed::" << smoothed.transpose() << std::endl;
137 std::cout << "HasSmoothed::" << hasSmoothed << std::endl;
138 std::cout << "Filtered::" << filtered.transpose() << std::endl;
139 }
140
141 auto partHypo{Acts::SinglyChargedParticleHypothesis::electron()};
142 Acts::BoundTrackParameters sp(surface.getSharedPtr(), smoothed, cov,
143 partHypo);
144 return extrapolate(sp, target_surface);
145 }