ATLAS Offline Software
FPGATrackSimHough/FPGATrackSimRoadUnionTool.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 #ifndef FPGATrackSimROADUNIONTOOL_H
4 #define FPGATrackSimROADUNIONTOOL_H
5 
16 #include "GaudiKernel/ServiceHandle.h"
18 
22 
23 
24 // This class is merely a lightweight wrapper around multiple road finder tools.
25 // It has evolved into representing the "slicing engine" in firmware and thus no longer
26 // inherits from IFPGATrackSimRoadFinderTool.
28 {
29  public:
30 
32  // AthAlgTool
33 
34  FPGATrackSimRoadUnionTool(const std::string&, const std::string&, const IInterface*);
35 
36  virtual StatusCode initialize() override;
37 
39  // IFPGATrackSimRoadFinderTool
40 
41  StatusCode getRoads(const std::vector<std::shared_ptr<const FPGATrackSimHit>> &hits,
42  std::vector<std::shared_ptr<const FPGATrackSimRoad>> &roads,
43  std::vector<FPGATrackSimTruthTrack> const &truthtracks)
44  {
45  m_truthtracks = truthtracks;
46  return getRoads(hits, roads);
47  }
48 
49  StatusCode getRoads(const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits, std::vector<std::shared_ptr<const FPGATrackSimRoad>> & roads);
50 
51  std::vector<FPGATrackSimTruthTrack> const *getTruthTracks() { return &m_truthtracks; }
52 
54  // FPGATrackSimRoadUnionTool
55 
56  ToolHandleArray<IFPGATrackSimRoadFinderTool> const & tools() const { return m_tools; }
57  void setupSlices(FPGATrackSimLogicalEventInputHeader* slicedHitHeader) {m_slicedHitHeader = slicedHitHeader; }
58 
59  private:
60 
62  // Handles
63 
64  ServiceHandle<IFPGATrackSimMappingSvc> m_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"};
65 
66  ToolHandleArray<IFPGATrackSimRoadFinderTool> m_tools;
67 
68  // Internal storage for the sliced hits (implemented as a LogicalEventInputHeader,
69  // so we can easily copy to the output ROOT file).
71  std::vector<FPGATrackSimTruthTrack> m_truthtracks;
72 };
73 
74 #endif
FPGATrackSimRoadUnionTool::m_tools
ToolHandleArray< IFPGATrackSimRoadFinderTool > m_tools
Definition: FPGATrackSimHough/FPGATrackSimRoadUnionTool.h:66
FPGATrackSimRoadUnionTool::m_truthtracks
std::vector< FPGATrackSimTruthTrack > m_truthtracks
Definition: FPGATrackSimHough/FPGATrackSimRoadUnionTool.h:71
FPGATrackSimLogicalEventInputHeader
Definition: FPGATrackSimLogicalEventInputHeader.h:21
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimRoadUnionTool::m_slicedHitHeader
FPGATrackSimLogicalEventInputHeader * m_slicedHitHeader
Definition: FPGATrackSimHough/FPGATrackSimRoadUnionTool.h:70
IFPGATrackSimMappingSvc.h
FPGATrackSimRoadUnionTool::getTruthTracks
std::vector< FPGATrackSimTruthTrack > const * getTruthTracks()
Definition: FPGATrackSimHough/FPGATrackSimRoadUnionTool.h:51
FPGATrackSimRoadUnionTool::getRoads
StatusCode getRoads(const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads, std::vector< FPGATrackSimTruthTrack > const &truthtracks)
Definition: FPGATrackSimHough/FPGATrackSimRoadUnionTool.h:41
IFPGATrackSimRoadFinderTool.h
Interface declaration for road finder tools.
FPGATrackSimRoadUnionTool::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimHough/FPGATrackSimRoadUnionTool.h:64
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FPGATrackSimRoadUnionTool::FPGATrackSimRoadUnionTool
FPGATrackSimRoadUnionTool(const std::string &, const std::string &, const IInterface *)
Definition: FPGATrackSimRoadUnionTool.cxx:30
AthAlgTool.h
FPGATrackSimRoadUnionTool::initialize
virtual StatusCode initialize() override
Definition: FPGATrackSimRoadUnionTool.cxx:38
FPGATrackSimRoadUnionTool::tools
ToolHandleArray< IFPGATrackSimRoadFinderTool > const & tools() const
Definition: FPGATrackSimHough/FPGATrackSimRoadUnionTool.h:56
FPGATrackSimRoadUnionTool
Definition: FPGATrackSimHough/FPGATrackSimRoadUnionTool.h:28
FPGATrackSimRoadUnionTool::setupSlices
void setupSlices(FPGATrackSimLogicalEventInputHeader *slicedHitHeader)
Definition: FPGATrackSimHough/FPGATrackSimRoadUnionTool.h:57
AthAlgTool
Definition: AthAlgTool.h:26
FPGATrackSimLogicalEventInputHeader.h
ServiceHandle< IFPGATrackSimMappingSvc >