ATLAS Offline Software
ITRT_SegmentToTrackTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
17 
19 #ifndef ITRT_SegmentToTrackTool_H
20 #define ITRT_SegmentToTrackTool_H
21 
22 #include "GaudiKernel/IAlgTool.h"
23 
24 #include "TrkTrack/Track.h"
28 #include "GaudiKernel/EventContext.h"
29 #include <utility>
30 
31 class MsgStream;
32 
33 namespace Trk {
34  class PRDtoTrackMap;
35 }
36 
37 namespace InDet {
38 
39  static const InterfaceID IID_ITRT_SegmentToTrackTool("InDet::ITRT_SegmentToTrackTool", 1, 0);
40 
41  class ITRT_SegmentToTrackTool : virtual public IAlgTool {
42 
43  public:
44 
45  static const InterfaceID& interfaceID();
46 
47  virtual StatusCode initialize () = 0;
48  virtual StatusCode finalize () = 0;
49 
50  struct EventData {
51  std::vector< std::pair<Trk::TrackScore, Trk::Track*> > m_trackScores;
56  std::array<int,kNCounter> m_counter {};
57  };
58 
59  virtual Trk::Track* segToTrack(const EventContext&, const Trk::TrackSegment&) const = 0;
60 
62  virtual bool segIsUsed(const Trk::TrackSegment&,
63  const Trk::PRDtoTrackMap *) const = 0;
64 
65  virtual bool toLower(const Trk::TrackSegment&) const = 0;
66 
68  virtual void addNewTrack(Trk::Track*,
69  ITRT_SegmentToTrackTool::EventData &event_data) const = 0;
70 
73  ITRT_SegmentToTrackTool::EventData &event_data) const = 0;
74 
76  // Print internal tool parameters and status
78 
79  virtual MsgStream& dump(MsgStream& out) const = 0;
80  virtual std::ostream& dump(std::ostream& out) const = 0;
81 
82  };
83 
85  // Inline methods
87 
88  inline const InterfaceID& InDet::ITRT_SegmentToTrackTool::interfaceID(){
89  return IID_ITRT_SegmentToTrackTool;
90  }
91 
93  // Overload of << operator MsgStream
95 
96 }
97 
98 #endif //ITRT_SegmentToTrackTool_H
InDet::ITRT_SegmentToTrackTool::segIsUsed
virtual bool segIsUsed(const Trk::TrackSegment &, const Trk::PRDtoTrackMap *) const =0
Check if the TRT segment has already been assigned a Si extension
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::ITRT_SegmentToTrackTool::EventData::knTrkScoreZero
@ knTrkScoreZero
Number of tracks rejected by score zero.
Definition: ITRT_SegmentToTrackTool.h:52
InDet::ITRT_SegmentToTrackTool::toLower
virtual bool toLower(const Trk::TrackSegment &) const =0
Trk::PRDtoTrackMap
Definition: PRDtoTrackMap.h:17
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::ITRT_SegmentToTrackTool::dump
virtual std::ostream & dump(std::ostream &out) const =0
InDet::ITRT_SegmentToTrackTool
Definition: ITRT_SegmentToTrackTool.h:41
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Trk::TrackSegment
Definition: TrackSegment.h:56
InDet::ITRT_SegmentToTrackTool::addNewTrack
virtual void addNewTrack(Trk::Track *, ITRT_SegmentToTrackTool::EventData &event_data) const =0
Add track into the track-score multimap.
TrackSegment.h
Track.h
InDet::ITRT_SegmentToTrackTool::EventData::m_trackScores
std::vector< std::pair< Trk::TrackScore, Trk::Track * > > m_trackScores
Definition: ITRT_SegmentToTrackTool.h:51
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrackCollection.h
InDet::ITRT_SegmentToTrackTool::EventData::kNCounter
@ kNCounter
Definition: ITRT_SegmentToTrackTool.h:55
InDet::ITRT_SegmentToTrackTool::finalize
virtual StatusCode finalize()=0
DataVector< Trk::Track >
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
TrackScore.h
InDet::ITRT_SegmentToTrackTool::initialize
virtual StatusCode initialize()=0
InDet::ITRT_SegmentToTrackTool::interfaceID
static const InterfaceID & interfaceID()
Definition: ITRT_SegmentToTrackTool.h:88
InDet::ITRT_SegmentToTrackTool::EventData::knTRTTrk
@ knTRTTrk
Number of TRT-only tracks on output.
Definition: ITRT_SegmentToTrackTool.h:54
InDet::ITRT_SegmentToTrackTool::resolveTracks
virtual TrackCollection * resolveTracks(const Trk::PRDtoTrackMap *, ITRT_SegmentToTrackTool::EventData &event_data) const =0
Resolve the standalone TRT tracks based on the number of shared TRT hits.
InDet::ITRT_SegmentToTrackTool::EventData::ECounter
ECounter
Definition: ITRT_SegmentToTrackTool.h:52
InDet::ITRT_SegmentToTrackTool::dump
virtual MsgStream & dump(MsgStream &out) const =0
InDet::ITRT_SegmentToTrackTool::EventData::knTrkSegUsed
@ knTrkSegUsed
Number of excluded segments by other TRT segments.
Definition: ITRT_SegmentToTrackTool.h:53
InDet::ITRT_SegmentToTrackTool::EventData
Definition: ITRT_SegmentToTrackTool.h:50
InDet::ITRT_SegmentToTrackTool::segToTrack
virtual Trk::Track * segToTrack(const EventContext &, const Trk::TrackSegment &) const =0
InDet::ITRT_SegmentToTrackTool::EventData::m_counter
std::array< int, kNCounter > m_counter
Definition: ITRT_SegmentToTrackTool.h:56