ATLAS Offline Software
TrackToVertex.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TrackToVertex.h, (c) ATLAS Detector software 2005
8 
9 
10 #ifndef RECOTOOLS_TRACKTOVERTEX_H
11 #define RECOTOOLS_TRACKTOVERTEX_H
12 
13 // Gaudi
15 #include "GaudiKernel/ToolHandle.h"
16 // Trk
19 #include "TrkTrack/Track.h"
23 
24 namespace Rec {
25  class TrackParticle;
26 }
27 
28 namespace Trk {
29  class StraightLineSurface;
30 }
31 
41 namespace Reco {
42 
43  class TrackToVertex : public extends <AthAlgTool, ITrackToVertex>
44  {
45  public:
46 
48  TrackToVertex(const std::string&,const std::string&,const IInterface*);
49 
51  virtual ~TrackToVertex() = default;
52 
54  virtual StatusCode initialize() override final;
56  virtual StatusCode finalize() override final;
57 
59  virtual std::unique_ptr<Trk::StraightLineSurface> GetBeamLine(
60  const InDet::BeamSpotData*)
61  const override final; // In C++17 make this [[nodiscard]]
62 
65  virtual std::unique_ptr<Trk::Perigee> perigeeAtVertex(
66  const EventContext& ctx,
68  const Amg::Vector3D& gp) const override final;
69 
72  virtual std::unique_ptr<Trk::Perigee> perigeeAtVertex(
73  const EventContext& ctx,
75  const Amg::Vector3D& gp) const override final;
76 
79  virtual std::unique_ptr<Trk::Perigee> perigeeAtVertex(
80  const EventContext& ctx,
81  const Rec::TrackParticle& tp) const override final;
82 
85  virtual std::unique_ptr<Trk::Perigee> perigeeAtVertex(
86  const EventContext& ctx,
87  const xAOD::TrackParticle& tp) const override final;
88 
90  virtual std::unique_ptr<Trk::Perigee> perigeeAtVertex(
91  const EventContext& ctx,
92  const Trk::Track& trk,
93  const Amg::Vector3D& gp) const override final;
94 
97  virtual std::unique_ptr<Trk::Perigee> perigeeAtBeamline(
98  const EventContext& ctx,
99  const Trk::Track& trk,
100  const InDet::BeamSpotData*) const override final;
101 
104  virtual std::unique_ptr<Trk::TrackParameters> trackAtBeamline(
105  const EventContext& ctx,
106  const Rec::TrackParticle& tp) const override final;
107 
110  virtual std::unique_ptr<Trk::TrackParameters> trackAtBeamline(
111  const EventContext& ctx,
113  const InDet::BeamSpotData*) const override final;
114 
117  virtual std::unique_ptr<Trk::TrackParameters> trackAtBeamline(
118  const EventContext& ctx,
119  const Trk::Track& trk,
120  const Trk::StraightLineSurface* beamline) const override final;
121 
124  virtual std::unique_ptr<Trk::TrackParameters> trackAtBeamline(
125  const EventContext& ctx,
126  const Trk::TrackParameters& tpars,
127  const Trk::StraightLineSurface* beamline) const override final;
128 
129  private:
130  inline bool startAtOriginalPerigee(const Trk::Track &track) const {
131  return m_startTRTSAAtPerigee.value()
132  && track.info().patternRecognition().test(Trk::TrackInfo::TRTStandalone)
133  && track.perigeeParameters();
134  }
135 
136  ToolHandle<Trk::IExtrapolator>
137  m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"};
138  Gaudi::Property<bool> m_startTRTSAAtPerigee
139  {this, "StartTRTStandaloneTracksAtOriginalPerigee", false,
140  "When extrapolating TRT standalone start at their original perigee which may have a more realistic covariance"};
141 
142  const static Amg::Vector3D s_origin;
143  };
144 
145 } // end of namespace
146 
147 
148 #endif // RECOTOOLS_TRACKTOVERTEX_H
149 
TrackParameters.h
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
Reco::TrackToVertex::finalize
virtual StatusCode finalize() override final
AlgTool finalize method.
Definition: TrackToVertex.cxx:50
Reco::TrackToVertex::m_startTRTSAAtPerigee
Gaudi::Property< bool > m_startTRTSAAtPerigee
Definition: TrackToVertex.h:139
ParticleTest.tp
tp
Definition: ParticleTest.py:25
Reco::TrackToVertex::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
ToolHandle for Extrapolator.
Definition: TrackToVertex.h:137
IExtrapolator.h
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
xAOD::TrackParameters
TrackParameters_v1 TrackParameters
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParameters.h:11
Reco::TrackToVertex::startAtOriginalPerigee
bool startAtOriginalPerigee(const Trk::Track &track) const
Definition: TrackToVertex.h:130
Track.h
xAOD::TrackParticle
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Definition: Event/xAOD/xAODTracking/xAODTracking/TrackParticle.h:13
GeoPrimitives.h
Reco::TrackToVertex::s_origin
static const Amg::Vector3D s_origin
static origin
Definition: TrackToVertex.h:142
Reco::TrackToVertex::initialize
virtual StatusCode initialize() override final
AlgTool initailize method.
Definition: TrackToVertex.cxx:30
Reco::TrackToVertex
Definition: TrackToVertex.h:44
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
Reco::TrackToVertex::trackAtBeamline
virtual std::unique_ptr< Trk::TrackParameters > trackAtBeamline(const EventContext &ctx, const Rec::TrackParticle &tp) const override final
Interface method for use with TrackParticle and the beamline from the BeamSpotSvc - AOD.
Definition: TrackToVertex.cxx:225
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
ITrackToVertex.h
Reco::TrackToVertex::perigeeAtBeamline
virtual std::unique_ptr< Trk::Perigee > perigeeAtBeamline(const EventContext &ctx, const Trk::Track &trk, const InDet::BeamSpotData *) const override final
Interface method for use with Track and the beamline from the BeamSpotSvc - ESD.
Definition: TrackToVertex.cxx:161
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
Reco::TrackToVertex::perigeeAtVertex
virtual std::unique_ptr< Trk::Perigee > perigeeAtVertex(const EventContext &ctx, const Rec::TrackParticle &tp, const Amg::Vector3D &gp) const override final
Interface method for use with TrackParticle and given vertex position.
Definition: TrackToVertex.cxx:101
Reco
Definition: TrackCounting.h:24
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Reco::TrackToVertex::GetBeamLine
virtual std::unique_ptr< Trk::StraightLineSurface > GetBeamLine(const InDet::BeamSpotData *) const override final
Use this for MT Coding.
Definition: TrackToVertex.cxx:40
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
BeamSpotData.h
Reco::TrackToVertex::TrackToVertex
TrackToVertex(const std::string &, const std::string &, const IInterface *)
AlgTool like constructor.
Definition: TrackToVertex.cxx:24
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Reco::TrackToVertex::~TrackToVertex
virtual ~TrackToVertex()=default
Virtual destructor.
Trk::TrackInfo::TRTStandalone
@ TRTStandalone
TRT Standalone.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:162