ATLAS Offline Software
Loading...
Searching...
No Matches
FPGAConversionAlgorithm Class Reference

#include <FPGAConversionAlgorithm.h>

Inheritance diagram for FPGAConversionAlgorithm:

Public Member Functions

 FPGAConversionAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters:
virtual ~FPGAConversionAlgorithm ()=default
 Destructor:
virtual StatusCode initialize () override
 Athena algorithm's Hooks.
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

template<typename T>
StatusCode convertCollectionToContainer (Trk::PrepRawDataCollection< T > *inputCollection, SG::WriteHandleKey< Trk::PrepRawDataContainer< Trk::PrepRawDataCollection< T > > > &outputContainerKey)
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

ToolHandle< IFPGAClusterConverterm_ClusterConverter {this, "ClusterConverter", "FPGAClusterConverter", "Converter Hits to InDetCluster"}
ToolHandle< IFPGAActsTrkConverterm_ActsTrkConverter {this, "ActsTrkConverter", "FPGAActsTrkConverter", "Make Acts Trks from converted clusters"}
SG::ReadHandleKey< FPGATrackSimClusterCollectionm_FPGAClusterKey {this, "FPGATrackSimClusterKey","FPGAClusters","FPGATrackSim Clusters key"}
SG::ReadHandleKey< FPGATrackSimClusterCollectionm_FPGASPKey {this, "FPGATrackSimSPKey","FPGASpacePoints_1st","FPGATrackSim Spacepoint key"}
SG::ReadHandleKey< FPGATrackSimHitCollectionm_FPGAHitKey {this, "FPGATrackSimHitKey","FPGAHits","FPGATrackSim Hits key"}
SG::ReadHandleKey< FPGATrackSimRoadCollectionm_FPGARoadKey {this, "FPGATrackSimRoadKey","FPGARoads","FPGATrackSim Roads key"}
SG::ReadHandleKey< FPGATrackSimTrackCollectionm_FPGATrackKey {this, "FPGATrackSimTrackKey","FPGATracks","FPGATrackSim Tracks key"}
SG::WriteHandleKey< xAOD::PixelClusterContainerm_xAODPixelClusterFromFPGAClusterKey {this, "xAODPixelClusterFromFPGAClusterKey","xAODPixelClustersFromFPGACluster","FPGA->xAOD PixelClusters Container"}
SG::WriteHandleKey< xAOD::StripClusterContainerm_xAODStripClusterFromFPGAClusterKey {this, "xAODStripClusterFromFPGAClusterKey","xAODStripClustersFromFPGACluster","FPGA->xAOD StripClusters Container"}
SG::WriteHandleKey< xAOD::SpacePointContainerm_xAODStripSpacePointFromFPGAKey {this, "xAODStripSpacePointFromFPGAKey","xAODStripSpacePointsFromFPGA","FPGA SP->xAOD Strip SpacePoint Container"}
SG::WriteHandleKey< xAOD::SpacePointContainerm_xAODPixelSpacePointFromFPGAKey {this, "xAODPixelSpacePointFromFPGAKey","xAODPixelSpacePointsFromFPGA","FPGA Cluster->xAOD Pixel SpacePoint Container"}
SG::WriteHandleKey< xAOD::PixelClusterContainerm_xAODPixelClusterFromFPGAHitKey {this, "xAODPixelClusterFromFPGAHitKey","xAODPixelClustersFromFPGAHit","FPGA->xAOD PixelClusters Container"}
SG::WriteHandleKey< xAOD::StripClusterContainerm_xAODStripClusterFromFPGAHitKey {this, "xAODStripClusterFromFPGAHitKey","xAODStripClustersFromFPGAHit","FPGA->xAOD StripClusters Container"}
SG::WriteHandleKey< ActsTrk::ProtoTrackCollectionm_ActsProtoTrackFromFPGARoadKey {this, "ActsProtoTrackFromFPGARoadKey","ActsProtoTracksFromFPGARoad","Vector of ActsTrk::ProtoTrack from FPGARoads"}
SG::WriteHandleKey< ActsTrk::ProtoTrackCollectionm_ActsProtoTrackFromFPGATrackKey {this, "ActsProtoTrackFromFPGATrackKey","ActsProtoTracksFromFPGATrack","Vector of ActsTrk::ProtoTrack from FPGATracks"}
SG::WriteHandleKey< InDet::PixelClusterContainer > m_outputPixelClusterContainerKey {this, "FPGAOutputPixelClustersName", "FPGAInDetPixelClusterContainer", "name of the output FPGA InDet pixel cluster container"}
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_outputStripClusterContainerKey {this, "FPGAOutputStripClustersName", "FPGAInDetStripsClusterContainer", "fname of the output FPGA InDet strip cluster container"}
Gaudi::Property< bool > m_doClusters {this, "doClusters", true, "Convert FPGATrackSimCluster"}
Gaudi::Property< bool > m_doHits {this, "doHits", false, "Convert FPGATrackSimHit"}
Gaudi::Property< bool > m_doActsTrk {this, "doActsTrk", false, "Run Acts ProtoTrack finding"}
Gaudi::Property< bool > m_doSP {this, "doSP", false, "Convert SPs"}
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"}
Gaudi::Property< bool > m_useRoads {this, "useRoads", false, "If set to truth it will generate prototracks based on FPGA roads instead of FPGA tracks"}

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ServiceHandle< IChronoStatSvc > m_chrono {this,"ChronoStatSvc","ChronoStatSvc"}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 29 of file FPGAConversionAlgorithm.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ FPGAConversionAlgorithm()

FPGAConversionAlgorithm::FPGAConversionAlgorithm ( const std::string & name,
ISvcLocator * pSvcLocator )

Constructor with parameters:

Definition at line 15 of file FPGAConversionAlgorithm.cxx.

15 :
16 AthReentrantAlgorithm( name, pSvcLocator ){}

◆ ~FPGAConversionAlgorithm()

virtual FPGAConversionAlgorithm::~FPGAConversionAlgorithm ( )
virtualdefault

Destructor:

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ convertCollectionToContainer()

template<typename T>
StatusCode FPGAConversionAlgorithm::convertCollectionToContainer ( Trk::PrepRawDataCollection< T > * inputCollection,
SG::WriteHandleKey< Trk::PrepRawDataContainer< Trk::PrepRawDataCollection< T > > > & outputContainerKey )
protected

Definition at line 199 of file FPGAConversionAlgorithm.cxx.

202{
203 if constexpr (!std::is_same<T, InDet::PixelCluster>::value && !std::is_same<T, InDet::SCT_Cluster>::value) {
204 static_assert(false, "Bad type <T>. Should be InDet::PixelCluster or InDet::SCT_Cluster");
205 return StatusCode::FAILURE;
206 }
207
208 std::unique_ptr<Trk::PrepRawDataContainer<Trk::PrepRawDataCollection<T>>> outputContainer = std::make_unique<Trk::PrepRawDataContainer<Trk::PrepRawDataCollection<T>>>(SG::VIEW_ELEMENTS);
209 SG::WriteHandle<Trk::PrepRawDataContainer<Trk::PrepRawDataCollection<T>>> outputContainerHandle(outputContainerKey);
210
211 if (!inputCollection || inputCollection->empty()){
212 outputContainerHandle.record(std::move(outputContainer));
213 return StatusCode::SUCCESS;
214 }
215
216 Trk::PrepRawDataCollection<T>* newCol = new Trk::PrepRawDataCollection<T>(inputCollection->identifyHash());
217 newCol->setIdentifier(inputCollection->identify());
218 for (const T* clus : *inputCollection) {
219 newCol->push_back(std::make_unique<T>(*clus));
220 ATH_MSG_DEBUG("NewCol cluster identifier " << clus->identify());
221 }
222
223 ATH_MSG_DEBUG("newCol->identifyHash() " << newCol->identifyHash());
224 ATH_CHECK(outputContainer->addCollection(newCol,newCol->identifyHash()));
225
226 if(outputContainerHandle.record(std::move(outputContainer)).isFailure()){
227 ATH_MSG_ERROR("Could not record InDetSCTClusterContainer object with "
228 << outputContainerHandle.key()
229 << " into Event Store");
230 return StatusCode::FAILURE;
231 }
232
233 return StatusCode::SUCCESS;
234}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
bool empty() const noexcept
Returns true if the collection is empty.
virtual Identifier identify() const override final
virtual IdentifierHash identifyHash() const override final
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode FPGAConversionAlgorithm::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 41 of file FPGAConversionAlgorithm.cxx.

41 {
42 std::unique_ptr<InDet::PixelClusterCollection> PixelCollFromHits = std::make_unique<InDet::PixelClusterCollection>();
43 std::unique_ptr<InDet::SCT_ClusterCollection> SCTCollFromHits = std::make_unique<InDet::SCT_ClusterCollection>();
44
45 std::unique_ptr<InDet::PixelClusterCollection> PixelCollFromClusters = std::make_unique<InDet::PixelClusterCollection>();
46 std::unique_ptr<InDet::SCT_ClusterCollection> SCTCollFromClusters = std::make_unique<InDet::SCT_ClusterCollection>();
47
48 std::unique_ptr<InDet::SCT_ClusterCollection> SCTCollFromSP = std::make_unique<InDet::SCT_ClusterCollection>();
49 std::unique_ptr<xAOD::PixelClusterContainer> PixelContFromHits = std::make_unique<xAOD::PixelClusterContainer>();
50 std::unique_ptr<xAOD::PixelClusterAuxContainer> PixelAuxContFromHits = std::make_unique<xAOD::PixelClusterAuxContainer>();
51 PixelContFromHits->setStore (PixelAuxContFromHits.get());
52
53 std::unique_ptr<xAOD::StripClusterContainer> SCTContFromHits = std::make_unique<xAOD::StripClusterContainer>();
54 std::unique_ptr<xAOD::StripClusterAuxContainer> SCTAuxContFromHits = std::make_unique<xAOD::StripClusterAuxContainer>();
55 SCTContFromHits->setStore(SCTAuxContFromHits.get() );
56
57 std::unique_ptr<xAOD::PixelClusterContainer> PixelContFromClusters = std::make_unique<xAOD::PixelClusterContainer>();
58 std::unique_ptr<xAOD::PixelClusterAuxContainer> PixelAuxContFromClusters = std::make_unique<xAOD::PixelClusterAuxContainer>();
59 PixelContFromClusters->setStore (PixelAuxContFromClusters.get());
60
61 std::unique_ptr<xAOD::StripClusterContainer> SCTContFromClusters = std::make_unique<xAOD::StripClusterContainer>();
62 std::unique_ptr<xAOD::StripClusterAuxContainer> SCTAuxContFromClusters = std::make_unique<xAOD::StripClusterAuxContainer>();
63 SCTContFromClusters->setStore(SCTAuxContFromClusters.get() );
64
65 std::unique_ptr<xAOD::SpacePointContainer> StripSPCont = std::make_unique<xAOD::SpacePointContainer>();
66 std::unique_ptr<xAOD::SpacePointAuxContainer> StripSPAuxCont = std::make_unique<xAOD::SpacePointAuxContainer>();
67 StripSPCont->setStore(StripSPAuxCont.get() );
68
69 std::unique_ptr<xAOD::SpacePointContainer> PixelSPCont = std::make_unique<xAOD::SpacePointContainer>();
70 std::unique_ptr<xAOD::SpacePointAuxContainer> PixelSPAuxCont = std::make_unique<xAOD::SpacePointAuxContainer>();
71 PixelSPCont->setStore(PixelSPAuxCont.get() );
72
73 std::unique_ptr<ActsTrk::ProtoTrackCollection> ProtoTracksFromRoads = std::make_unique<ActsTrk::ProtoTrackCollection>();
74 std::unique_ptr<ActsTrk::ProtoTrackCollection> ProtoTracksFromTracks = std::make_unique<ActsTrk::ProtoTrackCollection>();
75
76 if (m_doClusters) {
77
78 SG::ReadHandle<FPGATrackSimClusterCollection> FPGAClustersHandle (m_FPGAClusterKey, ctx);
79 if (FPGAClustersHandle.isValid()) { // To avoid running over events that didn't pass truth tracks selections
80 const FPGATrackSimClusterCollection *FPGAClusterColl = FPGAClustersHandle.cptr();
81
82 // Convert to InDet clusters
83 if (m_doIndet) {
84 ATH_MSG_DEBUG("InDet Clusters CONVERSION");
85 ATH_CHECK(m_ClusterConverter->convertClusters(*FPGAClusterColl, *PixelCollFromClusters, *SCTCollFromClusters));
86 }
87
88 // Convert to xAOD clusters
89 ATH_MSG_INFO("xAOD Clusters CONVERSION");
90 if constexpr (enableBenchmark) m_chrono->chronoStart("FPGAConversion: cluster conversion");
91 ATH_CHECK( m_ClusterConverter->convertClusters(*FPGAClusterColl, *PixelContFromClusters, *SCTContFromClusters) );
92 if constexpr (enableBenchmark) m_chrono->chronoStop("FPGAConversion: cluster conversion");
93
94 if (m_doActsTrk) {
95 if (m_useRoads) {
96 SG::ReadHandle<FPGATrackSimRoadCollection> FPGARoadsHandle(m_FPGARoadKey, ctx);
97 if (!FPGARoadsHandle.isValid()) {
98 ATH_MSG_FATAL("Failed to retrieve 1st stage FPGATrackSimRoadCollection");
99 return StatusCode::FAILURE;
100 }
101 const FPGATrackSimRoadCollection* FPGARoadColl = FPGARoadsHandle.cptr();
102 if constexpr (enableBenchmark) m_chrono->chronoStart("FPGAConversion: Prototrack formation (from roads)");
103 ATH_CHECK(m_ActsTrkConverter->findProtoTracks(ctx, *PixelContFromClusters, *SCTContFromClusters, *ProtoTracksFromRoads, *FPGARoadColl));
104 if constexpr (enableBenchmark) m_chrono->chronoStop("FPGAConversion: Prototrack formation (from roads)");
105 }
106 else{
107 SG::ReadHandle<FPGATrackSimTrackCollection> FPGATracksHandle(m_FPGATrackKey, ctx);
108 if (!FPGATracksHandle.isValid()) {
109 ATH_MSG_FATAL("Failed to retrieve 1st stage FPGATrackSimTrackCollection");
110 return StatusCode::FAILURE;
111 }
112 const FPGATrackSimTrackCollection* FPGATrackColl = FPGATracksHandle.cptr();
113
114 if constexpr (enableBenchmark) m_chrono->chronoStart("FPGAConversion: Prototrack formation (from tracks)");
115 ATH_CHECK(m_ActsTrkConverter->findProtoTracks(ctx, *PixelContFromClusters, *SCTContFromClusters, *ProtoTracksFromTracks, *FPGATrackColl));
116 if constexpr (enableBenchmark) m_chrono->chronoStop("FPGAConversion: Prototrack formation (from tracks)");
117 }
118 }
119
120 if (m_doSP) {
121 ATH_MSG_INFO("Starting xAOD SpacePoint Conversion");
122 SG::ReadHandle<FPGATrackSimClusterCollection> FPGASPHandle (m_FPGASPKey, ctx);
123
124 if (FPGASPHandle.isValid()) { // To avoid running over events that didn't pass truth tracks selections
125 const FPGATrackSimClusterCollection *FPGASPColl = FPGASPHandle.cptr();
126 ATH_CHECK( m_ClusterConverter->convertSpacePoints(*FPGASPColl, *StripSPCont, *PixelSPCont, *SCTContFromClusters, *PixelContFromClusters) );
127 }
128 else {{ATH_MSG_WARNING("Failed to retrieve 1st stage FPGATrackSimSpacePointCollection. Will skip SP conversion ");}}
129 }
130 }
131
132 else {ATH_MSG_WARNING("Failed to retrieve 1st stage FPGATrackSimClusterCollection. Will skip clusters and track conversion ");}
133 SG::WriteHandle<xAOD::PixelClusterContainer> xAODPixelClusterFromFPGAClusterHandle (m_xAODPixelClusterFromFPGAClusterKey, ctx);
134 SG::WriteHandle<xAOD::StripClusterContainer> xAODStripClusterFromFPGAClusterHandle (m_xAODStripClusterFromFPGAClusterKey, ctx);
135
136 ATH_CHECK( xAODPixelClusterFromFPGAClusterHandle.record (std::move(PixelContFromClusters), std::move(PixelAuxContFromClusters)));
137 ATH_CHECK( xAODStripClusterFromFPGAClusterHandle.record (std::move(SCTContFromClusters), std::move(SCTAuxContFromClusters)));
138 if(m_doActsTrk)
139 {
140 SG::WriteHandle<ActsTrk::ProtoTrackCollection> ActsProtoTrackFromFPGATrackHandle (m_ActsProtoTrackFromFPGATrackKey, ctx);
141 ATH_CHECK( ActsProtoTrackFromFPGATrackHandle.record (std::move(ProtoTracksFromTracks)));
142 if(m_useRoads) {
143 SG::WriteHandle<ActsTrk::ProtoTrackCollection> ActsProtoTrackFromFPGARoadHandle (m_ActsProtoTrackFromFPGARoadKey, ctx);
144 ATH_CHECK( ActsProtoTrackFromFPGARoadHandle.record (std::move(ProtoTracksFromRoads)));
145 }
146 }
147 if (m_doSP)
148 {
149 SG::WriteHandle<xAOD::SpacePointContainer> xAODStripSpacePointFromFPGAHandle (m_xAODStripSpacePointFromFPGAKey, ctx);
150 SG::WriteHandle<xAOD::SpacePointContainer> xAODPixelSpacePointFromFPGAHandle (m_xAODPixelSpacePointFromFPGAKey, ctx);
151 ATH_CHECK( xAODStripSpacePointFromFPGAHandle.record (std::move(StripSPCont), std::move(StripSPAuxCont)));
152 ATH_CHECK( xAODPixelSpacePointFromFPGAHandle.record (std::move(PixelSPCont), std::move(PixelSPAuxCont)));
153 }
154 }
155
156 if (m_doHits) {
157 SG::ReadHandle<FPGATrackSimHitCollection> FPGAHitsHandle (m_FPGAHitKey, ctx);
158
159 if (FPGAHitsHandle.isValid()) {
160 const FPGATrackSimHitCollection *FPGAHitColl = FPGAHitsHandle.cptr();
161
162 // Convert to InDet clusters
163 if (m_doIndet) {
164 ATH_MSG_DEBUG("InDet Hits CONVERSION");
165 ATH_CHECK(m_ClusterConverter->convertHits(*FPGAHitColl, *PixelCollFromHits, *SCTCollFromHits));
166 }
167 ATH_MSG_DEBUG("xAOD Hits CONVERSION");
168 ATH_CHECK( m_ClusterConverter->convertHits(*FPGAHitColl, *PixelContFromHits, *SCTContFromHits) );
169 }
170
171 else {ATH_MSG_WARNING("Failed to retrieve 1st stage FPGATrackSimHitCollection. Will skip hit conversion ");}
172
173
174 SG::WriteHandle<xAOD::PixelClusterContainer> xAODPixelClusterFromFPGAHitHandle (m_xAODPixelClusterFromFPGAHitKey, ctx);
175 SG::WriteHandle<xAOD::StripClusterContainer> xAODStripClusterFromFPGAHitHandle (m_xAODStripClusterFromFPGAHitKey, ctx);
176 ATH_CHECK( xAODPixelClusterFromFPGAHitHandle.record (std::move(PixelContFromHits),std::move(PixelAuxContFromHits)));
177 ATH_CHECK( xAODStripClusterFromFPGAHitHandle.record (std::move(SCTContFromHits),std::move(SCTAuxContFromHits)));
178
179 // Also do the tracks
180 if (m_doActsTrk && !m_useRoads) {
181 SG::ReadHandle<FPGATrackSimTrackCollection> FPGATracksHandle(m_FPGATrackKey, ctx);
182 if (!FPGATracksHandle.isValid()) {
183 ATH_MSG_FATAL("Failed to retrieve 1st stage FPGATrackSimTrackCollection");
184 return StatusCode::FAILURE;
185 }
186 const FPGATrackSimTrackCollection* FPGATrackColl = FPGATracksHandle.cptr();
187
188 if constexpr (enableBenchmark) m_chrono->chronoStart("FPGAConversion: Prototrack formation (from tracks)");
189 ATH_CHECK(m_ActsTrkConverter->findProtoTracks(ctx, *PixelContFromClusters, *SCTContFromClusters, *ProtoTracksFromTracks, *FPGATrackColl));
190 if constexpr (enableBenchmark) m_chrono->chronoStop("FPGAConversion: Prototrack formation (from tracks)");
191 }
192 }
193
194 return StatusCode::SUCCESS;
195 }
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
std::vector< FPGATrackSimCluster > FPGATrackSimClusterCollection
DataVector< FPGATrackSimHit > FPGATrackSimHitCollection
std::vector< FPGATrackSimRoad > FPGATrackSimRoadCollection
std::vector< FPGATrackSimTrack > FPGATrackSimTrackCollection
SG::WriteHandleKey< ActsTrk::ProtoTrackCollection > m_ActsProtoTrackFromFPGARoadKey
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< FPGATrackSimClusterCollection > m_FPGASPKey
SG::WriteHandleKey< xAOD::StripClusterContainer > m_xAODStripClusterFromFPGAHitKey
SG::WriteHandleKey< ActsTrk::ProtoTrackCollection > m_ActsProtoTrackFromFPGATrackKey
Gaudi::Property< bool > m_doIndet
SG::WriteHandleKey< xAOD::StripClusterContainer > m_xAODStripClusterFromFPGAClusterKey
Gaudi::Property< bool > m_doClusters
SG::WriteHandleKey< xAOD::SpacePointContainer > m_xAODPixelSpacePointFromFPGAKey
SG::ReadHandleKey< FPGATrackSimClusterCollection > m_FPGAClusterKey
Gaudi::Property< bool > m_doHits
Gaudi::Property< bool > m_useRoads
SG::ReadHandleKey< FPGATrackSimRoadCollection > m_FPGARoadKey
constexpr bool enableBenchmark

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode FPGAConversionAlgorithm::initialize ( )
overridevirtual

Athena algorithm's Hooks.

Definition at line 18 of file FPGAConversionAlgorithm.cxx.

18 {
19 ATH_CHECK(m_ClusterConverter.retrieve());
20
22 ATH_CHECK(m_FPGASPKey.initialize(m_doSP));
23 ATH_CHECK(m_FPGAHitKey.initialize(m_doHits));
36
37 ATH_CHECK(m_chrono.retrieve());
38 return StatusCode::SUCCESS;
39 }
SG::WriteHandleKey< InDet::PixelClusterContainer > m_outputPixelClusterContainerKey
SG::WriteHandleKey< InDet::SCT_ClusterContainer > m_outputStripClusterContainerKey

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_ActsProtoTrackFromFPGARoadKey

SG::WriteHandleKey<ActsTrk::ProtoTrackCollection> FPGAConversionAlgorithm::m_ActsProtoTrackFromFPGARoadKey {this, "ActsProtoTrackFromFPGARoadKey","ActsProtoTracksFromFPGARoad","Vector of ActsTrk::ProtoTrack from FPGARoads"}
protected

Definition at line 60 of file FPGAConversionAlgorithm.h.

60{this, "ActsProtoTrackFromFPGARoadKey","ActsProtoTracksFromFPGARoad","Vector of ActsTrk::ProtoTrack from FPGARoads"};

◆ m_ActsProtoTrackFromFPGATrackKey

SG::WriteHandleKey<ActsTrk::ProtoTrackCollection> FPGAConversionAlgorithm::m_ActsProtoTrackFromFPGATrackKey {this, "ActsProtoTrackFromFPGATrackKey","ActsProtoTracksFromFPGATrack","Vector of ActsTrk::ProtoTrack from FPGATracks"}
protected

Definition at line 61 of file FPGAConversionAlgorithm.h.

61{this, "ActsProtoTrackFromFPGATrackKey","ActsProtoTracksFromFPGATrack","Vector of ActsTrk::ProtoTrack from FPGATracks"};

◆ m_ActsTrkConverter

ToolHandle<IFPGAActsTrkConverter> FPGAConversionAlgorithm::m_ActsTrkConverter {this, "ActsTrkConverter", "FPGAActsTrkConverter", "Make Acts Trks from converted clusters"}
protected

Definition at line 46 of file FPGAConversionAlgorithm.h.

46{this, "ActsTrkConverter", "FPGAActsTrkConverter", "Make Acts Trks from converted clusters"};

◆ m_chrono

ServiceHandle<IChronoStatSvc> FPGAConversionAlgorithm::m_chrono {this,"ChronoStatSvc","ChronoStatSvc"}
private

Definition at line 79 of file FPGAConversionAlgorithm.h.

79{this,"ChronoStatSvc","ChronoStatSvc"};

◆ m_ClusterConverter

ToolHandle<IFPGAClusterConverter> FPGAConversionAlgorithm::m_ClusterConverter {this, "ClusterConverter", "FPGAClusterConverter", "Converter Hits to InDetCluster"}
protected

Definition at line 45 of file FPGAConversionAlgorithm.h.

45{this, "ClusterConverter", "FPGAClusterConverter", "Converter Hits to InDetCluster"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doActsTrk

Gaudi::Property<bool> FPGAConversionAlgorithm::m_doActsTrk {this, "doActsTrk", false, "Run Acts ProtoTrack finding"}
protected

Definition at line 71 of file FPGAConversionAlgorithm.h.

71{this, "doActsTrk", false, "Run Acts ProtoTrack finding"};

◆ m_doClusters

Gaudi::Property<bool> FPGAConversionAlgorithm::m_doClusters {this, "doClusters", true, "Convert FPGATrackSimCluster"}
protected

Definition at line 69 of file FPGAConversionAlgorithm.h.

69{this, "doClusters", true, "Convert FPGATrackSimCluster"};

◆ m_doHits

Gaudi::Property<bool> FPGAConversionAlgorithm::m_doHits {this, "doHits", false, "Convert FPGATrackSimHit"}
protected

Definition at line 70 of file FPGAConversionAlgorithm.h.

70{this, "doHits", false, "Convert FPGATrackSimHit"};

◆ m_doIndet

Gaudi::Property<bool> FPGAConversionAlgorithm::m_doIndet {this, "doInDet", false, "Perform also to InDet convertion. This is obsolete and not needed anymore. By default disabled to save execution time"}
protected

Definition at line 73 of file FPGAConversionAlgorithm.h.

73{this, "doInDet", false, "Perform also to InDet convertion. This is obsolete and not needed anymore. By default disabled to save execution time"};

◆ m_doSP

Gaudi::Property<bool> FPGAConversionAlgorithm::m_doSP {this, "doSP", false, "Convert SPs"}
protected

Definition at line 72 of file FPGAConversionAlgorithm.h.

72{this, "doSP", false, "Convert SPs"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_FPGAClusterKey

SG::ReadHandleKey<FPGATrackSimClusterCollection> FPGAConversionAlgorithm::m_FPGAClusterKey {this, "FPGATrackSimClusterKey","FPGAClusters","FPGATrackSim Clusters key"}
protected

Definition at line 48 of file FPGAConversionAlgorithm.h.

48{this, "FPGATrackSimClusterKey","FPGAClusters","FPGATrackSim Clusters key"};

◆ m_FPGAHitKey

SG::ReadHandleKey<FPGATrackSimHitCollection> FPGAConversionAlgorithm::m_FPGAHitKey {this, "FPGATrackSimHitKey","FPGAHits","FPGATrackSim Hits key"}
protected

Definition at line 50 of file FPGAConversionAlgorithm.h.

50{this, "FPGATrackSimHitKey","FPGAHits","FPGATrackSim Hits key"};

◆ m_FPGARoadKey

SG::ReadHandleKey<FPGATrackSimRoadCollection> FPGAConversionAlgorithm::m_FPGARoadKey {this, "FPGATrackSimRoadKey","FPGARoads","FPGATrackSim Roads key"}
protected

Definition at line 51 of file FPGAConversionAlgorithm.h.

51{this, "FPGATrackSimRoadKey","FPGARoads","FPGATrackSim Roads key"};

◆ m_FPGASPKey

SG::ReadHandleKey<FPGATrackSimClusterCollection> FPGAConversionAlgorithm::m_FPGASPKey {this, "FPGATrackSimSPKey","FPGASpacePoints_1st","FPGATrackSim Spacepoint key"}
protected

Definition at line 49 of file FPGAConversionAlgorithm.h.

49{this, "FPGATrackSimSPKey","FPGASpacePoints_1st","FPGATrackSim Spacepoint key"};

◆ m_FPGATrackKey

SG::ReadHandleKey<FPGATrackSimTrackCollection> FPGAConversionAlgorithm::m_FPGATrackKey {this, "FPGATrackSimTrackKey","FPGATracks","FPGATrackSim Tracks key"}
protected

Definition at line 52 of file FPGAConversionAlgorithm.h.

52{this, "FPGATrackSimTrackKey","FPGATracks","FPGATrackSim Tracks key"};

◆ m_outputPixelClusterContainerKey

SG::WriteHandleKey<InDet::PixelClusterContainer> FPGAConversionAlgorithm::m_outputPixelClusterContainerKey {this, "FPGAOutputPixelClustersName", "FPGAInDetPixelClusterContainer", "name of the output FPGA InDet pixel cluster container"}
protected

Definition at line 66 of file FPGAConversionAlgorithm.h.

66{this, "FPGAOutputPixelClustersName", "FPGAInDetPixelClusterContainer", "name of the output FPGA InDet pixel cluster container"};

◆ m_outputStripClusterContainerKey

SG::WriteHandleKey<InDet::SCT_ClusterContainer> FPGAConversionAlgorithm::m_outputStripClusterContainerKey {this, "FPGAOutputStripClustersName", "FPGAInDetStripsClusterContainer", "fname of the output FPGA InDet strip cluster container"}
protected

Definition at line 67 of file FPGAConversionAlgorithm.h.

67{this, "FPGAOutputStripClustersName", "FPGAInDetStripsClusterContainer", "fname of the output FPGA InDet strip cluster container"};

◆ m_useRoads

Gaudi::Property<bool> FPGAConversionAlgorithm::m_useRoads {this, "useRoads", false, "If set to truth it will generate prototracks based on FPGA roads instead of FPGA tracks"}
protected

Definition at line 74 of file FPGAConversionAlgorithm.h.

74{this, "useRoads", false, "If set to truth it will generate prototracks based on FPGA roads instead of FPGA tracks"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xAODPixelClusterFromFPGAClusterKey

SG::WriteHandleKey<xAOD::PixelClusterContainer> FPGAConversionAlgorithm::m_xAODPixelClusterFromFPGAClusterKey {this, "xAODPixelClusterFromFPGAClusterKey","xAODPixelClustersFromFPGACluster","FPGA->xAOD PixelClusters Container"}
protected

Definition at line 54 of file FPGAConversionAlgorithm.h.

54{this, "xAODPixelClusterFromFPGAClusterKey","xAODPixelClustersFromFPGACluster","FPGA->xAOD PixelClusters Container"};

◆ m_xAODPixelClusterFromFPGAHitKey

SG::WriteHandleKey<xAOD::PixelClusterContainer> FPGAConversionAlgorithm::m_xAODPixelClusterFromFPGAHitKey {this, "xAODPixelClusterFromFPGAHitKey","xAODPixelClustersFromFPGAHit","FPGA->xAOD PixelClusters Container"}
protected

Definition at line 58 of file FPGAConversionAlgorithm.h.

58{this, "xAODPixelClusterFromFPGAHitKey","xAODPixelClustersFromFPGAHit","FPGA->xAOD PixelClusters Container"};

◆ m_xAODPixelSpacePointFromFPGAKey

SG::WriteHandleKey<xAOD::SpacePointContainer> FPGAConversionAlgorithm::m_xAODPixelSpacePointFromFPGAKey {this, "xAODPixelSpacePointFromFPGAKey","xAODPixelSpacePointsFromFPGA","FPGA Cluster->xAOD Pixel SpacePoint Container"}
protected

Definition at line 57 of file FPGAConversionAlgorithm.h.

57{this, "xAODPixelSpacePointFromFPGAKey","xAODPixelSpacePointsFromFPGA","FPGA Cluster->xAOD Pixel SpacePoint Container"};

◆ m_xAODStripClusterFromFPGAClusterKey

SG::WriteHandleKey<xAOD::StripClusterContainer> FPGAConversionAlgorithm::m_xAODStripClusterFromFPGAClusterKey {this, "xAODStripClusterFromFPGAClusterKey","xAODStripClustersFromFPGACluster","FPGA->xAOD StripClusters Container"}
protected

Definition at line 55 of file FPGAConversionAlgorithm.h.

55{this, "xAODStripClusterFromFPGAClusterKey","xAODStripClustersFromFPGACluster","FPGA->xAOD StripClusters Container"};

◆ m_xAODStripClusterFromFPGAHitKey

SG::WriteHandleKey<xAOD::StripClusterContainer> FPGAConversionAlgorithm::m_xAODStripClusterFromFPGAHitKey {this, "xAODStripClusterFromFPGAHitKey","xAODStripClustersFromFPGAHit","FPGA->xAOD StripClusters Container"}
protected

Definition at line 59 of file FPGAConversionAlgorithm.h.

59{this, "xAODStripClusterFromFPGAHitKey","xAODStripClustersFromFPGAHit","FPGA->xAOD StripClusters Container"};

◆ m_xAODStripSpacePointFromFPGAKey

SG::WriteHandleKey<xAOD::SpacePointContainer> FPGAConversionAlgorithm::m_xAODStripSpacePointFromFPGAKey {this, "xAODStripSpacePointFromFPGAKey","xAODStripSpacePointsFromFPGA","FPGA SP->xAOD Strip SpacePoint Container"}
protected

Definition at line 56 of file FPGAConversionAlgorithm.h.

56{this, "xAODStripSpacePointFromFPGAKey","xAODStripSpacePointsFromFPGA","FPGA SP->xAOD Strip SpacePoint Container"};

The documentation for this class was generated from the following files: