ATLAS Offline Software
Loading...
Searching...
No Matches
HGTD_IterativeExtensionTool.h
Go to the documentation of this file.
1
22
23#ifndef HGTD_ITERATIVEEXTENTSIONTOOL_H
24#define HGTD_ITERATIVEEXTENTSIONTOOL_H
25
28
29#include "GaudiKernel/ToolHandle.h"
36
37#include <memory>
38
39class HGTD_ID;
41
43 : public extends<AthAlgTool, IHGTD_TrackTimeExtensionTool> {
44
45public:
46 HGTD_IterativeExtensionTool(const std::string&, const std::string&,
47 const IInterface*);
48
49 virtual StatusCode initialize() override final;
50
62 const EventContext& ctx, const xAOD::TrackParticle& track_ptkl,
64 const HepMC::GenEvent* hs_event = nullptr,
65 const InDetSimDataCollection* sim_data = nullptr) const override final;
66
67private:
80 getLastHitOnTrack(const Trk::Track& track) const;
81
92 static std::vector<const Trk::Surface*>
94 const Trk::Layer* layer);
95
108 std::vector<std::unique_ptr<const Trk::TrackParameters>>
109 extrapolateToSurfaces(const EventContext& ctx,
110 const Trk::TrackParameters& param,
111 const std::vector<const Trk::Surface*>& surfaces) const;
112
117 std::unique_ptr<const Trk::TrackStateOnSurface>
119 const Trk::Track* track,
120 const std::vector<std::unique_ptr<const Trk::TrackParameters>>& params,
121 const HGTD_ClusterContainer* container) const;
122
127 std::unique_ptr<const Trk::TrackStateOnSurface>
129 const Trk::TrackParameters* param,
130 const HGTD_ClusterContainer* container) const;
131
137 std::unique_ptr<const Trk::TrackStateOnSurface>
138 updateState(const Trk::Track* track, const Trk::TrackParameters* param,
139 const HGTD_Cluster* cluster) const;
140
141 std::pair<const HGTD_Cluster*, HGTD::ClusterTruthInfo>
142 getTruthMatchedCluster(const std::vector<const Trk::Surface*>& surfaces,
144 const xAOD::TruthParticle* truth_ptkl,
145 const HepMC::GenEvent* hs_event,
146 const InDetSimDataCollection* sim_data) const;
147
148 // extrapolation tool
149 ToolHandle<Trk::IExtrapolator> m_extrapolator{
150 this, "ExtrapolatorTool", "Trk::Extrapolator/AtlasExtrapolator",
151 "Tool for extrapolating the track to the HGTD surfaces"};
152 // kalman updator tool
153 ToolHandle<Trk::IUpdator> m_updator{
154 this, "UpdatorTool", "Trk::KalmanUpdator/KalmanUpdator",
155 "Tool for updating the track parameters accounting for new measurements"};
156
157 ToolHandle<IHGTD_TOFcorrectionTool> m_tof_corr_tool{
158 this, "TOFCorrTool", "StraightLineTOFcorrectionTool",
159 "Tool for correcting for time of flight"};
160
161 ToolHandle<IHGTD_ClusterTruthTool> m_truth_tool{
162 this, "ClusterTruthTool", "HGTD::ClusterTruthTool/ClusterTruthTool",
163 "Tool for classifying HGTD clusters with truth information"};
164
166 const HGTD_ID* m_hgtd_id_helper{nullptr};
167
172 FloatProperty m_chi2_cut{this, "Chi2Cut", 5.0,
173 "Quality cut for decision to keep track extension"};
174
178 IntegerProperty m_particle_hypot{
179 this, "ParticleHypothesis", Trk::ParticleHypothesis::pion,
180 "The hypothesis of the track's particle type"};
181};
182
183#endif // HGTD_ITERATIVEEXTENTSIONTOOL_H
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
Trk::PrepRawDataContainer< HGTD_ClusterCollection > HGTD_ClusterContainer
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
The Detector manager has methods to retrieve the Identifier helper and methods to retrieve the detect...
This is an Identifier helper class for the HGTD subdetector.
Definition HGTD_ID.h:47
ToolHandle< Trk::IExtrapolator > m_extrapolator
ToolHandle< IHGTD_TOFcorrectionTool > m_tof_corr_tool
static std::vector< const Trk::Surface * > getCompatibleSurfaces(const Trk::TrackParameters &param, const Trk::Layer *layer)
Select all within the vincinity of the point of extrapolation.
const Trk::TrackStateOnSurface * getLastHitOnTrack(const Trk::Track &track) const
Retrieve the last hit on track stored in the Trk::Track.
std::vector< std::unique_ptr< const Trk::TrackParameters > > extrapolateToSurfaces(const EventContext &ctx, const Trk::TrackParameters &param, const std::vector< const Trk::Surface * > &surfaces) const
After the compatible surfaces have been selected, the extrapolation is repeated to each of them.
virtual StatusCode initialize() override final
FloatProperty m_chi2_cut
Track extensions are only kept if the chi2/ndof is lower than the defined cut.
HGTD_IterativeExtensionTool(const std::string &, const std::string &, const IInterface *)
std::unique_ptr< const Trk::TrackStateOnSurface > updateStateWithBestFittingCluster(const Trk::Track *track, const std::vector< std::unique_ptr< const Trk::TrackParameters > > &params, const HGTD_ClusterContainer *container) const
Finds the overall best fitting cluster by keeping the one that gave the lowest chi2 after testing eac...
ToolHandle< IHGTD_ClusterTruthTool > m_truth_tool
const HGTD_DetectorManager * m_hgtd_det_mgr
std::pair< const HGTD_Cluster *, HGTD::ClusterTruthInfo > getTruthMatchedCluster(const std::vector< const Trk::Surface * > &surfaces, const HGTD_ClusterContainer *container, const xAOD::TruthParticle *truth_ptkl, const HepMC::GenEvent *hs_event, const InDetSimDataCollection *sim_data) const
std::unique_ptr< const Trk::TrackStateOnSurface > updateState(const Trk::Track *track, const Trk::TrackParameters *param, const HGTD_Cluster *cluster) const
Calls the TOF correction tool to build an HGTD_ClusterOnTrack with a calibrated time and resolution a...
IntegerProperty m_particle_hypot
Particle hypothesis used for the extrapolation.
virtual HGTD::ExtensionObject extendTrackToHGTD(const EventContext &ctx, const xAOD::TrackParticle &track_ptkl, const HGTD_ClusterContainer *container, const HepMC::GenEvent *hs_event=nullptr, const InDetSimDataCollection *sim_data=nullptr) const override final
Finds the (up to) four measurements in HGTD that can be associated to the track.
ToolHandle< Trk::IUpdator > m_updator
std::unique_ptr< const Trk::TrackStateOnSurface > findBestCompatibleCluster(const Trk::Track *track, const Trk::TrackParameters *param, const HGTD_ClusterContainer *container) const
Find the cluster on a given surface that has the best chi2 passing the cut.
Base Class for a Detector Layer in the Tracking realm.
Definition Layer.h:72
represents the track state (measurement, material, fit parameters and quality) at a surface.
ParametersBase< TrackParametersDim, Charged > TrackParameters
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TruthParticle_v1 TruthParticle
Typedef to implementation.