ATLAS Offline Software
Loading...
Searching...
No Matches
egammaTrkRefitterTool.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 EGAMMATRACKTOOLS_EGAMMATRKREFITTERTOOL_H
6#define EGAMMATRACKTOOLS_EGAMMATRKREFITTERTOOL_H
17
19
22
23#include "GaudiKernel/ServiceHandle.h"
24#include "GaudiKernel/ToolHandle.h"
25
29#include "TrkTrack/Track.h"
30
31#include <memory>
32
33class AtlasDetectorID;
34
36 : virtual public IegammaTrkRefitterTool
37 , public AthAlgTool
38{
39
40public:
42 egammaTrkRefitterTool(const std::string&,
43 const std::string&,
44 const IInterface*);
45
47 virtual ~egammaTrkRefitterTool() = default;
48
50 virtual StatusCode initialize() override;
51
53 virtual StatusCode finalize() override;
54
56
58 virtual StatusCode refitTrack(const EventContext& ctx,
59 const Trk::Track*,
60 Cache& cache) const override final;
61
62private:
64 std::vector<const Trk::MeasurementBase*> getIDHits(
65 const Trk::Track* track) const;
66
68 {
69 /*
70 * we need to take care of returning all the relevant measurements
71 * while at the same time keeping proper ownership only for the ones
72 * not handled by the EDM
73 */
74 std::vector<const Trk::MeasurementBase*> m_measurements;
75 std::vector<std::unique_ptr<const Trk::MeasurementBase>> m_trash;
76 };
77
79 const EventContext& ctx,
80 const Trk::Track* track,
81 const xAOD::Electron* eg = nullptr) const;
82
84 ToolHandle<Trk::ITrackFitter> m_ITrackFitter{
85 this,
86 "FitterTool",
87 "Trk__GaussianSumFitter/GSFTrackFitter",
88 "ToolHandle for track fitter implementation"
89 };
90
91 ToolHandle<ICaloCluster_OnTrackBuilder>
92 m_CCOTBuilder{ this, "CCOTBuilder", "CaloCluster_OnTrackBuilder", "" };
93
95 Gaudi::Property<int> m_matEffects{
96 this,
97 "matEffects",
98 1,
99 "Type of material interaction in extrapolation (Default Electron)"
100 };
101
104
106
107 Gaudi::Property<bool> m_useClusterPosition{
108 this,
109 "useClusterPosition",
110 false,
111 "Switch to control use of Cluster position measurement"
112 };
113
115 Gaudi::Property<bool> m_RemoveTRT{ this,
116 "RemoveTRTHits",
117 false,
118 "RemoveTRT Hits" };
119};
120
121#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
virtual ~egammaTrkRefitterTool()=default
Destructor.
IegammaTrkRefitterTool::Cache Cache
ToolHandle< ICaloCluster_OnTrackBuilder > m_CCOTBuilder
virtual StatusCode refitTrack(const EventContext &ctx, const Trk::Track *, Cache &cache) const override final
Refit a track.
ToolHandle< Trk::ITrackFitter > m_ITrackFitter
The track refitter.
egammaTrkRefitterTool(const std::string &, const std::string &, const IInterface *)
Constructor with AlgTool parameters.
Gaudi::Property< int > m_matEffects
type of material interaction in extrapolation
MeasurementsAndTrash addPointsToTrack(const EventContext &ctx, const Trk::Track *track, const xAOD::Electron *eg=nullptr) const
Adds a beam spot to the Measurements passed to the track refitter.
Gaudi::Property< bool > m_useClusterPosition
virtual StatusCode initialize() override
AlgTool initialise method.
virtual StatusCode finalize() override
AlgTool finalise method.
const AtlasDetectorID * m_idHelper
std::vector< const Trk::MeasurementBase * > getIDHits(const Trk::Track *track) const
Get the hits from the Inner Detector.
Gaudi::Property< bool > m_RemoveTRT
Option to remove TRT hits from track.
Trk::ParticleHypothesis m_ParticleHypothesis
Particle Hypothesis.
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
Electron_v1 Electron
Definition of the current "egamma version".
Struct Holding the result to return and intermediate objects Things are owned by the EDM or the uniqu...
std::vector< const Trk::MeasurementBase * > m_measurements
std::vector< std::unique_ptr< const Trk::MeasurementBase > > m_trash