ATLAS Offline Software
TRT_TrackExtensionToolCosmics.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_TrackExtensionToolCosmics
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_TrackExtensionToolCosmics_H
16 #define TRT_TrackExtensionToolCosmics_H
17 
18 
19 
20 #include "GaudiKernel/ToolHandle.h"
26 
28 #include <iosfwd>
29 #include <vector>
30 
31 class MsgStream;
32 class TRT_ID;
33 class AtlasDetectorID;
34 class PropDirection;
35 
36 namespace Trk{
37  class Surface;
38 }
39 
40 namespace InDet {
41 
49 
50  virtual public ITRT_TrackExtensionTool, public AthAlgTool
51  {
53  // Public methods:
55 
56  public:
57 
59  // Standard tool methods
61 
63  (const std::string&,const std::string&,const IInterface*);
65  virtual StatusCode initialize() override;
66  virtual StatusCode finalize () override;
67 
69  // Main methods for track extension to TRT
71 
72  virtual std::vector<const Trk::MeasurementBase*>& extendTrack
73  (const EventContext& ctx,
74  const Trk::Track&,
77 
78  virtual std::vector<const Trk::MeasurementBase*>& extendTrack
79  (const EventContext& ctx,
80  const Trk::TrackParameters *,
83 
85  (const EventContext& ctx,
86  const Trk::TrackParameters *,
89 
90  virtual Trk::Track* newTrack
91  (const EventContext& ctx,
92  const Trk::Track&,
95 
96  virtual std::unique_ptr<InDet::ITRT_TrackExtensionTool::IEventData> newEvent(const EventContext& ctx) const override;
97 
99  // Print internal tool parameters and status
101 
102  virtual MsgStream& dump(MsgStream& out) const override;
103  virtual std::ostream& dump(std::ostream& out) const override;
104 
105  protected:
106 
108  // Protected Data
110 
111  ToolHandle<Trk::IExtrapolator> m_extrapolator
112  {this, "Extrapolator", "Trk::Extrapolator/InDetExtrapolator"};
113  ToolHandle<Trk::IRIO_OnTrackCreator> m_riontrackN
114  {this, "RIOonTrackToolNoDr", "InDet::TRT_DriftCircleOnTrackNoDriftTimeTool/TRT_DriftCircleOnTrackNoDriftTimeTool"}; //
115 
116  int m_outputlevel{} ; // Print level
117  int m_nprint{} ; // Kind of print
118  DoubleProperty m_roadwidth{this, "RoadWidth", 10.,
119  "Max width of the road"};
120  DoubleProperty m_roadwidth_locz{this, "BoundaryLocZTolerance", 10.,
121  "Max width of the road along the straw"};
122  BooleanProperty m_searchNeighbour{this, "SearchNeighbour", false,
123  "Also search neighbouring detector elements?"};
124 
125  SG::ReadHandleKey<TRT_DriftCircleContainer> m_trtname {this,"TRT_ClustersContainer","TRT_DriftCircles","RHK to retrieve TRT_DriftCircles"};
126 
127  class EventData;
128  class EventData : public Trk::EventDataBase<EventData,InDet::ITRT_TrackExtensionTool::IEventData>
129  {
131  public:
132  EventData(const TRT_DriftCircleContainer *trtcontainer) : m_trtcontainer(trtcontainer) {}
133 
135  delete m_trtcylinder;
136  delete m_trtdiscA;
137  delete m_trtdiscC;
138  }
139 
140  protected:
145 
146  std::vector<const Trk::MeasurementBase*> m_measurement ;
147  };
148 
149 
150  AtlasDetectorID* m_idHelper{}; //<! Detector ID helper
151 
152  const TRT_ID* m_trtid{} ;
153 
154  static MsgStream& dumpConditions(MsgStream & out) ;
155  static MsgStream& dumpEvent (MsgStream & out) ;
156 
157 
158 
159  void analyze_tpars(const std::vector<const Trk::TrackParameters* >* tpars,
161 
165 
166  static Amg::Vector3D intersect(const Trk::Surface *surf,const Trk::Perigee *per);
167 
168  };
169 
170  MsgStream& operator << (MsgStream& ,const TRT_TrackExtensionToolCosmics&);
171  std::ostream& operator << (std::ostream&,const TRT_TrackExtensionToolCosmics&);
172 
173 } // end of name space
174 
175 #endif // TRT_TrackExtensionToolCosmics_H
176 
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
used
InDet::TRT_TrackExtensionToolCosmics::m_trtname
SG::ReadHandleKey< TRT_DriftCircleContainer > m_trtname
Definition: TRT_TrackExtensionToolCosmics.h:125
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_TrackExtensionToolCosmics::EventData
Definition: TRT_TrackExtensionToolCosmics.h:129
InDet::TRT_TrackExtensionToolCosmics::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_TrackExtensionToolCosmics.cxx:447
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::TRT_TrackExtensionToolCosmics::EventData::m_trtcylinder
Trk::Surface * m_trtcylinder
Definition: TRT_TrackExtensionToolCosmics.h:142
EventDataBase.h
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::TRT_TrackExtensionToolCosmics::EventData::m_measurement
std::vector< const Trk::MeasurementBase * > m_measurement
Definition: TRT_TrackExtensionToolCosmics.h:146
InDet::TRT_TrackExtensionToolCosmics::analyze_tpars
void analyze_tpars(const std::vector< const Trk::TrackParameters * > *tpars, InDet::TRT_TrackExtensionToolCosmics::EventData &event_data) const
Definition: TRT_TrackExtensionToolCosmics.cxx:230
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Surface
Definition: Trigger/TrigAccel/TrigCudaFitter/src/Surface.h:8
InDet::TRT_TrackExtensionToolCosmics::EventData::m_trtdiscA
Trk::Surface * m_trtdiscA
Definition: TRT_TrackExtensionToolCosmics.h:143
InDet::TRT_TrackExtensionToolCosmics::m_searchNeighbour
BooleanProperty m_searchNeighbour
Definition: TRT_TrackExtensionToolCosmics.h:122
IExtrapolator.h
Trk::TrackSegment
Definition: TrackSegment.h:56
SG::ReadHandleKey< TRT_DriftCircleContainer >
InDet::TRT_TrackExtensionToolCosmics::m_nprint
int m_nprint
Definition: TRT_TrackExtensionToolCosmics.h:117
InDet::TRT_TrackExtensionToolCosmics::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_TrackExtensionToolCosmics.cxx:192
InDet::TRT_TrackExtensionToolCosmics::TRT_TrackExtensionToolCosmics
TRT_TrackExtensionToolCosmics(const std::string &, const std::string &, const IInterface *)
Definition: TRT_TrackExtensionToolCosmics.cxx:32
InDet::ITRT_TrackExtensionTool
Definition: ITRT_TrackExtensionTool.h:37
Trk::PropDirection
PropDirection
Definition: PropDirection.h:19
InDet::TRT_TrackExtensionToolCosmics::findBoundarySurface
Trk::Surface * findBoundarySurface(const Trk::TrackParameters &par, Trk::PropDirection dir, InDet::TRT_TrackExtensionToolCosmics::EventData &event_data) const
Definition: TRT_TrackExtensionToolCosmics.cxx:457
InDet::TRT_TrackExtensionToolCosmics::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_TrackExtensionToolCosmics.cxx:547
InDet::TRT_TrackExtensionToolCosmics::m_riontrackN
ToolHandle< Trk::IRIO_OnTrackCreator > m_riontrackN
Definition: TRT_TrackExtensionToolCosmics.h:114
InDet::TRT_TrackExtensionToolCosmics::dump
virtual MsgStream & dump(MsgStream &out) const override
Definition: TRT_TrackExtensionToolCosmics.cxx:101
InDet::TRT_TrackExtensionToolCosmics::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
Definition: TRT_TrackExtensionToolCosmics.h:112
InDet::TRT_TrackExtensionToolCosmics::m_trtid
const TRT_ID * m_trtid
Definition: TRT_TrackExtensionToolCosmics.h:152
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
InDet::TRT_TrackExtensionToolCosmics::EventData::m_trtdiscC
Trk::Surface * m_trtdiscC
Definition: TRT_TrackExtensionToolCosmics.h:144
ITRT_TrackExtensionTool.h
EventData
Definition: Trigger/TrigAccel/TrigCudaFitter/src/EventData.h:11
Trk::ParametersBase
Definition: ParametersBase.h:55
beamspotman.dir
string dir
Definition: beamspotman.py:623
InDet::TRT_TrackExtensionToolCosmics::EventData::EventData
EventData(const TRT_DriftCircleContainer *trtcontainer)
Definition: TRT_TrackExtensionToolCosmics.h:132
InDet::TRT_DriftCircleContainer
Trk::PrepRawDataContainer< TRT_DriftCircleCollection > TRT_DriftCircleContainer
Definition: TRT_DriftCircleContainer.h:27
TRT_DriftCircleContainer.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::TRT_TrackExtensionToolCosmics::dumpConditions
static MsgStream & dumpConditions(MsgStream &out)
Definition: TRT_TrackExtensionToolCosmics.cxx:113
InDet::TRT_TrackExtensionToolCosmics::intersect
static Amg::Vector3D intersect(const Trk::Surface *surf, const Trk::Perigee *per)
Definition: TRT_TrackExtensionToolCosmics.cxx:491
InDet::TRT_TrackExtensionToolCosmics::m_roadwidth
DoubleProperty m_roadwidth
Definition: TRT_TrackExtensionToolCosmics.h:118
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
InDet::TRT_TrackExtensionToolCosmics::EventData::m_trtcontainer
const TRT_DriftCircleContainer * m_trtcontainer
Definition: TRT_TrackExtensionToolCosmics.h:141
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::TRT_TrackExtensionToolCosmics::~TRT_TrackExtensionToolCosmics
virtual ~TRT_TrackExtensionToolCosmics()
InDet::TRT_TrackExtensionToolCosmics::initialize
virtual StatusCode initialize() override
Definition: TRT_TrackExtensionToolCosmics.cxx:49
InDet::ITRT_TrackExtensionTool::IEventData
Definition: ITRT_TrackExtensionTool.h:43
InDet::TRT_TrackExtensionToolCosmics
Definition: TRT_TrackExtensionToolCosmics.h:51
InDet::TRT_TrackExtensionToolCosmics::m_outputlevel
int m_outputlevel
Definition: TRT_TrackExtensionToolCosmics.h:116
InDet::TRT_TrackExtensionToolCosmics::finalize
virtual StatusCode finalize() override
Definition: TRT_TrackExtensionToolCosmics.cxx:90
TRT_ID
Definition: TRT_ID.h:84
InDet::TRT_TrackExtensionToolCosmics::newEvent
virtual std::unique_ptr< InDet::ITRT_TrackExtensionTool::IEventData > newEvent(const EventContext &ctx) const override
Definition: TRT_TrackExtensionToolCosmics.cxx:162
AthAlgTool
Definition: AthAlgTool.h:26
InDet::TRT_TrackExtensionToolCosmics::EventData::~EventData
~EventData()
Definition: TRT_TrackExtensionToolCosmics.h:134
Trk::Surface
Definition: Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h:75
InDet::TRT_TrackExtensionToolCosmics::m_idHelper
AtlasDetectorID * m_idHelper
Definition: TRT_TrackExtensionToolCosmics.h:150
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
InDet::TRT_TrackExtensionToolCosmics::dumpEvent
static MsgStream & dumpEvent(MsgStream &out)
Definition: TRT_TrackExtensionToolCosmics.cxx:123
InDet::TRT_TrackExtensionToolCosmics::m_roadwidth_locz
DoubleProperty m_roadwidth_locz
Definition: TRT_TrackExtensionToolCosmics.h:120