Skip to content
Snippets Groups Projects
Commit f6667f09 authored by Jean-Baptiste De Vivie De Regie's avatar Jean-Baptiste De Vivie De Regie
Browse files

Merge branch '24.0_fix_z0err_of_TRT_Standalone_tracks' into '24.0'

Optionally use current perigee when recomputing perigee for TRT standalone tracks.

See merge request !75652
parents 455b8f8b 0e7b6734
No related branches found
No related tags found
3 merge requests!756742024-11-07: merge of 24.0 into main,!75652Optionally use current perigee when recomputing perigee for TRT standalone tracks.,!75127Draft: Seeder types rebase2 grid fix
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
......@@ -14,7 +14,6 @@
#include "TrkSurfaces/StraightLineSurface.h"
#include "TrkDetDescrUtils/GeometryStatics.h"
#include "TrkParameters/TrackParameters.h"
#include "TrkTrack/Track.h"
#include "VxVertex/VxCandidate.h"
#include "VxVertex/RecVertex.h"
......@@ -137,7 +136,9 @@ std::unique_ptr<Trk::Perigee> Reco::TrackToVertex::perigeeAtVertex(const EventCo
Trk::PerigeeSurface persf(gp);
std::unique_ptr<Trk::Perigee> vertexPerigee;
std::unique_ptr<Trk::TrackParameters> extrapResult =
m_extrapolator->extrapolateTrack(ctx,track, persf);
!startAtOriginalPerigee(track)
? m_extrapolator->extrapolateTrack(ctx,track, persf)
: m_extrapolator->extrapolate(ctx, *(track.perigeeParameters()), persf);
if (extrapResult && extrapResult->surfaceType() == Trk::SurfaceType::Perigee) {
vertexPerigee.reset( static_cast<Trk::Perigee*>(extrapResult.release()));
}
......@@ -181,7 +182,9 @@ Reco::TrackToVertex::perigeeAtBeamline(
std::unique_ptr<Trk::Perigee> vertexPerigee;
std::unique_ptr<Trk::TrackParameters> extrapResult =
m_extrapolator->extrapolateTrack(ctx,track, persf);
!startAtOriginalPerigee(track)
? m_extrapolator->extrapolateTrack(ctx,track, persf)
: m_extrapolator->extrapolate(ctx,*(track.perigeeParameters()), persf);
if (extrapResult && extrapResult->surfaceType() == Trk::SurfaceType::Perigee) {
vertexPerigee.reset(static_cast<Trk::Perigee*>(extrapResult.release()));
}
......@@ -263,7 +266,9 @@ std::unique_ptr<Trk::TrackParameters> Reco::TrackToVertex::trackAtBeamline(const
std::unique_ptr<Trk::TrackParameters> Reco::TrackToVertex::trackAtBeamline(const EventContext& ctx, const Trk::Track& trk,
const Trk::StraightLineSurface* beamline) const
{
return m_extrapolator->extrapolateTrack(ctx, trk, *beamline);
return !startAtOriginalPerigee(trk)
? m_extrapolator->extrapolateTrack(ctx, trk, *beamline)
: m_extrapolator->extrapolate(ctx,*(trk.perigeeParameters()), *beamline);
}
std::unique_ptr<Trk::TrackParameters> Reco::TrackToVertex::trackAtBeamline(const EventContext& ctx, const Trk::TrackParameters& tpars,
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
......@@ -16,6 +16,7 @@
// Trk
#include "ITrackToVertex/ITrackToVertex.h"
#include "TrkParameters/TrackParameters.h"
#include "TrkTrack/Track.h"
#include "GeoPrimitives/GeoPrimitives.h"
#include "BeamSpotConditionsData/BeamSpotData.h"
#include "TrkExInterfaces/IExtrapolator.h"
......@@ -25,7 +26,6 @@ namespace Rec {
}
namespace Trk {
class Track;
class StraightLineSurface;
}
......@@ -127,8 +127,17 @@ namespace Reco {
const Trk::StraightLineSurface* beamline) const override final;
private:
inline bool startAtOriginalPerigee(const Trk::Track &track) const {
return m_startTRTSAAtPerigee.value()
&& track.info().patternRecognition().test(Trk::TrackInfo::TRTStandalone)
&& track.perigeeParameters();
}
ToolHandle<Trk::IExtrapolator>
m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"}; //!< ToolHandle for Extrapolator
Gaudi::Property<bool> m_startTRTSAAtPerigee
{this, "StartTRTStandaloneTracksAtOriginalPerigee", false,
"When extrapolating TRT standalone start at their original perigee which may have a more realistic covariance"};
const static Amg::Vector3D s_origin; //!< static origin
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment