ATLAS Offline Software
Loading...
Searching...
No Matches
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
15
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; }
58 m_slicedHitHeader = slicedHitHeader;
59 }
60
62 // Properties
63 Gaudi::Property<bool> m_noHitFilter{this, "noHitFilter", {false}, "Disable filtering of hits"};
64
65
66 private:
67
69 // Handles
70
71 ServiceHandle<IFPGATrackSimMappingSvc> m_FPGATrackSimMapping {this, "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"};
72
73 ToolHandleArray<IFPGATrackSimRoadFinderTool> m_tools;
74
75 // Internal storage for the sliced hits (implemented as a LogicalEventInputHeader,
76 // so we can easily copy to the output ROOT file).
78 std::vector<FPGATrackSimTruthTrack> m_truthtracks;
79};
80
81#endif
Interface declaration for road finder tools.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
FPGATrackSimRoadUnionTool(const std::string &, const std::string &, const IInterface *)
FPGATrackSimLogicalEventInputHeader * m_slicedHitHeader
ToolHandleArray< IFPGATrackSimRoadFinderTool > const & tools() const
virtual StatusCode initialize() override
std::vector< FPGATrackSimTruthTrack > m_truthtracks
ToolHandleArray< IFPGATrackSimRoadFinderTool > m_tools
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
std::vector< FPGATrackSimTruthTrack > const * getTruthTracks()
StatusCode getRoads(const std::vector< std::shared_ptr< const FPGATrackSimHit > > &hits, std::vector< std::shared_ptr< const FPGATrackSimRoad > > &roads, std::vector< FPGATrackSimTruthTrack > const &truthtracks)
Gaudi::Property< bool > m_noHitFilter
void setupSlices(FPGATrackSimLogicalEventInputHeader *slicedHitHeader)