ATLAS Offline Software
TrackSlimmingTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TrackSlimmingTool.h, (c) ATLAS Detector software
8 
9 #ifndef TRKTRACKSLIMMINGTOOL_H
10 #define TRKTRACKSLIMMINGTOOL_H
11 
15 #include "TrkTrack/Track.h"
16 #include <memory>
17 class AtlasDetectorID;
18 class Identifier;
19 
20 namespace Trk {
21 class TrackStateOnSurface;
22 
34 class TrackSlimmingTool final
35  : virtual public ITrackSlimmingTool
36  , public AthAlgTool
37 {
38 public:
39  TrackSlimmingTool(const std::string&, const std::string&, const IInterface*);
40 
42  virtual ~TrackSlimmingTool();
43 
45  virtual StatusCode initialize() override;
46 
48  virtual StatusCode finalize() override;
49 
61  void slimTrack(Trk::Track& track) const override final;
74  void slimConstTrack(const Trk::Track& track) const override final;
75 
76 private:
80 
83 
87 
90 
95  void setHints(const Trk::Track& track) const;
96 
98  bool& isIDmeas,
99  bool& isMSmeas) const;
100 
101  void findLastValidTSoS(
102  const Trk::TrackStates* oldTrackStates,
103  const Trk::TrackStateOnSurface*& lastValidIDTSOS,
104  const TrackStateOnSurface*& lastValidMSTSOS) const;
105 
106  bool keepParameters(const Trk::TrackStateOnSurface* TSoS,
107  const TrackStateOnSurface*& firstValidIDTSOS,
108  const TrackStateOnSurface*& lastValidIDTSOS,
109  const TrackStateOnSurface*& firstValidMSTSOS,
110  const TrackStateOnSurface*& lastValidMSTSOS) const;
111 };
112 } // end of namespace
113 
114 #endif
Trk::TrackSlimmingTool::~TrackSlimmingTool
virtual ~TrackSlimmingTool()
default destructor
Trk::TrackSlimmingTool::m_keepParameters
bool m_keepParameters
If true, the first and last parameters of ID & MS subsystems will be kept on the slimmed track.
Definition: TrackSlimmingTool.h:86
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Trk::TrackSlimmingTool::m_keepCaloDeposit
bool m_keepCaloDeposit
any CaloDeposit with its adjacent MEOT's will be kept on the slimmed track (combined muon property)
Definition: TrackSlimmingTool.h:79
Trk::TrackSlimmingTool::checkForValidMeas
void checkForValidMeas(const Trk::TrackStateOnSurface *tsos, bool &isIDmeas, bool &isMSmeas) const
Definition: TrackSlimmingTool.cxx:188
Trk::TrackSlimmingTool
Definition: TrackSlimmingTool.h:37
Trk::TrackSlimmingTool::slimTrack
void slimTrack(Trk::Track &track) const override final
Slim a non const Track.
Definition: TrackSlimmingTool.cxx:76
Trk::ITrackSlimmingTool
Interface for constructing 'slimmed' Tracks from complete tracks.
Definition: ITrackSlimmingTool.h:29
Trk::TrackSlimmingTool::TrackSlimmingTool
TrackSlimmingTool(const std::string &, const std::string &, const IInterface *)
Definition: TrackSlimmingTool.cxx:23
Trk::TrackSlimmingTool::m_detID
const AtlasDetectorID * m_detID
atlas id helper
Definition: TrackSlimmingTool.h:89
Track.h
ITrackSlimmingTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Trk::TrackSlimmingTool::keepParameters
bool keepParameters(const Trk::TrackStateOnSurface *TSoS, const TrackStateOnSurface *&firstValidIDTSOS, const TrackStateOnSurface *&lastValidIDTSOS, const TrackStateOnSurface *&firstValidMSTSOS, const TrackStateOnSurface *&lastValidMSTSOS) const
Definition: TrackSlimmingTool.cxx:252
Trk::TrackSlimmingTool::slimConstTrack
void slimConstTrack(const Trk::Track &track) const override final
Slim a const Track.
Definition: TrackSlimmingTool.cxx:83
DataVector< const Trk::TrackStateOnSurface >
Trk::TrackSlimmingTool::m_keepOutliers
bool m_keepOutliers
If true, Outliers will be kept on the slimmed track.
Definition: TrackSlimmingTool.h:82
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
Trk::TrackSlimmingTool::setHints
void setHints(const Trk::Track &track) const
This method just set persistification Hints.
Definition: TrackSlimmingTool.cxx:89
Trk::TrackSlimmingTool::findLastValidTSoS
void findLastValidTSoS(const Trk::TrackStates *oldTrackStates, const Trk::TrackStateOnSurface *&lastValidIDTSOS, const TrackStateOnSurface *&lastValidMSTSOS) const
Definition: TrackSlimmingTool.cxx:217
Trk::TrackSlimmingTool::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition: TrackSlimmingTool.cxx:52
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
AthAlgTool
Definition: AthAlgTool.h:26
checker_macros.h
Define macros for attributes used to control the static checker.
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
Trk::TrackSlimmingTool::finalize
virtual StatusCode finalize() override
standard Athena-Algorithm method
Definition: TrackSlimmingTool.cxx:70
Identifier
Definition: IdentifierFieldParser.cxx:14