 |
ATLAS Offline Software
|
Go to the documentation of this file.
24 #include "GaudiKernel/IEventProcessor.h"
28 #ifdef BENCHMARK_LOGICALHITSALG
49 while (std::getline(
ss,
line,
'\n')) {
94 return StatusCode::SUCCESS;
104 const EventContext& ctx = getContext();
111 SmartIF<IEventProcessor> appMgr{service(
"ApplicationMgr")};
113 ATH_MSG_ERROR(
"Failed to retrieve ApplicationMgr as IEventProcessor");
114 return StatusCode::FAILURE;
116 return appMgr->stopRun();
120 ATH_CHECK( FPGAHits.
record (std::make_unique<FPGATrackSimHitCollection>()));
123 ATH_CHECK( FPGAHitUnmapped.
record (std::make_unique<FPGATrackSimHitCollection>()));
126 ATH_CHECK( FPGAClusters.
record (std::make_unique<FPGATrackSimClusterCollection>()));
129 ATH_CHECK( FPGAClustersFiltered.
record (std::make_unique<FPGATrackSimClusterCollection>()));
132 ATH_CHECK( FPGASpacePoints.
record (std::make_unique<FPGATrackSimClusterCollection>()));
135 ATH_CHECK(truthLinkVec.
record(std::make_unique<xAODTruthParticleLinkVector>()));
138 ATH_CHECK(FPGATruthTracks.
record(std::make_unique<FPGATrackSimTruthTrackCollection>()));
141 ATH_CHECK(FPGAOfflineTracks.
record(std::make_unique<FPGATrackSimOfflineTrackCollection>()));
149 return StatusCode::SUCCESS;
156 if (!truthParticleContainer.
isValid()) {
157 ATH_MSG_ERROR(
"No valid truth particle container with key " << truthParticleContainer.
key());
159 return StatusCode::FAILURE;
178 if (truthLinkVec->
size() == 0)
180 ATH_MSG_DEBUG(
"No truth particles selected. Event skipped...");
182 return StatusCode::SUCCESS;
201 FPGATruthTracks->push_back(truthtrack);
206 FPGAOfflineTracks->push_back(offlineTrack);
212 unsigned regionID =
m_evtSel->getRegionID();
220 std::vector<std::shared_ptr<const FPGATrackSimHit>> phits;
221 phits.reserve(
hits.size());
223 if (
h.isReal()) phits.emplace_back(std::make_shared<const FPGATrackSimHit>(
h));
227 for (
const auto & hit : phits)
228 FPGAHits->push_back(*hit);
244 return StatusCode::SUCCESS;
259 return StatusCode::SUCCESS;
268 ATH_MSG_INFO(
"Cannot read more events from file, returning");
269 return StatusCode::SUCCESS;
281 ATH_MSG_INFO(
"Cannot read more events from file, returning");
282 return StatusCode::SUCCESS;
288 return StatusCode::SUCCESS;
331 unsigned npix(0), nstrip(0);
333 FPGAClusters->push_back(cluster);
334 if (cluster.getClusterEquiv().isPixel()) npix++;
351 std::vector<int> filter_pixel_physLayers;
352 std::vector<int> filter_strip_physLayers;
371 return StatusCode::SUCCESS;
379 ATH_MSG_INFO(
"PRINTING FPGATRACKSIM SIMPLE DATAPREP STATS");
380 ATH_MSG_INFO(
"========================================================================================");
387 return StatusCode::SUCCESS;
StatusCode readInputs(bool &done)
ServiceHandle< IChronoStatSvc > m_chrono
ToolHandle< GenericMonitoringTool > m_monTool
Group
Properties of a chain group.
ToolHandle< IFPGATrackSimInputTool > m_hitSGInputTool
const std::vector< FPGATrackSimOfflineTrack > & getOfflineTracks() const
Stores slice definitions for FPGATrackSim regions.
ToolHandle< FPGATrackSimReadRawRandomHitsTool > m_hitInputTool2
unsigned m_nMaxStripClusters
virtual StatusCode initialize() override
FPGATrackSimEventInputHeader m_eventHeader
ToolHandle< FPGATrackSimRawToLogicalHitsTool > m_hitMapTool
virtual StatusCode execute() override
FPGATrackSimLogicalEventInputHeader * m_logicEventHeader_precluster
Gaudi::Property< bool > m_useInternalTruthTracks
Gaudi::Property< bool > m_doSpacepoints
FPGATrackSimLogicalEventInputHeader * m_logicEventHeader
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_evtSel
#define ATH_MSG_VERBOSE(x)
std::string m_description
SG::WriteHandleKey< FPGATrackSimOfflineTrackCollection > m_FPGAOfflineTrackKey
const std::vector< FPGATrackSimTruthTrack > & getTruthTracks() const
SG::WriteHandleKey< FPGATrackSimClusterCollection > m_FPGAClusterFilteredKey
Maps ITK module indices to FPGATrackSim regions.
unsigned long m_nStripClusters
Gaudi::Property< bool > m_writeOutputData
ToolHandle< IFPGATrackSimHitFilteringTool > m_hitFilteringTool
ToolHandle< FPGATrackSimSpacePointsToolI > m_spacepointsTool
Gaudi::Property< bool > m_doEvtSel
a link optimized in size for a GenParticle in a McEventCollection
std::vector< FPGATrackSimCluster > m_spacepoints
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitKey
Gaudi::Property< std::string > m_clusterBranch
unsigned m_nMaxPixClusters
Gaudi::Property< bool > m_doHitFiltering
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitUnmappedKey
Gaudi::Property< int > m_clustering
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_inputTruthParticleContainerKey
Class describing a truth particle in the MC record.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ElementLink implementation for ROOT usage.
Gaudi::Property< int > m_secondInputToolN
SG::WriteHandleKeyArray< FPGATrackSimClusterCollection > m_FPGAClusterKey
: FPGATrackSim-specific class to represent an hit in the detector.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
std::vector< FPGATrackSimCluster > m_clusters_original
ToolHandle< FPGATrackSimOutputHeaderTool > m_writeOutputTool
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
ToolHandle< FPGATrackSimClusteringToolI > m_clusteringTool
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Gaudi::Property< std::string > m_preClusterBranch
Gaudi::Property< std::string > m_postClusterBranch
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
std::vector< FPGATrackSimCluster > m_clusters
SG::WriteHandleKey< xAODTruthParticleLinkVector > m_truthLinkContainerKey
Gaudi::Property< int > m_firstInputToolN
std::pair< HepMcParticleLink, ElementLink< xAOD::TruthParticleContainer > > xAODTruthParticleLink
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
std::vector< FPGATrackSimHit > m_hits_miss
FPGATrackSimDataPrepAlg(const std::string &name, ISvcLocator *pSvcLocator)
constexpr bool enableBenchmark
ToolHandle< IFPGATrackSimEventInputHeaderTool > m_hitInputTool
Defines a class for roads.
Declare a monitored scalar variable.
FPGATrackSimEventInputHeader m_firstInputHeader
SG::WriteHandleKeyArray< FPGATrackSimClusterCollection > m_FPGASpacePointsKey
StatusCode processInputs(SG::WriteHandle< FPGATrackSimHitCollection > &FPGAHitUnmapped, SG::WriteHandle< FPGATrackSimClusterCollection > &FPGAClusters, SG::WriteHandle< FPGATrackSimClusterCollection > &FPGAClustersFiltered, SG::WriteHandle< FPGATrackSimClusterCollection > &FPGASpacePoints)
FPGATrackSimLogicalEventInputHeader * m_logicEventHeader_cluster
virtual StatusCode finalize() override
size_type size() const noexcept
Returns the number of elements in the collection.
SG::WriteHandleKey< FPGATrackSimTruthTrackCollection > m_FPGATruthTrackKey
Structs that store the 5 track parameters.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
unsigned long m_nPixClusters