ATLAS Offline Software
TRT_TrackExtensionTool_xk.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 // Header file for class TRT_TrackExtensionTool_xk
8 // (c) ATLAS Detector software
10 // Concret implementation for base class ITRT_TrackExtensionTool
12 // Version 1.0 22/08/2005 I.Gavrilenko
14 
15 #ifndef TRT_TrackExtensionTool_xk_H
16 #define TRT_TrackExtensionTool_xk_H
17 
18 
19 
20 #include "GaudiKernel/ServiceHandle.h"
21 #include "GaudiKernel/ToolHandle.h"
30 #include <iosfwd>
31 #include <vector>
32 
33 // MagField cache
36 
37 class MsgStream;
38 class TRT_ID;
39 
40 namespace InDet{
41 
51 
52  virtual public ITRT_TrackExtensionTool, public AthAlgTool
53  {
55  // Public methods:
57 
58  public:
59 
61  // Standard tool methods
63 
65  (const std::string&,const std::string&,const IInterface*);
67  virtual StatusCode initialize() override;
68  virtual StatusCode finalize () override;
69 
71  // Main methods for track extension to TRT
73 
74  virtual std::vector<const Trk::MeasurementBase*>& extendTrack(
75  const EventContext& ctx, const Trk::Track&,
78  const override;
79  virtual std::vector<const Trk::MeasurementBase*>& extendTrack(
80  const EventContext& ctx, const Trk::TrackParameters*,
83  const override;
85  const EventContext& ctx, const Trk::TrackParameters*,
88  const override;
89  virtual Trk::Track* newTrack(const EventContext& ctx, const Trk::Track&,
92  virtual std::unique_ptr<InDet::ITRT_TrackExtensionTool::IEventData>
93  newEvent(const EventContext& ctx) const override;
94 
96  // Print internal tool parameters and status
98 
99  virtual MsgStream& dump(MsgStream& out) const override;
100  virtual std::ostream& dump(std::ostream& out) const override;
101 
102  protected:
103 
104  class EventData;
105  class EventData : public Trk::EventDataBase<EventData,InDet::ITRT_TrackExtensionTool::IEventData>
106  {
108  public:
109  EventData(const TRT_DriftCircleContainer *trtcontainer,
110  double maxslope) : m_trtcontainer(trtcontainer),m_maxslope(maxslope) {}
111 
113 
114  protected:
116  std::vector<const Trk::MeasurementBase*> m_measurement;
118  double m_maxslope;
119  };
120 
121 
122  std::vector<const Trk::MeasurementBase*>& extendTrackFromParameters
123  (const EventContext& ctx,
124  const Trk::TrackParameters *,
127 
129  // Protected Data
131 
132  const TRT_ID *m_trtid{};
133  ToolHandle<ITRT_DetElementsRoadMaker> m_roadtool
134  {this, "RoadTool", "InDet::TRT_DetElementsRoadMaker_xk"}; // TRT road maker tool
135  PublicToolHandle<Trk::IPatternParametersPropagator> m_proptool
136  {this, "PropagatorTool", "Trk::RungeKuttaPropagator"};
137  PublicToolHandle<Trk::IPatternParametersUpdator> m_updatortool
138  {this, "UpdatorTool", "Trk::KalmanUpdator_xk"};
139  ToolHandle<ITrtDriftCircleCutTool> m_selectortool
140  {this, "DriftCircleCutTool", "InDet::InDetTrtDriftCircleCutTool"};// Segment selector tool
141  ToolHandle<Trk::IRIO_OnTrackCreator> m_riontrackD
142  {this, "RIOonTrackToolYesDr", "InDet::TRT_DriftCircleOnTrackTool/TRT_DriftCircleOnTrackTool"};
143  ToolHandle<Trk::IRIO_OnTrackCreator> m_riontrackN
144  {this, "RIOonTrackToolNoDr", "InDet::TRT_DriftCircleOnTrackNoDriftTimeTool/TRT_DriftCircleOnTrackNoDriftTimeTool"};
145 
146  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
147 
148  int m_outputlevel{} ; // Print level
149 
150  IntegerProperty m_segmentFindMode{this, "SegmentFindMode", 3,
151  "Method of segment find"};
152  IntegerProperty m_minNumberDCs{this, "MinNumberDriftCircles", 9,
153  "Min. number of DriftCircles"};
154  IntegerProperty m_minNumberSCT{this, "MinNumberSCTclusters", 5,
155  "Min. number SCT clusters for extension"};
156  IntegerProperty m_minNumberPIX{this, "MinNumberPIXclusters", 2,
157  "Min. number pixel clusters for extension"};
158  DoubleProperty m_roadwidth{this, "RoadWidth", 10.,
159  "Max width of the road"};
160  DoubleProperty m_maxslope{this, "Maxslope", .00005};
161  DoubleProperty m_zVertexWidth{this, "ZVertexHalfWidth", 150.,
162  "Z-vertex half width"};
163  DoubleProperty m_impact{this, "maxImpactParameter", 50,
164  "max impact parameter"};
165  BooleanProperty m_usedriftrad{this, "UseDriftRadius", true,
166  "Use drift time ?"};
167  BooleanProperty m_parameterization{this, "UseParameterization", true,
168  "Use table of min number DCs"};
169  DoubleProperty m_scale_error{this, "ScaleHitUncertainty", 2.,
170  "Scalefactor for hit uncertainty"};
171  StringProperty m_fieldmode{this, "MagneticFieldMode", "MapSolenoid",
172  "Mode of magnetic field"};
173 
174  Trk::MagneticFieldProperties m_fieldprop ; // Magnetic field properties
175  SG::ReadHandleKey<TRT_DriftCircleContainer> m_trtname {this,"TRT_ClustersContainer","TRT_DriftCircles","RHK to retrieve TRT_DriftCircleContainer"};
176 
177  DoubleProperty m_minTRTSegmentpT{this, "minTRTSegmentpT", 300.,
178  "Min pT cut required for TRT Segments"};
180  // Methods
182 
185  bool isGoodExtension(const EventContext& ctx,
186  const Trk::TrackParameters *,
189  bool numberPIXandSCTclustersCut(const Trk::Track&) const;
190 
191  MsgStream& dumpConditions(MsgStream & out) const;
192  };
193 
194  MsgStream& operator << (MsgStream& ,const TRT_TrackExtensionTool_xk&);
195  std::ostream& operator << (std::ostream&,const TRT_TrackExtensionTool_xk&);
196 
197 } // end of name space
198 
199 #endif // TRT_TrackExtensionTool_xk_H
InDet::TRT_TrackExtensionTool_xk::numberPIXandSCTclustersCut
bool numberPIXandSCTclustersCut(const Trk::Track &) const
Definition: TRT_TrackExtensionTool_xk.cxx:500
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
used
InDet::TRT_TrackExtensionTool_xk::magneticFieldInit
StatusCode magneticFieldInit(IOVSVC_CALLBACK_ARGS)
Trk::EventDataBase
Base for a helper class to pass mutable storage to tools.
Definition: EventDataBase.h:17
InDet::operator<<
MsgStream & operator<<(MsgStream &, const GNNTrackReaderTool &)
InDet::TRT_Trajectory_xk
Definition: TRT_Trajectory_xk.h:40
Trk::MagneticFieldProperties
Definition: MagneticFieldProperties.h:31
InDet::TRT_TrackExtensionTool_xk::m_scale_error
DoubleProperty m_scale_error
Definition: TRT_TrackExtensionTool_xk.h:169
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::TRT_TrackExtensionTool_xk::EventData::EventData
EventData(const TRT_DriftCircleContainer *trtcontainer, double maxslope)
Definition: TRT_TrackExtensionTool_xk.h:109
EventDataBase.h
InDet::TRT_TrackExtensionTool_xk::EventData::m_measurement
std::vector< const Trk::MeasurementBase * > m_measurement
Definition: TRT_TrackExtensionTool_xk.h:116
AtlasFieldCacheCondObj.h
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::TRT_TrackExtensionTool_xk::m_updatortool
PublicToolHandle< Trk::IPatternParametersUpdator > m_updatortool
Definition: TRT_TrackExtensionTool_xk.h:138
InDet::TRT_TrackExtensionTool_xk::m_minNumberSCT
IntegerProperty m_minNumberSCT
Definition: TRT_TrackExtensionTool_xk.h:154
InDet::TRT_TrackExtensionTool_xk::m_fieldmode
StringProperty m_fieldmode
Definition: TRT_TrackExtensionTool_xk.h:171
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
ITrtDriftCircleCutTool.h
InDet::TRT_TrackExtensionTool_xk::m_trtid
const TRT_ID * m_trtid
Definition: TRT_TrackExtensionTool_xk.h:132
InDet::TRT_TrackExtensionTool_xk::dump
virtual MsgStream & dump(MsgStream &out) const override
Definition: TRT_TrackExtensionTool_xk.cxx:129
InDet::TRT_TrackExtensionTool_xk::m_outputlevel
int m_outputlevel
Definition: TRT_TrackExtensionTool_xk.h:148
InDet::TRT_TrackExtensionTool_xk::extendTrack
virtual std::vector< const Trk::MeasurementBase * > & extendTrack(const EventContext &ctx, const Trk::Track &, InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const override
Definition: TRT_TrackExtensionTool_xk.cxx:256
Trk::TrackSegment
Definition: TrackSegment.h:56
InDet::TRT_TrackExtensionTool_xk::dumpConditions
MsgStream & dumpConditions(MsgStream &out) const
Definition: TRT_TrackExtensionTool_xk.cxx:140
SG::ReadHandleKey< TRT_DriftCircleContainer >
InDet::TRT_TrackExtensionTool_xk::EventData::m_trtcontainer
const TRT_DriftCircleContainer * m_trtcontainer
Definition: TRT_TrackExtensionTool_xk.h:115
InDet::TRT_TrackExtensionTool_xk::m_parameterization
BooleanProperty m_parameterization
Definition: TRT_TrackExtensionTool_xk.h:167
IOVSVC_CALLBACK_ARGS
#define IOVSVC_CALLBACK_ARGS
short hand for IOVSvc call back argument list, to be used when no access to formal arguments is neede...
Definition: IOVSvcDefs.h:24
InDet::TRT_TrackExtensionTool_xk::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition: TRT_TrackExtensionTool_xk.h:146
InDet::TRT_TrackExtensionTool_xk::m_minNumberPIX
IntegerProperty m_minNumberPIX
Definition: TRT_TrackExtensionTool_xk.h:156
InDet::TRT_TrackExtensionTool_xk::m_segmentFindMode
IntegerProperty m_segmentFindMode
Definition: TRT_TrackExtensionTool_xk.h:150
InDet::TRT_TrackExtensionTool_xk::magneticFieldInit
void magneticFieldInit()
InDet::TRT_TrackExtensionTool_xk::newTrack
virtual Trk::Track * newTrack(const EventContext &ctx, const Trk::Track &, InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const override
Definition: TRT_TrackExtensionTool_xk.cxx:466
InDet::TRT_TrackExtensionTool_xk::newEvent
virtual std::unique_ptr< InDet::ITRT_TrackExtensionTool::IEventData > newEvent(const EventContext &ctx) const override
Definition: TRT_TrackExtensionTool_xk.cxx:210
InDet::TRT_TrackExtensionTool_xk::m_maxslope
DoubleProperty m_maxslope
Definition: TRT_TrackExtensionTool_xk.h:160
InDet::ITRT_TrackExtensionTool
Definition: ITRT_TrackExtensionTool.h:37
ITRT_DetElementsRoadMaker.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
InDet::TRT_TrackExtensionTool_xk::m_riontrackD
ToolHandle< Trk::IRIO_OnTrackCreator > m_riontrackD
Definition: TRT_TrackExtensionTool_xk.h:142
AtlasFieldCache.h
ITRT_TrackExtensionTool.h
InDet::TRT_TrackExtensionTool_xk::initialize
virtual StatusCode initialize() override
Definition: TRT_TrackExtensionTool_xk.cxx:62
InDet::TRT_TrackExtensionTool_xk::m_selectortool
ToolHandle< ITrtDriftCircleCutTool > m_selectortool
Definition: TRT_TrackExtensionTool_xk.h:140
InDet::TRT_TrackExtensionTool_xk::EventData::m_trajectory
TRT_Trajectory_xk m_trajectory
Definition: TRT_TrackExtensionTool_xk.h:117
InDet::TRT_TrackExtensionTool_xk::finalize
virtual StatusCode finalize() override
Definition: TRT_TrackExtensionTool_xk.cxx:120
InDet::TRT_TrackExtensionTool_xk::~TRT_TrackExtensionTool_xk
virtual ~TRT_TrackExtensionTool_xk()
Trk::ParametersBase
Definition: ParametersBase.h:55
InDet::TRT_TrackExtensionTool_xk::TRT_TrackExtensionTool_xk
TRT_TrackExtensionTool_xk(const std::string &, const std::string &, const IInterface *)
Definition: TRT_TrackExtensionTool_xk.cxx:45
InDet::TRT_TrackExtensionTool_xk::m_impact
DoubleProperty m_impact
Definition: TRT_TrackExtensionTool_xk.h:163
InDet::TRT_TrackExtensionTool_xk::m_roadwidth
DoubleProperty m_roadwidth
Definition: TRT_TrackExtensionTool_xk.h:158
InDet::TRT_TrackExtensionTool_xk::EventData::~EventData
~EventData()
Definition: TRT_TrackExtensionTool_xk.h:112
InDet::TRT_TrackExtensionTool_xk::m_proptool
PublicToolHandle< Trk::IPatternParametersPropagator > m_proptool
Definition: TRT_TrackExtensionTool_xk.h:136
InDet::TRT_TrackExtensionTool_xk::m_fieldprop
Trk::MagneticFieldProperties m_fieldprop
Definition: TRT_TrackExtensionTool_xk.h:174
InDet::TRT_DriftCircleContainer
Trk::PrepRawDataContainer< TRT_DriftCircleCollection > TRT_DriftCircleContainer
Definition: TRT_DriftCircleContainer.h:27
InDet::TRT_TrackExtensionTool_xk::m_zVertexWidth
DoubleProperty m_zVertexWidth
Definition: TRT_TrackExtensionTool_xk.h:161
TRT_DriftCircleContainer.h
InDet::TRT_TrackExtensionTool_xk::m_minTRTSegmentpT
DoubleProperty m_minTRTSegmentpT
Definition: TRT_TrackExtensionTool_xk.h:177
InDet::TRT_TrackExtensionTool_xk::EventData
Definition: TRT_TrackExtensionTool_xk.h:106
InDet::TRT_TrackExtensionTool_xk::EventData::m_maxslope
double m_maxslope
Definition: TRT_TrackExtensionTool_xk.h:118
InDet::ITRT_TrackExtensionTool::IEventData
Definition: ITRT_TrackExtensionTool.h:43
SG::ReadCondHandleKey< AtlasFieldCacheCondObj >
TRT_ID
Definition: TRT_ID.h:84
InDet::TRT_TrackExtensionTool_xk
Definition: TRT_TrackExtensionTool_xk.h:53
InDet::TRT_TrackExtensionTool_xk::findSegment
virtual Trk::TrackSegment * findSegment(const EventContext &ctx, const Trk::TrackParameters *, InDet::ITRT_TrackExtensionTool::IEventData &virt_event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const override
Definition: TRT_TrackExtensionTool_xk.cxx:308
InDet::TRT_TrackExtensionTool_xk::m_roadtool
ToolHandle< ITRT_DetElementsRoadMaker > m_roadtool
Definition: TRT_TrackExtensionTool_xk.h:134
InDet::TRT_TrackExtensionTool_xk::m_trtname
SG::ReadHandleKey< TRT_DriftCircleContainer > m_trtname
Definition: TRT_TrackExtensionTool_xk.h:175
InDet::TRT_TrackExtensionTool_xk::extendTrackFromParameters
std::vector< const Trk::MeasurementBase * > & extendTrackFromParameters(const EventContext &ctx, const Trk::TrackParameters *, InDet::TRT_TrackExtensionTool_xk::EventData &event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const
Definition: TRT_TrackExtensionTool_xk.cxx:293
InDet::TRT_TrackExtensionTool_xk::m_riontrackN
ToolHandle< Trk::IRIO_OnTrackCreator > m_riontrackN
Definition: TRT_TrackExtensionTool_xk.h:144
AthAlgTool
Definition: AthAlgTool.h:26
InDet::TRT_TrackExtensionTool_xk::m_usedriftrad
BooleanProperty m_usedriftrad
Definition: TRT_TrackExtensionTool_xk.h:165
TRT_Trajectory_xk.h
InDet::TRT_TrackExtensionTool_xk::m_minNumberDCs
IntegerProperty m_minNumberDCs
Definition: TRT_TrackExtensionTool_xk.h:152
InDet::TRT_TrackExtensionTool_xk::isGoodExtension
bool isGoodExtension(const EventContext &ctx, const Trk::TrackParameters *, InDet::TRT_TrackExtensionTool_xk::EventData &event_data, InDet::TRT_DetElementLink_xk::TRT_DetElemUsedMap &used) const
Definition: TRT_TrackExtensionTool_xk.cxx:408