ATLAS Offline Software
TRT_SegmentToTrackTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
21 
23 #ifndef TRT_SegmentToTrackTool_H
24 #define TRT_SegmentToTrackTool_H
25 
27 //
29 #include "GaudiKernel/ToolHandle.h"
30 //
35 //Extrapolator tool
37 //Scoring tool
39 
42 // MagField cache
46 
47 #include <string>
48 
49 class MsgStream;
50 class TRT_ID;
51 
52 namespace Trk {
53  class Track;
54  class TrackSegment;
55  class IExtrapolator;
56  class ITrackScoringTool;
57 }
58 
59 namespace InDet {
60 
61  //class TrackSegment;
62 
63  class TRT_SegmentToTrackTool final:
64  virtual public ITRT_SegmentToTrackTool,
65  public AthAlgTool
66  {
67 
68  public:
69 
70  //constructor
71  TRT_SegmentToTrackTool(const std::string& type,
72  const std::string& name,
73  const IInterface* parent );
74 
76 
77  virtual StatusCode initialize() override;
78  virtual StatusCode finalize() override;
79 
80  virtual Trk::Track* segToTrack(const EventContext& ctx, const Trk::TrackSegment&) const override;
82  virtual bool segIsUsed(const Trk::TrackSegment&,
83  const Trk::PRDtoTrackMap *prd_to_track_map) const override;
84  virtual bool toLower(const Trk::TrackSegment&) const override;
85 
87  virtual void addNewTrack(Trk::Track*,
88  ITRT_SegmentToTrackTool::EventData &event_data) const override;
90  virtual TrackCollection* resolveTracks(const Trk::PRDtoTrackMap *prd_to_track_map,
91  ITRT_SegmentToTrackTool::EventData &event_data) const override;
92 
93  virtual MsgStream& dump (MsgStream& out) const override;
94  virtual std::ostream& dump(std::ostream& out) const override;
95 
96  private:
97  BooleanProperty m_doRefit{this, "FinalRefit", false,
98  "Do final careful refit of tracks"};
99  static constexpr double m_fieldUnitConversion = 1000.;
100  DoubleProperty m_sharedFrac{this, "MaxSharedHitsFraction", 0.3,
101  "Maximum fraction of shared TRT drift circles"};
102  BooleanProperty m_suppressHoleSearch{this, "SuppressHoleSearch", false,
103  "Suppress hole search during the track summary creation"};
104 
105  ToolHandle<Trk::IExtrapolator> m_extrapolator
106  {this, "Extrapolator", "Trk::Extrapolator/InDetExtrapolator"};
107 
108  ToolHandle<Trk::ITrackFitter> m_fitterTool{ this, "RefitterTool", "" };
109  ToolHandle<Trk::IPRDtoTrackMapTool> m_assoTool{
110  this,
111  "AssociationTool",
112  "InDet::InDetPRDtoTrackMapToolGangedPixels"
113  };
114  ToolHandle<Trk::IExtendedTrackSummaryTool> m_trackSummaryTool{
115  this,
116  "TrackSummaryTool",
117  "InDetTrackSummaryToolNoHoleSearch"
118  };
119 
120  ToolHandle<Trk::ITrackScoringTool> m_scoringTool
121  {this, "ScoringTool", "Trk::TrackScoringTool/TrackScoringTool"};
122 
124  // Read handle for conditions object to get the field cache
125  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCacheCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj",
126  "Name of the Magnetic Field conditions object key"};
128 
129 
131  const TRT_ID* m_trtId = nullptr;
132 
135  static MsgStream& dumpevent (MsgStream& out) ;
136  MsgStream& dumpconditions (MsgStream& out) const;
137 
138  };
139 
141  // Overload of << operator for MsgStream and std::ostream
143 
144  MsgStream& operator << (MsgStream& ,const ITRT_SegmentToTrackTool&);
145  std::ostream& operator << (std::ostream&,const ITRT_SegmentToTrackTool&);
146 
148  // Inline methods
150 
152  // Overload of << operator MsgStream
154 
155  inline MsgStream& operator << (MsgStream& sl,const ITRT_SegmentToTrackTool& se)
156  {
157  return se.dump(sl);
158  }
160  // Overload of << operator std::ostream
162 
163  inline std::ostream& operator << (std::ostream& sl,const ITRT_SegmentToTrackTool& se)
164  {
165  return se.dump(sl);
166  }
167 
168 }
169 
170 #endif //TRT_SegmentToTrackTool_H
InDet::TRT_SegmentToTrackTool::toLower
virtual bool toLower(const Trk::TrackSegment &) const override
Definition: TRT_SegmentToTrackTool.cxx:787
InDet::TRT_SegmentToTrackTool::m_fitterTool
ToolHandle< Trk::ITrackFitter > m_fitterTool
Definition: TRT_SegmentToTrackTool.h:108
InDet::TRT_SegmentToTrackTool::m_assoTool
ToolHandle< Trk::IPRDtoTrackMapTool > m_assoTool
Definition: TRT_SegmentToTrackTool.h:109
InDet::operator<<
MsgStream & operator<<(MsgStream &, const GNNTrackReaderTool &)
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::TRT_SegmentToTrackTool::m_fieldCacheCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCacheCondObjInputKey
Definition: TRT_SegmentToTrackTool.h:125
Trk::PRDtoTrackMap
Definition: PRDtoTrackMap.h:17
AtlasFieldCacheCondObj.h
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::ITRT_SegmentToTrackTool
Definition: ITRT_SegmentToTrackTool.h:41
InDet::TRT_SegmentToTrackTool::finalize
virtual StatusCode finalize() override
Definition: TRT_SegmentToTrackTool.cxx:63
InDet::TRT_SegmentToTrackTool::TRT_SegmentToTrackTool
TRT_SegmentToTrackTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TRT_SegmentToTrackTool.cxx:25
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
IExtrapolator.h
Trk::TrackSegment
Definition: TrackSegment.h:56
ITrackScoringTool.h
keylayer_zslicemap.se
se
Definition: keylayer_zslicemap.py:194
InDet::TRT_SegmentToTrackTool::dumpevent
static MsgStream & dumpevent(MsgStream &out)
Tracks that will be passed out of AmbiProcessor.
Definition: TRT_SegmentToTrackTool.cxx:106
InDet::TRT_SegmentToTrackTool::segToTrack
virtual Trk::Track * segToTrack(const EventContext &ctx, const Trk::TrackSegment &) const override
Definition: TRT_SegmentToTrackTool.cxx:120
InDet::TRT_SegmentToTrackTool::addNewTrack
virtual void addNewTrack(Trk::Track *, ITRT_SegmentToTrackTool::EventData &event_data) const override
Add track into the track-score multimap.
Definition: TRT_SegmentToTrackTool.cxx:830
InDet::TRT_SegmentToTrackTool::dumpconditions
MsgStream & dumpconditions(MsgStream &out) const
Definition: TRT_SegmentToTrackTool.cxx:81
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
InDet::TRT_SegmentToTrackTool::m_trtId
const TRT_ID * m_trtId
ID TRT helper.
Definition: TRT_SegmentToTrackTool.h:131
AtlasFieldCache.h
InDet::TRT_SegmentToTrackTool::initialize
virtual StatusCode initialize() override
Definition: TRT_SegmentToTrackTool.cxx:37
test_pyathena.parent
parent
Definition: test_pyathena.py:15
InDet::TRT_SegmentToTrackTool::m_trackSummaryTool
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
Definition: TRT_SegmentToTrackTool.h:114
DataVector< Trk::Track >
InDet::TRT_SegmentToTrackTool::m_sharedFrac
DoubleProperty m_sharedFrac
Definition: TRT_SegmentToTrackTool.h:100
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrackScore.h
IPRDtoTrackMapTool.h
InDet::TRT_SegmentToTrackTool::~TRT_SegmentToTrackTool
virtual ~TRT_SegmentToTrackTool()
InDet::TRT_SegmentToTrackTool::m_scoringTool
ToolHandle< Trk::ITrackScoringTool > m_scoringTool
Definition: TRT_SegmentToTrackTool.h:121
InDet::TRT_SegmentToTrackTool::segIsUsed
virtual bool segIsUsed(const Trk::TrackSegment &, const Trk::PRDtoTrackMap *prd_to_track_map) const override
Check if the TRT segment has already been assigned a Si extension
Definition: TRT_SegmentToTrackTool.cxx:746
SG::ReadCondHandleKey< AtlasFieldCacheCondObj >
ITRT_SegmentToTrackTool.h
TRT_ID
Definition: TRT_ID.h:84
InDet::TRT_SegmentToTrackTool::m_fieldUnitConversion
static constexpr double m_fieldUnitConversion
Definition: TRT_SegmentToTrackTool.h:99
IExtendedTrackSummaryTool.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
InDet::TRT_SegmentToTrackTool
Definition: TRT_SegmentToTrackTool.h:66
InDet::TRT_SegmentToTrackTool::m_doRefit
BooleanProperty m_doRefit
Definition: TRT_SegmentToTrackTool.h:97
InDet::TRT_SegmentToTrackTool::resolveTracks
virtual TrackCollection * resolveTracks(const Trk::PRDtoTrackMap *prd_to_track_map, ITRT_SegmentToTrackTool::EventData &event_data) const override
Resolve the standalone TRT tracks based on the number of shared TRT hits.
Definition: TRT_SegmentToTrackTool.cxx:860
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
AthAlgTool
Definition: AthAlgTool.h:26
InDet::TRT_SegmentToTrackTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: TRT_SegmentToTrackTool.h:106
InDet::ITRT_SegmentToTrackTool::EventData
Definition: ITRT_SegmentToTrackTool.h:50
ITrackFitter.h
InDet::TRT_SegmentToTrackTool::dump
virtual MsgStream & dump(MsgStream &out) const override
Definition: TRT_SegmentToTrackTool.cxx:72
InDet::TRT_SegmentToTrackTool::m_suppressHoleSearch
BooleanProperty m_suppressHoleSearch
Definition: TRT_SegmentToTrackTool.h:102