ATLAS Offline Software
Loading...
Searching...
No Matches
FPGAConversionAlgorithm.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef FPGATrkConverter_CONVERSIONALGORITHM_H
6#define FPGATrkConverter_CONVERSIONALGORITHM_H
7
10
12#include "GaudiKernel/ToolHandle.h"
14
17
21
24
28
30
31public:
32 using AthReentrantAlgorithm::AthReentrantAlgorithm;
34 FPGAConversionAlgorithm(const std::string& name, ISvcLocator* pSvcLocator);
35
37 virtual ~FPGAConversionAlgorithm() = default;
38
40 virtual StatusCode initialize() override;
41 virtual StatusCode execute(const EventContext& ctx) const override;
42
43protected: // was private
44
45 ToolHandle<IFPGAClusterConverter> m_ClusterConverter{this, "ClusterConverter", "FPGAClusterConverter", "Converter Hits to InDetCluster"};
46 ToolHandle<IFPGAActsTrkConverter> m_ActsTrkConverter{this, "ActsTrkConverter", "FPGAActsTrkConverter", "Make Acts Trks from converted clusters"};
47
48 SG::ReadHandleKey<FPGATrackSimClusterCollection> m_FPGAClusterKey{this, "FPGATrackSimClusterKey","FPGAClusters","FPGATrackSim Clusters key"};
49 SG::ReadHandleKey<FPGATrackSimClusterCollection> m_FPGASPKey{this, "FPGATrackSimSPKey","FPGASpacePoints_1st","FPGATrackSim Spacepoint key"};
50 SG::ReadHandleKey<FPGATrackSimHitCollection> m_FPGAHitKey{this, "FPGATrackSimHitKey","FPGAHits","FPGATrackSim Hits key"};
51 SG::ReadHandleKey<FPGATrackSimRoadCollection> m_FPGARoadKey{this, "FPGATrackSimRoadKey","FPGARoads","FPGATrackSim Roads key"};
52 SG::ReadHandleKey<FPGATrackSimTrackCollection> m_FPGATrackKey{this, "FPGATrackSimTrackKey","FPGATracks","FPGATrackSim Tracks key"};
53 SG::ReadHandleKey<FPGATrackSimHitContainer> m_FPGAHitInRoadsKey{this, "FPGATrackSimHitInRoadsKey","FPGAHitInRoads","FPGATrackSim Hit in Roads key"};
54
55 SG::WriteHandleKey<xAOD::PixelClusterContainer> m_xAODPixelClusterFromFPGAClusterKey{this, "xAODPixelClusterFromFPGAClusterKey","xAODPixelClustersFromFPGACluster","FPGA->xAOD PixelClusters Container"};
56 SG::WriteHandleKey<xAOD::StripClusterContainer> m_xAODStripClusterFromFPGAClusterKey{this, "xAODStripClusterFromFPGAClusterKey","xAODStripClustersFromFPGACluster","FPGA->xAOD StripClusters Container"};
57 SG::WriteHandleKey<xAOD::SpacePointContainer> m_xAODStripSpacePointFromFPGAKey{this, "xAODStripSpacePointFromFPGAKey","xAODStripSpacePointsFromFPGA","FPGA SP->xAOD Strip SpacePoint Container"};
58 SG::WriteHandleKey<xAOD::SpacePointContainer> m_xAODPixelSpacePointFromFPGAKey{this, "xAODPixelSpacePointFromFPGAKey","xAODPixelSpacePointsFromFPGA","FPGA Cluster->xAOD Pixel SpacePoint Container"};
59 SG::WriteHandleKey<xAOD::PixelClusterContainer> m_xAODPixelClusterFromFPGAHitKey{this, "xAODPixelClusterFromFPGAHitKey","xAODPixelClustersFromFPGAHit","FPGA->xAOD PixelClusters Container"};
60 SG::WriteHandleKey<xAOD::StripClusterContainer> m_xAODStripClusterFromFPGAHitKey{this, "xAODStripClusterFromFPGAHitKey","xAODStripClustersFromFPGAHit","FPGA->xAOD StripClusters Container"};
61 SG::WriteHandleKey<ActsTrk::ProtoTrackCollection> m_ActsProtoTrackFromFPGARoadKey{this, "ActsProtoTrackFromFPGARoadKey","ActsProtoTracksFromFPGARoad","Vector of ActsTrk::ProtoTrack from FPGARoads"};
62 SG::WriteHandleKey<ActsTrk::ProtoTrackCollection> m_ActsProtoTrackFromFPGATrackKey{this, "ActsProtoTrackFromFPGATrackKey","ActsProtoTracksFromFPGATrack","Vector of ActsTrk::ProtoTrack from FPGATracks"};
63
64 template <typename T>
66
67 SG::WriteHandleKey<InDet::PixelClusterContainer> m_outputPixelClusterContainerKey {this, "FPGAOutputPixelClustersName", "FPGAInDetPixelClusterContainer", "name of the output FPGA InDet pixel cluster container"};
68 SG::WriteHandleKey<InDet::SCT_ClusterContainer> m_outputStripClusterContainerKey {this, "FPGAOutputStripClustersName", "FPGAInDetStripsClusterContainer", "fname of the output FPGA InDet strip cluster container"};
69
70 Gaudi::Property<bool> m_doClusters {this, "doClusters", true, "Convert FPGATrackSimCluster"};
71 Gaudi::Property<bool> m_doHits {this, "doHits", false, "Convert FPGATrackSimHit"};
72 Gaudi::Property<bool> m_doActsTrk {this, "doActsTrk", false, "Run Acts ProtoTrack finding"};
73 Gaudi::Property<bool> m_doSP {this, "doSP", false, "Convert SPs"};
74 Gaudi::Property<bool> m_doIndet {this, "doInDet", false, "Perform also to InDet convertion. This is obsolete and not needed anymore. By default disabled to save execution time"};
75 Gaudi::Property<bool> m_useRoads {this, "useRoads", false, "If set to truth it will generate prototracks based on FPGA roads instead of FPGA tracks"};
76
77 private:
78
79 // chrono service
80 ServiceHandle<IChronoStatSvc> m_chrono{this,"ChronoStatSvc","ChronoStatSvc"};
81};
82
83
84
85#endif
86
Property holding a SG store/key/clid from which a ReadHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteHandleKey< ActsTrk::ProtoTrackCollection > m_ActsProtoTrackFromFPGARoadKey
FPGAConversionAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
SG::WriteHandleKey< xAOD::PixelClusterContainer > m_xAODPixelClusterFromFPGAHitKey
SG::WriteHandleKey< xAOD::SpacePointContainer > m_xAODStripSpacePointFromFPGAKey
ServiceHandle< IChronoStatSvc > m_chrono
SG::WriteHandleKey< xAOD::PixelClusterContainer > m_xAODPixelClusterFromFPGAClusterKey
ToolHandle< IFPGAActsTrkConverter > m_ActsTrkConverter
ToolHandle< IFPGAClusterConverter > m_ClusterConverter
SG::ReadHandleKey< FPGATrackSimTrackCollection > m_FPGATrackKey
SG::ReadHandleKey< FPGATrackSimHitCollection > m_FPGAHitKey
Gaudi::Property< bool > m_doSP
Gaudi::Property< bool > m_doActsTrk
SG::ReadHandleKey< FPGATrackSimHitContainer > m_FPGAHitInRoadsKey
virtual StatusCode execute(const EventContext &ctx) const override
SG::ReadHandleKey< FPGATrackSimClusterCollection > m_FPGASPKey
SG::WriteHandleKey< xAOD::StripClusterContainer > m_xAODStripClusterFromFPGAHitKey
SG::WriteHandleKey< InDet::PixelClusterContainer > m_outputPixelClusterContainerKey
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_outputStripClusterContainerKey
SG::WriteHandleKey< ActsTrk::ProtoTrackCollection > m_ActsProtoTrackFromFPGATrackKey
Gaudi::Property< bool > m_doIndet
SG::WriteHandleKey< xAOD::StripClusterContainer > m_xAODStripClusterFromFPGAClusterKey
StatusCode convertCollectionToContainer(Trk::PrepRawDataCollection< T > *inputCollection, SG::WriteHandleKey< Trk::PrepRawDataContainer< Trk::PrepRawDataCollection< T > > > &outputContainerKey)
Gaudi::Property< bool > m_doClusters
virtual ~FPGAConversionAlgorithm()=default
Destructor:
SG::WriteHandleKey< xAOD::SpacePointContainer > m_xAODPixelSpacePointFromFPGAKey
virtual StatusCode initialize() override
Athena algorithm's Hooks.
SG::ReadHandleKey< FPGATrackSimClusterCollection > m_FPGAClusterKey
Gaudi::Property< bool > m_doHits
Gaudi::Property< bool > m_useRoads
SG::ReadHandleKey< FPGATrackSimRoadCollection > m_FPGARoadKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.