ATLAS Offline Software
Loading...
Searching...
No Matches
Tracking/TrkTools/TrkTrackSummaryTool/TrkTrackSummaryTool/TrackSummaryTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRKTRACKSUMMARYTOOL_H
6#define TRKTRACKSUMMARYTOOL_H
7
9#include "GaudiKernel/ToolHandle.h"
10#include "TrkTrack/Track.h" //used in the included icc file
11#include "TrkTrackSummary/TrackSummary.h" //used in the included icc file
12
13#include "TRT_ElectronPidTools/ITRT_ToT_dEdx.h" //template parameter to tool handle
14#include "TrkToolInterfaces/ITrackSummaryHelperTool.h" //template parameter to tool handle
15#include "TrkToolInterfaces/IPixelToTPIDTool.h" //template parameter to tool handle
16#include "TrkToolInterfaces/ITRT_ElectronPidTool.h" //template parameter to tool handle
17
19#include <bitset>
20#include <memory>
21#include <vector>
22
23class EventContext;
24class AtlasDetectorID;
25class Identifier;
26
27namespace Trk {
28
37
38class RIO_OnTrack;
39class TrackStateOnSurface;
40class MeasurementBase;
41
43 : public extends<AthAlgTool, IExtendedTrackSummaryTool>
44{
45
46public:
47 TrackSummaryTool(const std::string&, const std::string&, const IInterface*);
49 virtual StatusCode initialize() override;
50
65
67 const EventContext& ctx,
68 Track& track,
69 bool suppress_hole_search = false) const override final;
70
76 virtual void updateTrack(const EventContext& ctx,
77 Track& track) const override final;
78
79 /* Start from a copy of the existing input track summary if there,
80 * otherwise start from a new one. Fill it and return it.
81 * Does not modify the const track.
82 */
84 const EventContext& ctx,
85 const Track& track) const override final;
86
87 /* Start from a copy of the existing input track summary if there,
88 * otherwise start from a new one. Fill it and return it.
89 * but without doing the hole search.
90 * Does not modify the const track.
91 */
93 const EventContext& ctx,
94 const Track& track) const override final;
95
101 virtual void updateTrackSummary(const EventContext& ctx,
102 Track& track) const override final;
103
108 virtual void updateTrackSummary(
109 const EventContext& ctx,
110 Track& track,
111 bool suppress_hole_search = false) const override final;
112
113private:
114 /*
115 * Fill the summary info for a Track*/
116 void fillSummary(const EventContext& ctx,
118 const Trk::Track& track,
119 bool doHolesInDet,
120 bool doHolesMuon) const;
121
122 /*
123 * If a summary is there Update it with the required info.
124 * If not there create a new one with the required info.
125 */
126 void UpdateSummary(const EventContext& ctx,
127 Track& track,
128 bool suppress_hole_search) const;
129
131 const EventContext& ctx,
132 const Track& track,
133 bool doHolesInDet,
134 bool doHolesMuon) const;
135
139
141 ToolHandle<ITrackSummaryHelperTool>
142 m_idTool{ this, "InDetSummaryHelperTool", "", "" };
144 ToolHandle<ITrackSummaryHelperTool>
145 m_muonTool{ this, "MuonSummaryHelperTool", "", "" };
146
149 Gaudi::Property<bool> m_doHolesMuon{ this, "doHolesMuon", false, "" };
151 Gaudi::Property<bool> m_doHolesInDet{ this, "doHolesInDet", false, "" };
152
154 Gaudi::Property<bool> m_addMuonDetailedSummary{ this,
155 "AddDetailedMuonSummary",
156 true,
157 "" };
158
159 Gaudi::Property<bool> m_pixelExists{ this, "PixelExists", true, "" };
160
161 Gaudi::Property<bool> m_alwaysRecomputeHoles{ this,
162 "AlwaysRecomputeHoles",
163 false,
164 "" };
165
168
171 void processTrackStates(const EventContext& ctx,
172 const Track& track,
173 const Trk::TrackStates* tsos,
174 std::vector<int>& information,
175 std::bitset<numberOfDetectorTypes>& hitPattern,
176 bool doHolesInDet,
177 bool doHolesMuon) const;
178
179 void processMeasurement(const EventContext& ctx,
180 const Track& track,
181 const Trk::MeasurementBase* meas,
182 const Trk::TrackStateOnSurface* tsos,
183 std::vector<int>& information,
184 std::bitset<numberOfDetectorTypes>& hitPattern) const;
185
190 void searchHolesStepWise(const Trk::Track& track,
191 std::vector<int>& information,
192 bool doHolesInDet,
193 bool doHolesMuon) const;
194};
195
196}
197
199#endif
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
virtual std::unique_ptr< Trk::TrackSummary > summary(const EventContext &ctx, const Track &track) const =0
Start from a copy of the existing input track summary if there, otherwise start from a new one.
virtual void computeAndReplaceTrackSummary(const EventContext &ctx, Track &track, bool suppress_hole_search=false) const =0
Compute track summary and replace the summary in given track.
virtual std::unique_ptr< Trk::TrackSummary > summaryNoHoleSearch(const EventContext &ctx, const Track &track) const =0
Start from a copy of the existing input track summary if there, otherwise start from a new one.
Interface for structuring the summary creation into sub-detector specific tools.
virtual void updateTrack(const EventContext &ctx, Track &track) const =0
Same behavious as IExtendedTrackSummaryTool:computeAndReplaceTrackSummary but without the need to pas...
This class is the pure abstract base class for all fittable tracking measurements.
represents the track state (measurement, material, fit parameters and quality) at a surface.
Gaudi::Property< bool > m_addMuonDetailedSummary
controls whether the detailed summary is added for the muons
virtual void updateTrackSummary(const EventContext &ctx, Track &track) const override final
method which can be used to update the summary of a track it, without doing hole search.
Gaudi::Property< bool > m_doHolesMuon
controls whether holes on track in MS are produced Turning this on will (slightly) increase processin...
ToolHandle< ITrackSummaryHelperTool > m_muonTool
tool to decipher muon RoTs
Gaudi::Property< bool > m_doHolesInDet
controls whether holes on track in ID are produced
virtual void updateTrack(const EventContext &ctx, Track &track) const override final
Same behavious as IExtendedTrackSummaryTool:computeAndReplaceTrackSummary but without the need to pas...
void searchHolesStepWise(const Trk::Track &track, std::vector< int > &information, bool doHolesInDet, bool doHolesMuon) const
Extrapolation is performed from one hit to the next, it is checked if surfaces in between the extrapo...
void fillSummary(const EventContext &ctx, Trk::TrackSummary &ts, const Trk::Track &track, bool doHolesInDet, bool doHolesMuon) const
virtual ~TrackSummaryTool()
std::unique_ptr< Trk::TrackSummary > createSummary(const EventContext &ctx, const Track &track, bool doHolesInDet, bool doHolesMuon) const
Gaudi::Property< bool > m_pixelExists
switch to deactivate Pixel info init
virtual void computeAndReplaceTrackSummary(const EventContext &ctx, Track &track, bool suppress_hole_search=false) const override final
virtual std::unique_ptr< Trk::TrackSummary > summary(const EventContext &ctx, const Track &track) const override final
const Trk::ITrackSummaryHelperTool * getTool(const Identifier &id) const
Return the correct tool, matching the passed Identifier.
void UpdateSummary(const EventContext &ctx, Track &track, bool suppress_hole_search) const
void processTrackStates(const EventContext &ctx, const Track &track, const Trk::TrackStates *tsos, std::vector< int > &information, std::bitset< numberOfDetectorTypes > &hitPattern, bool doHolesInDet, bool doHolesMuon) const
loops over TrackStatesOnSurface and uses this to produce the summary information Fills 'information',...
void processMeasurement(const EventContext &ctx, const Track &track, const Trk::MeasurementBase *meas, const Trk::TrackStateOnSurface *tsos, std::vector< int > &information, std::bitset< numberOfDetectorTypes > &hitPattern) const
TrackSummaryTool(const std::string &, const std::string &, const IInterface *)
virtual std::unique_ptr< Trk::TrackSummary > summaryNoHoleSearch(const EventContext &ctx, const Track &track) const override final
ToolHandle< ITrackSummaryHelperTool > m_idTool
tool to decipher ID RoTs
A summary of the information contained by a track.
STL class.
int ts
Definition globals.cxx:24
Ensure that the ATLAS eigen extensions are properly loaded.
DataVector< const Trk::TrackStateOnSurface > TrackStates
STL namespace.
#define private