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 
24 
26 
27 class FPGATrackSimTrack;
28 
29 namespace FPGATrackSim {
31  public:
32  FPGATrackSimReportingAlg(const std::string& name, ISvcLocator* pSvcLocator);
33  virtual ~FPGATrackSimReportingAlg() = default;
34 
35  virtual StatusCode initialize() override final; //once, before any input is loaded
36  virtual StatusCode execute(const EventContext& ctx) const override final;
37  virtual StatusCode finalize() override final;
38 
39  private:
40  mutable std::vector<uint32_t> m_pixelClustersPerFPGATrack ATLAS_THREAD_SAFE, m_stripClustersPerFPGATrack ATLAS_THREAD_SAFE;
41  mutable std::vector<uint32_t> m_pixelClustersPerPrototrack ATLAS_THREAD_SAFE, m_stripClustersPerPrototrack ATLAS_THREAD_SAFE;
42 
43  mutable std::map<std::string, std::vector<FPGATrackSimActsEventTracks> > m_allActsTracks ATLAS_THREAD_SAFE;
44  mutable std::map<std::string, std::map<uint32_t,std::vector<uint32_t>> > m_actsTrackStats ATLAS_THREAD_SAFE;
45 
46  Gaudi::Property<bool> m_printoutForEveryEvent {this, "perEventReports", false, "A flag to enable per event printout"};
47  Gaudi::Property<bool> m_isDataPrep {this, "isDataPrep", false, "If True, this is for data prep pipeline only"};
48  //_________________________________________________________________________________________________________________________
49  // xAOD Pixel clusters to monitor
51  this, "xAODPixelClusterContainers", {},
52  "input list of xAOD Pixel Cluster Containers, as resulted from FPGATrackSim (hit/road) EDM conversion" };
53 
54  // xAOD Strip clusters to monitor
56  this, "xAODStripClusterContainers", {"ITkStripClusters" ,"xAODStripClusters_1stFromFPGACluster", "xAODStripClusters_1stFromFPGAHit"},
57  "input list of xAOD Strip Cluster Containers, as resulted from FPGATrackSim (hit/road) EDM conversion" };
58 
59  // xAOD SpacePoints to monitor
61  this, "xAODSpacePointContainersFromFPGA", {"xAODStripSpacePoints_1stFromFPGA","xAODPixelSpacePoints_1stFromFPGA"},
62  "input list of xAOD SpacePoint Containers, as resulted from FPGATrackSim (hit/road) EDM conversion" };
63  // FPGA Cluster collection
64  // To be implemented
65 
66  // FPGA Road collection
67  SG::ReadHandleKey <FPGATrackSimRoadCollection> m_FPGARoadsKey{ this, "FPGATrackSimRoads","","FPGATrackSim Roads key" };
68  // FPGA Track collection
69  SG::ReadHandleKey <FPGATrackSimTrackCollection> m_FPGATracksKey{ this, "FPGATrackSimTracks","","FPGATrackSim Tracks key" };
70 
71  SG::ReadHandleKeyArray<ActsTrk::ProtoTrackCollection> m_FPGAProtoTrackCollections{this, "FPGATrackSimProtoTracks",{},"FPGATrackSim PrototrackCollection"};
72 
73  SG::ReadHandleKeyArray<ActsTrk::TrackContainer> m_ActsTrackCollections{this, "FPGAActsTracks",{},"Acts track collections from (C)KF"};
74 
75  SG::ReadHandleKeyArray<ActsTrk::SeedContainer> m_ActsSeedCollections{this, "FPGAActsSeeds",{},"Acts Seeds collections from (C)KF"};
76 
77  SG::ReadHandleKeyArray<ActsTrk::BoundTrackParametersContainer> m_ActsSeedParamCollections{this, "FPGAActsSeedsParam",{},"Acts Seeds param collections from (C)KF"};
78 
79 
80  //_________________________________________________________________________________________________________________________
81  // Tools
82  ToolHandle<FPGATrackSim::ActsTrackInspectionTool> m_ActsInspectionTool {this, "ActsInspectionTool", "FPGATrackSim::ActsTrackInspectionTool/ActsTrackInspectionTool", "Monitoring tool for acts tracks"};
83 
84  //_________________________________________________________________________________________________________________________
85  template <class XAOD_CLUSTER>
86  void processxAODClusters(SG::ReadHandle<DataVector< XAOD_CLUSTER >>& clusterContainer) const;
87  template <class XAOD_CLUSTER>
88  void printxAODClusters(SG::ReadHandle<DataVector< XAOD_CLUSTER >>& clusterContainer) const;
89 
92 
95 
98 
101 
104 
107 
110 
112 
114  };
115 
116 }
117 
118 #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:213
FPGATrackSim::FPGATrackSimReportingAlg::m_xAODPixelClusterContainerKeys
SG::ReadHandleKeyArray< xAOD::PixelClusterContainer > m_xAODPixelClusterContainerKeys
Definition: FPGATrackSimReportingAlg.h:50
FPGATrackSim::FPGATrackSimReportingAlg::m_ActsSeedCollections
SG::ReadHandleKeyArray< ActsTrk::SeedContainer > m_ActsSeedCollections
Definition: FPGATrackSimReportingAlg.h:75
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:248
FPGATrackSim::FPGATrackSimReportingAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Definition: FPGATrackSimReportingAlg.cxx:27
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:60
FPGATrackSim::FPGATrackSimReportingAlg::printFPGASeeds
void printFPGASeeds(SG::ReadHandle< ActsTrk::SeedContainer > &FPGASeeds) const
Definition: FPGATrackSimReportingAlg.cxx:277
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
FPGATrackSim::FPGATrackSimReportingAlg::m_FPGAProtoTrackCollections
SG::ReadHandleKeyArray< ActsTrk::ProtoTrackCollection > m_FPGAProtoTrackCollections
Definition: FPGATrackSimReportingAlg.h:71
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey< FPGATrackSimRoadCollection >
Property
Support class for PropertyMgr.
Definition: Property.h:23
FPGATrackSimRoadCollection.h
SeedContainer.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:419
FPGATrackSimActsTrackInspectionTool.h
FPGATrackSim::FPGATrackSimReportingAlg::m_printoutForEveryEvent
Gaudi::Property< bool > m_printoutForEveryEvent
Definition: FPGATrackSimReportingAlg.h:46
FPGATrackSim::FPGATrackSimReportingAlg::printFPGAPrototracks
void printFPGAPrototracks(SG::ReadHandle< ActsTrk::ProtoTrackCollection > &FPGAPrototracks) const
Definition: FPGATrackSimReportingAlg.cxx:494
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:69
FPGATrackSim
Definition: FPGATrackSimPrototrackFitterAlg.h:19
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
ProtoTrackCollection.h
AthReentrantAlgorithm.h
FPGATrackSim::FPGATrackSimReportingAlg::m_ActsInspectionTool
ToolHandle< FPGATrackSim::ActsTrackInspectionTool > m_ActsInspectionTool
Definition: FPGATrackSimReportingAlg.h:82
FPGATrackSim::FPGATrackSimReportingAlg::summaryReportForEDMConversion
StatusCode summaryReportForEDMConversion()
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
FPGATrackSim::FPGATrackSimReportingAlg::printFPGARoads
void printFPGARoads(SG::ReadHandle< FPGATrackSimRoadCollection > &FPGARoads) const
Definition: FPGATrackSimReportingAlg.cxx:345
FPGATrackSim::FPGATrackSimReportingAlg::printFPGAClusters
void printFPGAClusters(SG::ReadHandle< FPGATrackSimClusterCollection > &FPGAClusters) const
FPGATrackSim::FPGATrackSimReportingAlg::processFPGASeedsParam
void processFPGASeedsParam(SG::ReadHandle< ActsTrk::BoundTrackParametersContainer > &FPGASeedsParam) const
Definition: FPGATrackSimReportingAlg.cxx:308
FPGATrackSim::FPGATrackSimReportingAlg::m_FPGARoadsKey
SG::ReadHandleKey< FPGATrackSimRoadCollection > m_FPGARoadsKey
Definition: FPGATrackSimReportingAlg.h:67
FPGATrackSim::FPGATrackSimReportingAlg::m_isDataPrep
Gaudi::Property< bool > m_isDataPrep
Definition: FPGATrackSimReportingAlg.h:47
FPGATrackSim::FPGATrackSimReportingAlg::processFPGARoads
void processFPGARoads(SG::ReadHandle< FPGATrackSimRoadCollection > &FPGARoads) const
Definition: FPGATrackSimReportingAlg.cxx:340
FPGATrackSim::FPGATrackSimReportingAlg::ATLAS_THREAD_SAFE
std::vector< uint32_t > m_pixelClustersPerFPGATrack ATLAS_THREAD_SAFE
Definition: FPGATrackSimReportingAlg.h:40
FPGATrackSim::FPGATrackSimReportingAlg::processFPGATracks
void processFPGATracks(SG::ReadHandle< FPGATrackSimTrackCollection > &FPGATracks) const
Definition: FPGATrackSimReportingAlg.cxx:402
FPGATrackSim::FPGATrackSimReportingAlg::processFPGASeeds
void processFPGASeeds(SG::ReadHandle< ActsTrk::SeedContainer > &FPGASeeds) const
Definition: FPGATrackSimReportingAlg.cxx:272
SpacePointContainer.h
StripClusterContainer.h
FPGATrackSim::FPGATrackSimReportingAlg::m_ActsSeedParamCollections
SG::ReadHandleKeyArray< ActsTrk::BoundTrackParametersContainer > m_ActsSeedParamCollections
Definition: FPGATrackSimReportingAlg.h:77
FPGATrackSim::FPGATrackSimReportingAlg::processFPGAClusters
void processFPGAClusters(SG::ReadHandle< FPGATrackSimClusterCollection > &FPGAClusters) const
FPGATrackSim::FPGATrackSimReportingAlg::finalize
virtual StatusCode finalize() override final
Definition: FPGATrackSimReportingAlg.cxx:149
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
FPGATrackSim::FPGATrackSimReportingAlg::m_xAODStripClusterContainerKeys
SG::ReadHandleKeyArray< xAOD::StripClusterContainer > m_xAODStripClusterContainerKeys
Definition: FPGATrackSimReportingAlg.h:55
FPGATrackSim::FPGATrackSimReportingAlg::processxAODSpacePoints
void processxAODSpacePoints(SG::ReadHandle< DataVector< xAOD::SpacePoint >> &spContainer) const
Definition: FPGATrackSimReportingAlg.cxx:243
FPGATrackSim::FPGATrackSimReportingAlg::processFPGAPrototracks
void processFPGAPrototracks(SG::ReadHandle< ActsTrk::ProtoTrackCollection > &FPGAPrototracks) const
Definition: FPGATrackSimReportingAlg.cxx:474
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:73
StoreGateSvc.h
TrackContainer.h
FPGATrackSim::FPGATrackSimReportingAlg::printFPGASeedsParam
void printFPGASeedsParam(SG::ReadHandle< ActsTrk::BoundTrackParametersContainer > &FPGASeedsParam) const
Definition: FPGATrackSimReportingAlg.cxx:313
FPGATrackSimActsEventTracks
FPGATrackSim::ActsTrackInspectionTool::fpgaActsEventTracks FPGATrackSimActsEventTracks
Definition: FPGATrackSimActsTrackInspectionTool.h:57
FPGATrackSim::FPGATrackSimReportingAlg
Definition: FPGATrackSimReportingAlg.h:30
FPGATrackSim::FPGATrackSimReportingAlg::~FPGATrackSimReportingAlg
virtual ~FPGATrackSimReportingAlg()=default
FPGATrackSim::FPGATrackSimReportingAlg::printxAODClusters
void printxAODClusters(SG::ReadHandle< DataVector< XAOD_CLUSTER >> &clusterContainer) const
Definition: FPGATrackSimReportingAlg.cxx:219
TrackParametersContainer.h