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-2023 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/IExtendedTrackSummaryHelperTool.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
116 virtual void updateAdditionalInfo(Track& track) const override;
117
118private:
119 /*
120 * Fill the summary info for a Track*/
121 void fillSummary(const EventContext& ctx,
123 const Trk::Track& track,
124 bool doHolesInDet,
125 bool doHolesMuon) const;
126
127 /*
128 * If a summary is there Update it with the required info.
129 * If not there create a new one with the required info.
130 */
131 void UpdateSummary(const EventContext& ctx,
132 Track& track,
133 bool suppress_hole_search) const;
134
136 const EventContext& ctx,
137 const Track& track,
138 bool doHolesInDet,
139 bool doHolesMuon) const;
140
144
147 m_idTool{ this, "InDetSummaryHelperTool", "", "" };
149 ToolHandle<IExtendedTrackSummaryHelperTool>
150 m_muonTool{ this, "MuonSummaryHelperTool", "", "" };
151
154 Gaudi::Property<bool> m_doHolesMuon{ this, "doHolesMuon", false, "" };
156 Gaudi::Property<bool> m_doHolesInDet{ this, "doHolesInDet", false, "" };
157
159 Gaudi::Property<bool> m_addMuonDetailedSummary{ this,
160 "AddDetailedMuonSummary",
161 true,
162 "" };
163
164 Gaudi::Property<bool> m_pixelExists{ this, "PixelExists", true, "" };
165
166 Gaudi::Property<bool> m_alwaysRecomputeHoles{ this,
167 "AlwaysRecomputeHoles",
168 false,
169 "" };
170
173
176 void processTrackStates(const EventContext& ctx,
177 const Track& track,
178 const Trk::TrackStates* tsos,
179 std::vector<int>& information,
180 std::bitset<numberOfDetectorTypes>& hitPattern,
181 bool doHolesInDet,
182 bool doHolesMuon) const;
183
184 void processMeasurement(const EventContext& ctx,
185 const Track& track,
186 const Trk::MeasurementBase* meas,
187 const Trk::TrackStateOnSurface* tsos,
188 std::vector<int>& information,
189 std::bitset<numberOfDetectorTypes>& hitPattern) const;
190
195 void searchHolesStepWise(const Trk::Track& track,
196 std::vector<int>& information,
197 bool doHolesInDet,
198 bool doHolesMuon) const;
199};
200
201}
202
204#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
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
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...
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
ToolHandle< IExtendedTrackSummaryHelperTool > m_muonTool
tool to decipher muon RoTs
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
virtual void updateAdditionalInfo(Track &track) const override
method to update additional information (PID, dEdX), this is optimised for track collection merging.
void UpdateSummary(const EventContext &ctx, Track &track, bool suppress_hole_search) const
const Trk::IExtendedTrackSummaryHelperTool * getTool(const Identifier &id) const
Return the correct tool, matching the passed Identifier.
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< IExtendedTrackSummaryHelperTool > 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