ATLAS Offline Software
FPGATrackSimReportingAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef FPGATRACKSIMREPORTING_FPGATRACKSIMREPORTINGALG
6 #define FPGATRACKSIMREPORTING_FPGATRACKSIMREPORTINGALG
7 
8 
15 #include "StoreGate/StoreGateSvc.h"
16 
22 
24 
25 class FPGATrackSimTrack;
26 
27 namespace FPGATrackSim {
29  public:
30  FPGATrackSimReportingAlg(const std::string& name, ISvcLocator* pSvcLocator);
31  virtual ~FPGATrackSimReportingAlg() = default;
32 
33  virtual StatusCode initialize() override final; //once, before any input is loaded
34  virtual StatusCode execute(const EventContext& ctx) const override final;
35  virtual StatusCode finalize() override final;
36 
37  private:
38  mutable std::vector<uint32_t> m_pixelClustersPerFPGATrack ATLAS_THREAD_SAFE, m_stripClustersPerFPGATrack ATLAS_THREAD_SAFE;
39  mutable std::vector<uint32_t> m_pixelClustersPerPrototrack ATLAS_THREAD_SAFE, m_stripClustersPerPrototrack ATLAS_THREAD_SAFE;
40 
41  mutable std::map<std::string, std::vector<FPGATrackSimActsEventTracks> > m_allActsTracks ATLAS_THREAD_SAFE;
42  mutable std::map<std::string, std::map<uint32_t,std::vector<uint32_t>> > m_actsTrackStats ATLAS_THREAD_SAFE;
43 
44  Gaudi::Property<bool> m_printoutForEveryEvent {this, "perEventReports", false, "A flag to enable per event printout"};
45  Gaudi::Property<bool> m_isDataPrep {this, "isDataPrep", false, "If True, this is for data prep pipeline only"};
46  //_________________________________________________________________________________________________________________________
47  // xAOD Pixel clusters to monitor
49  this, "xAODPixelClusterContainers", {},
50  "input list of xAOD Pixel Cluster Containers, as resulted from FPGATrackSim (hit/road) EDM conversion" };
51 
52  // xAOD Strip clusters to monitor
54  this, "xAODStripClusterContainers", {"ITkStripClusters" ,"xAODStripClusters_1stFromFPGACluster", "xAODStripClusters_1stFromFPGAHit"},
55  "input list of xAOD Strip Cluster Containers, as resulted from FPGATrackSim (hit/road) EDM conversion" };
56 
57  // xAOD SpacePoints to monitor
59  this, "xAODSpacePointContainersFromFPGA", {"xAODStripSpacePoints_1stFromFPGA","xAODPixelSpacePoints_1stFromFPGA"},
60  "input list of xAOD SpacePoint Containers, as resulted from FPGATrackSim (hit/road) EDM conversion" };
61  // FPGA Cluster collection
62  // To be implemented
63 
64  // FPGA Road collection
65  SG::ReadHandleKey <FPGATrackSimRoadCollection> m_FPGARoadsKey{ this, "FPGATrackSimRoads","","FPGATrackSim Roads key" };
66  // FPGA Track collection
67  SG::ReadHandleKey <FPGATrackSimTrackCollection> m_FPGATracksKey{ this, "FPGATrackSimTracks","","FPGATrackSim Tracks key" };
68 
69  SG::ReadHandleKeyArray<ActsTrk::ProtoTrackCollection> m_FPGAProtoTrackCollections{this, "FPGATrackSimProtoTracks",{},"FPGATrackSim PrototrackCollection"};
70 
71  SG::ReadHandleKeyArray<ActsTrk::TrackContainer> m_ActsTrackCollections{this, "FPGAActsTracks",{},"Acts track collections from (C)KF"};
72 
73  //_________________________________________________________________________________________________________________________
74  // Tools
75  ToolHandle<FPGATrackSim::ActsTrackInspectionTool> m_ActsInspectionTool {this, "ActsInspectionTool", "FPGATrackSim::ActsTrackInspectionTool/ActsTrackInspectionTool", "Monitoring tool for acts tracks"};
76 
77  //_________________________________________________________________________________________________________________________
78  template <class XAOD_CLUSTER>
79  void processxAODClusters(SG::ReadHandle<DataVector< XAOD_CLUSTER >>& clusterContainer) const;
80  template <class XAOD_CLUSTER>
81  void printxAODClusters(SG::ReadHandle<DataVector< XAOD_CLUSTER >>& clusterContainer) const;
82 
85 
88 
91 
94 
97 
99 
101  };
102 
103 }
104 
105 #endif //> !FPGATRACKSIMREPORTING_FPGATRACKSIMREPORTINGALG
ReadHandleKeyArray.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
FPGATrackSim::FPGATrackSimReportingAlg::processxAODClusters
void processxAODClusters(SG::ReadHandle< DataVector< XAOD_CLUSTER >> &clusterContainer) const
Definition: FPGATrackSimReportingAlg.cxx:188
FPGATrackSim::FPGATrackSimReportingAlg::m_xAODPixelClusterContainerKeys
SG::ReadHandleKeyArray< xAOD::PixelClusterContainer > m_xAODPixelClusterContainerKeys
Definition: FPGATrackSimReportingAlg.h:48
FPGATrackSim::FPGATrackSimReportingAlg::processActsTracks
void processActsTracks(SG::ReadHandle< ActsTrk::TrackContainer > &ActsTracks) const
FPGATrackSim::FPGATrackSimReportingAlg::printxAODSpacePoints
void printxAODSpacePoints(SG::ReadHandle< DataVector< xAOD::SpacePoint >> &spContainer) const
Definition: FPGATrackSimReportingAlg.cxx:223
FPGATrackSim::FPGATrackSimReportingAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition: FPGATrackSimReportingAlg.cxx:25
FPGATrackSimTrack
Definition: FPGATrackSimTrack.h:18
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
FPGATrackSim::FPGATrackSimReportingAlg::m_xAODSpacePointContainerKeys
SG::ReadHandleKeyArray< xAOD::SpacePointContainer > m_xAODSpacePointContainerKeys
Definition: FPGATrackSimReportingAlg.h:58
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
FPGATrackSim::FPGATrackSimReportingAlg::m_FPGAProtoTrackCollections
SG::ReadHandleKeyArray< ActsTrk::ProtoTrackCollection > m_FPGAProtoTrackCollections
Definition: FPGATrackSimReportingAlg.h:69
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey< FPGATrackSimRoadCollection >
Property
Support class for PropertyMgr.
Definition: Property.h:23
FPGATrackSimRoadCollection.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
FPGATrackSim::FPGATrackSimReportingAlg::printFPGATracks
void printFPGATracks(SG::ReadHandle< FPGATrackSimTrackCollection > &FPGATracks) const
Definition: FPGATrackSimReportingAlg.cxx:325
FPGATrackSimActsTrackInspectionTool.h
FPGATrackSim::FPGATrackSimReportingAlg::m_printoutForEveryEvent
Gaudi::Property< bool > m_printoutForEveryEvent
Definition: FPGATrackSimReportingAlg.h:44
FPGATrackSim::FPGATrackSimReportingAlg::printFPGAPrototracks
void printFPGAPrototracks(SG::ReadHandle< ActsTrk::ProtoTrackCollection > &FPGAPrototracks) const
Definition: FPGATrackSimReportingAlg.cxx:400
FPGATrackSimTrackCollection.h
FPGATrackSimClusterCollection.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
FPGATrackSim::FPGATrackSimReportingAlg::initialize
virtual StatusCode initialize() override final
Definition: FPGATrackSimReportingAlg.cxx:11
PixelClusterContainer.h
FPGATrackSim::FPGATrackSimReportingAlg::m_FPGATracksKey
SG::ReadHandleKey< FPGATrackSimTrackCollection > m_FPGATracksKey
Definition: FPGATrackSimReportingAlg.h:67
FPGATrackSim
Definition: FPGATrackSimPrototrackFitterAlg.h:19
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ProtoTrackCollection.h
AthReentrantAlgorithm.h
FPGATrackSim::FPGATrackSimReportingAlg::m_ActsInspectionTool
ToolHandle< FPGATrackSim::ActsTrackInspectionTool > m_ActsInspectionTool
Definition: FPGATrackSimReportingAlg.h:75
FPGATrackSim::FPGATrackSimReportingAlg::summaryReportForEDMConversion
StatusCode summaryReportForEDMConversion()
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
FPGATrackSim::FPGATrackSimReportingAlg::printFPGARoads
void printFPGARoads(SG::ReadHandle< FPGATrackSimRoadCollection > &FPGARoads) const
Definition: FPGATrackSimReportingAlg.cxx:252
FPGATrackSim::FPGATrackSimReportingAlg::printFPGAClusters
void printFPGAClusters(SG::ReadHandle< FPGATrackSimClusterCollection > &FPGAClusters) const
FPGATrackSim::FPGATrackSimReportingAlg::m_FPGARoadsKey
SG::ReadHandleKey< FPGATrackSimRoadCollection > m_FPGARoadsKey
Definition: FPGATrackSimReportingAlg.h:65
FPGATrackSim::FPGATrackSimReportingAlg::m_isDataPrep
Gaudi::Property< bool > m_isDataPrep
Definition: FPGATrackSimReportingAlg.h:45
FPGATrackSim::FPGATrackSimReportingAlg::processFPGARoads
void processFPGARoads(SG::ReadHandle< FPGATrackSimRoadCollection > &FPGARoads) const
Definition: FPGATrackSimReportingAlg.cxx:247
FPGATrackSim::FPGATrackSimReportingAlg::ATLAS_THREAD_SAFE
std::vector< uint32_t > m_pixelClustersPerFPGATrack ATLAS_THREAD_SAFE
Definition: FPGATrackSimReportingAlg.h:38
FPGATrackSim::FPGATrackSimReportingAlg::processFPGATracks
void processFPGATracks(SG::ReadHandle< FPGATrackSimTrackCollection > &FPGATracks) const
Definition: FPGATrackSimReportingAlg.cxx:308
SpacePointContainer.h
StripClusterContainer.h
FPGATrackSim::FPGATrackSimReportingAlg::processFPGAClusters
void processFPGAClusters(SG::ReadHandle< FPGATrackSimClusterCollection > &FPGAClusters) const
FPGATrackSim::FPGATrackSimReportingAlg::finalize
virtual StatusCode finalize() override final
Definition: FPGATrackSimReportingAlg.cxx:124
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
FPGATrackSim::FPGATrackSimReportingAlg::m_xAODStripClusterContainerKeys
SG::ReadHandleKeyArray< xAOD::StripClusterContainer > m_xAODStripClusterContainerKeys
Definition: FPGATrackSimReportingAlg.h:53
FPGATrackSim::FPGATrackSimReportingAlg::processxAODSpacePoints
void processxAODSpacePoints(SG::ReadHandle< DataVector< xAOD::SpacePoint >> &spContainer) const
Definition: FPGATrackSimReportingAlg.cxx:218
FPGATrackSim::FPGATrackSimReportingAlg::processFPGAPrototracks
void processFPGAPrototracks(SG::ReadHandle< ActsTrk::ProtoTrackCollection > &FPGAPrototracks) const
Definition: FPGATrackSimReportingAlg.cxx:380
FPGATrackSim::FPGATrackSimReportingAlg::FPGATrackSimReportingAlg
FPGATrackSimReportingAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: FPGATrackSimReportingAlg.cxx:8
FPGATrackSim::FPGATrackSimReportingAlg::m_ActsTrackCollections
SG::ReadHandleKeyArray< ActsTrk::TrackContainer > m_ActsTrackCollections
Definition: FPGATrackSimReportingAlg.h:71
StoreGateSvc.h
TrackContainer.h
FPGATrackSimActsEventTracks
FPGATrackSim::ActsTrackInspectionTool::fpgaActsEventTracks FPGATrackSimActsEventTracks
Definition: FPGATrackSimActsTrackInspectionTool.h:57
FPGATrackSim::FPGATrackSimReportingAlg
Definition: FPGATrackSimReportingAlg.h:28
FPGATrackSim::FPGATrackSimReportingAlg::~FPGATrackSimReportingAlg
virtual ~FPGATrackSimReportingAlg()=default
FPGATrackSim::FPGATrackSimReportingAlg::printxAODClusters
void printxAODClusters(SG::ReadHandle< DataVector< XAOD_CLUSTER >> &clusterContainer) const
Definition: FPGATrackSimReportingAlg.cxx:194