35 return StatusCode::SUCCESS;
44 beamTransform.pretranslate(beamSpotHandle->
beamPos());
46 return std::make_unique< Trk::StraightLineSurface >(beamTransform);
53 return StatusCode::SUCCESS;
61 if (vxCandidate!=
nullptr) {
65 Amg::Vector3D persfPosition(vertexPosition.x(), vertexPosition.y(), vertexPosition.z());
66 return(this->perigeeAtVertex(ctx,
tp, persfPosition));
68 ATH_MSG_DEBUG(
"No reconstructed vertex found in TrackParticle, perigee will be expressed to (0.,0.,0.).");
69 return (perigeeAtVertex(ctx,
tp,Trk::s_origin));
81 std::unique_ptr<Trk::Perigee> vertexPerigee;
85 ATH_MSG_DEBUG(
"Perigee of TrackParticle is already expressed to given "
86 "vertex, a copy is returned.");
87 return std::unique_ptr<Trk::Perigee>(trackparPerigee.
clone());
89 std::unique_ptr<Trk::TrackParameters> extrapResult =
90 m_extrapolator->extrapolateDirectly(ctx,trackparPerigee, persf);
92 vertexPerigee.reset(
static_cast<Trk::Perigee*
>(extrapResult.release()));
97 "Extrapolation to Perigee failed, a NULL pointer is returned.");
105 std::unique_ptr<Trk::Perigee> vertexPerigee =
nullptr;
108 if (trackparPerigee){
111 ATH_MSG_DEBUG(
"Perigee of TrackParticle is already expressed to given vertex, a copy is returned.");
112 return std::unique_ptr<Trk::Perigee>(trackparPerigee->
clone());
115 m_extrapolator->extrapolateDirectly(ctx,*trackparPerigee, persf);
118 vertexPerigee.reset(
static_cast<Trk::Perigee*
>(extrapResult.release()));
123 "No Perigee found in TrackParticle, a NULL pointer is returned.");
128 "Extrapolation to Perigee failed, a NULL pointer is returned.");
130 return vertexPerigee;
137 std::unique_ptr<Trk::Perigee> vertexPerigee;
138 std::unique_ptr<Trk::TrackParameters> extrapResult =
139 !startAtOriginalPerigee(
track)
140 ? m_extrapolator->extrapolateTrack(ctx,
track, persf)
141 : m_extrapolator->extrapolate(ctx, *(
track.perigeeParameters()), persf);
143 vertexPerigee.reset(
static_cast<Trk::Perigee*
>(extrapResult.release()));
145 if (!vertexPerigee) {
148 ATH_MSG_DEBUG(
"Perigee of Track is already expressed to given vertex, a "
149 "copy is returned.");
150 vertexPerigee.reset(trackPerigee->
clone());
153 "Extrapolation to Perigee failed, NULL pointer is returned.");
156 return (vertexPerigee);
160 std::unique_ptr<Trk::Perigee>
162 const EventContext& ctx,
177 amgtranslation * Amg::RotationMatrix3D::Identity();
183 std::unique_ptr<Trk::Perigee> vertexPerigee;
184 std::unique_ptr<Trk::TrackParameters> extrapResult =
185 !startAtOriginalPerigee(
track)
186 ? m_extrapolator->extrapolateTrack(ctx,
track, persf)
187 : m_extrapolator->extrapolate(ctx,*(
track.perigeeParameters()), persf);
189 vertexPerigee.reset(
static_cast<Trk::Perigee*
>(extrapResult.release()));
191 if (!vertexPerigee) {
197 if (track_parameter_list) {
202 extrapResult = m_extrapolator->extrapolate(ctx,*trk_params, persf);
205 vertexPerigee.reset(
static_cast<Trk::Perigee*
>(extrapResult.release()));
211 if (!vertexPerigee) {
214 ATH_MSG_DEBUG(
"Perigee of Track is already expressed to given vertex, a "
215 "copy is returned.");
216 vertexPerigee.reset(trackPerigee->
clone());
219 "Extrapolation to Beamline Perigee failed, NULL pointer is returned.");
222 return (vertexPerigee);
246 amgTransf = amgtranslation * Amg::RotationMatrix3D::Identity();
251 std::unique_ptr<Trk::TrackParameters> vertexPerigee;
255 ATH_MSG_DEBUG(
"Perigee of TrackParticle is already expressed to given vertex, a copy is returned.");
256 return std::unique_ptr<Trk::TrackParameters>(trackparPerigee.
clone());
258 vertexPerigee = m_extrapolator->extrapolateDirectly(ctx,trackparPerigee, persf);
260 ATH_MSG_DEBUG(
"Extrapolation to Beam Line failed, a NULL pointer is returned.");
262 return vertexPerigee;
269 return !startAtOriginalPerigee(trk)
270 ? m_extrapolator->extrapolateTrack(ctx, trk, *beamline)
277 return m_extrapolator->extrapolate(ctx, tpars, *beamline);