ATLAS Offline Software
TRT_TrackTimingTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // TRT_TrackTimingTool.h, (c) ATLAS Detector software
8 
9 #ifndef TRTTRACKTIMINGTOOL_H
10 #define TRTTRACKTIMINGTOOL_H
11 
12 #include <vector>
13 
14 #include "GaudiKernel/ToolHandle.h"
17 #include "TrkTrack/Track.h"
18 #include "Particle/TrackParticle.h"
23 
25 
28 
31 
32 class AtlasDetectorID;
33 class Identifier;
34 
35 namespace Trk{
36  class ITrackFitter;
37 }
38 
44 namespace InDet
45 {
46 
47  class IInDetCosmicsEventPhaseTool;
48 
49 class TRT_TrackTimingTool : virtual public ITRT_TrackTimingTool, public AthAlgTool {
50  public:
51  TRT_TrackTimingTool(const std::string&, const std::string&, const IInterface*);
52 
54  virtual ~TRT_TrackTimingTool();
55 
57  virtual StatusCode initialize();
58 
60  virtual StatusCode finalize();
61 
62  virtual std::vector<Trk::SpaceTimePoint*> timeMeasurements(const Trk::Track& trk, const Trk::SegmentCollection *sgmColl = 0) const;
63  virtual std::vector<Trk::SpaceTimePoint*> timeMeasurements(const Trk::TrackParticleBase& trk) const; // calls the above
64  virtual std::vector<Trk::SpaceTimePoint*> timeMeasurements(std::vector<const Trk::Segment*> segments) const; // will return empty vector!
65 
67  float getTrackTimeFromDriftRadius(const Trk::Track* track, int &nHits) const;
68 
69  private:
70 
72  ToolHandle<Trk::ITrackFitter> m_ITrackFitter; // refit the ID track if measurements on track are not available
73  ToolHandle<InDet::IInDetCosmicsEventPhaseTool> m_eventPhaseTool; //<! Cosmics Event Phase tool
74 
75  ToolHandle<ITRT_CalDbTool> m_caldbtool ;
76 
78  bool m_debug;
80 
81 
82 
84  float etaCorrection(const Trk::Track& track) const;
85 
87  void trackInformation(const Trk::Track& track, Amg::Vector3D &position, int &nTRTdriftCircles, int &nMissingRDOs, int &nMissingTrackParameters, int &nUsedHits) const;
88 
90  void debugMissingMeasurements(const Trk::Track& trk) const;
91 
92  };
93 
94 }
95 
96 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
IInDetCosmicsEventPhaseTool.h
InDet::TRT_TrackTimingTool::m_doEtaCorrection
bool m_doEtaCorrection
Definition: TRT_TrackTimingTool.h:77
TrackParticle.h
ITRT_TrackTimingTool.h
InDet::TRT_TrackTimingTool::m_eventPhaseTool
ToolHandle< InDet::IInDetCosmicsEventPhaseTool > m_eventPhaseTool
Definition: TRT_TrackTimingTool.h:73
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::TRT_TrackTimingTool::finalize
virtual StatusCode finalize()
standard Athena-Algorithm method
Definition: TRT_TrackTimingTool.cxx:67
InDet::TRT_TrackTimingTool::trackInformation
void trackInformation(const Trk::Track &track, Amg::Vector3D &position, int &nTRTdriftCircles, int &nMissingRDOs, int &nMissingTrackParameters, int &nUsedHits) const
get basic track info to know which function needs to be called, and calculate the position
Definition: TRT_TrackTimingTool.cxx:238
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
TrackParticleBase.h
SG::ReadHandleKey< xAOD::EventInfo >
SpaceTimePoint.h
Track.h
InDet::TRT_TrackTimingTool::m_caldbtool
ToolHandle< ITRT_CalDbTool > m_caldbtool
TRT Calibration DB tool.
Definition: TRT_TrackTimingTool.h:75
Trk::TrackParticleBase
Definition: TrackParticleBase.h:41
InDet::TRT_TrackTimingTool::debugMissingMeasurements
void debugMissingMeasurements(const Trk::Track &trk) const
private debugging function for commissioning phase
Definition: TRT_TrackTimingTool.cxx:276
InDet::TRT_TrackTimingTool::initialize
virtual StatusCode initialize()
standard Athena-Algorithm method
Definition: TRT_TrackTimingTool.cxx:46
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SpaceTimePointBase.h
AthAlgTool.h
ITRT_CalDbTool.h
abstract interface to TRT calibration constants
TRT_DriftCircleOnTrack.h
InDet::TRT_TrackTimingTool::timeMeasurements
virtual std::vector< Trk::SpaceTimePoint * > timeMeasurements(const Trk::Track &trk, const Trk::SegmentCollection *sgmColl=0) const
returns time measurements for a given track.
Definition: TRT_TrackTimingTool.cxx:73
InDet::TRT_TrackTimingTool::m_ITrackFitter
ToolHandle< Trk::ITrackFitter > m_ITrackFitter
tools - this is the tool that actually does the work
Definition: TRT_TrackTimingTool.h:72
DataVector< Trk::Segment >
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::TRT_TrackTimingTool::m_EventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Current event.
Definition: TRT_TrackTimingTool.h:79
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
InDet::TRT_TrackTimingTool::etaCorrection
float etaCorrection(const Trk::Track &track) const
eta-dependent corrections, called if m_doEtaCorrection == true
Definition: TRT_TrackTimingTool.cxx:217
EventInfo.h
InDet::TRT_TrackTimingTool::getTrackTimeFromDriftRadius
float getTrackTimeFromDriftRadius(const Trk::Track *track, int &nHits) const
calculate the time from drift radius - when RDO hits are not available - for running on AODs
Definition: TRT_TrackTimingTool.cxx:175
InDet::TRT_TrackTimingTool
Definition: TRT_TrackTimingTool.h:49
InDet::TRT_TrackTimingTool::m_debug
bool m_debug
Definition: TRT_TrackTimingTool.h:78
InDet::ITRT_TrackTimingTool
Interface for tools that calculate the track time - only a wrapper such that it can be accessed in th...
Definition: ITRT_TrackTimingTool.h:27
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
AthAlgTool
Definition: AthAlgTool.h:26
ITrackFitter.h
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_TrackTimingTool::~TRT_TrackTimingTool
virtual ~TRT_TrackTimingTool()
default destructor
Definition: TRT_TrackTimingTool.cxx:41
InDet::TRT_TrackTimingTool::TRT_TrackTimingTool
TRT_TrackTimingTool(const std::string &, const std::string &, const IInterface *)
Definition: TRT_TrackTimingTool.cxx:22
Identifier
Definition: IdentifierFieldParser.cxx:14