ATLAS Offline Software
ExtrapolateMuonToIPTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EXTRAPOLATEMUONTOIPTOOL_H
6 #define EXTRAPOLATEMUONTOIPTOOL_H
7 
8 #include <atomic>
9 
11 #include "GaudiKernel/ServiceHandle.h"
12 #include "GaudiKernel/ToolHandle.h"
18 
26 public:
28  ExtrapolateMuonToIPTool(const std::string&, const std::string&, const IInterface*);
29 
31  virtual ~ExtrapolateMuonToIPTool() = default;
32 
34  virtual StatusCode initialize() override;
35 
37  virtual StatusCode finalize() override;
38 
43  std::unique_ptr<TrackCollection> extrapolate(const TrackCollection& muonTracks, const EventContext& ctx) const override;
44 
49  std::unique_ptr<Trk::Track> extrapolate(const Trk::Track& muonTrack, const EventContext& ctx) const override;
50 
51 private:
54 
55  std::unique_ptr<const Trk::Perigee> createPerigee(const Trk::TrackParameters& pars, const EventContext& ctx) const;
56 
57  ToolHandle<Trk::IExtrapolator> m_extrapolator{
58  this,
59  "Extrapolator",
60  "Trk::Extrapolator/AtlasExtrapolator",
61  "Extrapolator",
62  };
63  ToolHandle<Trk::IExtrapolator> m_muonExtrapolator{
64  this,
65  "MuonExtrapolator",
66  "Trk::Extrapolator/MuonExtrapolator",
67  "MuonExtrapolator",
68  };
69  PublicToolHandle<Muon::MuonEDMPrinterTool> m_printer{
70  this,
71  "Printer",
72  "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
73  "muon EDM printer tool",
74  };
75  ToolHandle<Trk::ITrackSummaryTool> m_trackSummary{
76  this,
77  "TrackSummaryTool",
78  "Trk::TrackSummaryTool/MuidTrackSummaryTool",
79  };
80 
82  this,
83  "edmHelper",
84  "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
85  "Handle to the service providing the IMuonEDMHelperSvc interface",
86  };
87 
88  mutable std::atomic_uint m_nextrapolations{0};
89  mutable std::atomic_uint m_failedClosestPars{0};
90  mutable std::atomic_uint m_failedExtrapolationLowMom{0};
91  mutable std::atomic_uint m_failedExtrapolationHighMom{0};
92  mutable std::atomic_uint m_failedPerigeeCreation{0};
93 };
94 
95 #endif // EXTRAPOLATEMUONTOIPTOOL_H
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
ITrackSummaryTool.h
ExtrapolateMuonToIPTool::finalize
virtual StatusCode finalize() override
initialize
Definition: ExtrapolateMuonToIPTool.cxx:32
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
MuonEDMPrinterTool.h
Muon::IMuonTrackExtrapolationTool
Interface class for tools extrapolating muon tracks to a location in the atlas detector.
Definition: IMuonTrackExtrapolationTool.h:16
ExtrapolateMuonToIPTool::m_trackSummary
ToolHandle< Trk::ITrackSummaryTool > m_trackSummary
Definition: ExtrapolateMuonToIPTool.h:75
IExtrapolator.h
ExtrapolateMuonToIPTool::createPerigee
std::unique_ptr< const Trk::Perigee > createPerigee(const Trk::TrackParameters &pars, const EventContext &ctx) const
Definition: ExtrapolateMuonToIPTool.cxx:222
ExtrapolateMuonToIPTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Extrapolator.
Definition: ExtrapolateMuonToIPTool.h:57
ExtrapolateMuonToIPTool::findMeasuredParametersClosestToIP
const Trk::TrackParameters * findMeasuredParametersClosestToIP(const Trk::Track &track) const
find measured parameters closest to IP to start back extrapolation
Definition: ExtrapolateMuonToIPTool.cxx:189
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ExtrapolateMuonToIPTool::m_failedExtrapolationLowMom
std::atomic_uint m_failedExtrapolationLowMom
Definition: ExtrapolateMuonToIPTool.h:90
AthAlgTool.h
ExtrapolateMuonToIPTool
Tool to extrapolate tracks in the muon system to the IP.
Definition: ExtrapolateMuonToIPTool.h:25
Trk::ParametersBase
Definition: ParametersBase.h:55
ExtrapolateMuonToIPTool::m_nextrapolations
std::atomic_uint m_nextrapolations
Definition: ExtrapolateMuonToIPTool.h:88
DataVector< Trk::Track >
ExtrapolateMuonToIPTool::m_edmHelperSvc
ServiceHandle< Muon::IMuonEDMHelperSvc > m_edmHelperSvc
muon EDM helper tool
Definition: ExtrapolateMuonToIPTool.h:81
ExtrapolateMuonToIPTool::m_failedExtrapolationHighMom
std::atomic_uint m_failedExtrapolationHighMom
Definition: ExtrapolateMuonToIPTool.h:91
ExtrapolateMuonToIPTool::m_printer
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
muon EDM printer tool
Definition: ExtrapolateMuonToIPTool.h:69
IMuonEDMHelperSvc.h
ExtrapolateMuonToIPTool::~ExtrapolateMuonToIPTool
virtual ~ExtrapolateMuonToIPTool()=default
Destructor.
ExtrapolateMuonToIPTool::m_failedPerigeeCreation
std::atomic_uint m_failedPerigeeCreation
Definition: ExtrapolateMuonToIPTool.h:92
ExtrapolateMuonToIPTool::m_failedClosestPars
std::atomic_uint m_failedClosestPars
Definition: ExtrapolateMuonToIPTool.h:89
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
ExtrapolateMuonToIPTool::initialize
virtual StatusCode initialize() override
initialize
Definition: ExtrapolateMuonToIPTool.cxx:16
AthAlgTool
Definition: AthAlgTool.h:26
ExtrapolateMuonToIPTool::extrapolate
std::unique_ptr< TrackCollection > extrapolate(const TrackCollection &muonTracks, const EventContext &ctx) const override
extrapolate all tracks in the track collection to the IP
Definition: ExtrapolateMuonToIPTool.cxx:43
ExtrapolateMuonToIPTool::m_muonExtrapolator
ToolHandle< Trk::IExtrapolator > m_muonExtrapolator
MuonExtrapolator.
Definition: ExtrapolateMuonToIPTool.h:63
IMuonTrackExtrapolationTool.h
ServiceHandle< Muon::IMuonEDMHelperSvc >
ExtrapolateMuonToIPTool::ExtrapolateMuonToIPTool
ExtrapolateMuonToIPTool(const std::string &, const std::string &, const IInterface *)
Constructors.
Definition: ExtrapolateMuonToIPTool.cxx:11