|
ATLAS Offline Software
|
Go to the documentation of this file.
24 #include "GaudiKernel/IEventProcessor.h"
26 #ifdef BENCHMARK_LOGICALHITSALG
28 t_1 = std::chrono::steady_clock::now(); \
29 (name) += std::chrono::duration_cast<std::chrono::microseconds>(t_1 - t_0).count(); \
33 size_t m_tprocess = 0;
55 while (std::getline(
ss,
line,
'\n')) {
98 return StatusCode::SUCCESS;
108 #ifdef BENCHMARK_LOGICALHITSALG
109 std::chrono::time_point<std::chrono::steady_clock> t_0, t_1;
113 const EventContext& ctx = getContext();
120 SmartIF<IEventProcessor> appMgr{service(
"ApplicationMgr")};
122 ATH_MSG_ERROR(
"Failed to retrieve ApplicationMgr as IEventProcessor");
123 return StatusCode::FAILURE;
125 return appMgr->stopRun();
129 ATH_CHECK( FPGAHits.
record (std::make_unique<FPGATrackSimHitCollection>()));
132 ATH_CHECK( FPGAHitUnmapped.
record (std::make_unique<FPGATrackSimHitCollection>()));
135 ATH_CHECK( FPGAClusters.
record (std::make_unique<FPGATrackSimClusterCollection>()));
138 ATH_CHECK( FPGAClustersFiltered.
record (std::make_unique<FPGATrackSimClusterCollection>()));
141 ATH_CHECK( FPGASpacePoints.
record (std::make_unique<FPGATrackSimClusterCollection>()));
144 ATH_CHECK(truthLinkVec.
record(std::make_unique<xAODTruthParticleLinkVector>()));
147 ATH_CHECK(FPGATruthTracks.
record(std::make_unique<FPGATrackSimTruthTrackCollection>()));
150 ATH_CHECK(FPGAOfflineTracks.
record(std::make_unique<FPGATrackSimOfflineTrackCollection>()));
157 return StatusCode::SUCCESS;
164 if (!truthParticleContainer.
isValid()) {
165 ATH_MSG_ERROR(
"No valid truth particle container with key " << truthParticleContainer.
key());
167 return StatusCode::FAILURE;
186 if (truthLinkVec->
size() == 0)
188 ATH_MSG_DEBUG(
"No truth particles selected. Event skipped...");
190 return StatusCode::SUCCESS;
207 FPGATruthTracks->push_back(truthtrack);
212 FPGAOfflineTracks->push_back(offlineTrack);
216 unsigned regionID =
m_evtSel->getRegionID();
226 std::vector<std::shared_ptr<const FPGATrackSimHit>> phits;
227 phits.reserve(
hits.size());
229 if (
h.isReal()) phits.emplace_back(std::make_shared<const FPGATrackSimHit>(
h));
232 for (
const auto &
Hit : phits) FPGAHits->push_back(*
Hit);
248 return StatusCode::SUCCESS;
263 return StatusCode::SUCCESS;
272 ATH_MSG_INFO(
"Cannot read more events from file, returning");
273 return StatusCode::SUCCESS;
285 ATH_MSG_INFO(
"Cannot read more events from file, returning");
286 return StatusCode::SUCCESS;
292 return StatusCode::SUCCESS;
344 std::vector<int> filter_pixel_physLayers;
345 std::vector<int> filter_strip_physLayers;
360 return StatusCode::SUCCESS;
368 #ifdef BENCHMARK_LOGICALHITSALG
370 "\nread input: " << std::setw(10) << m_tread <<
371 "\nprocess hits: " << std::setw(10) << m_tprocess <<
372 "\nfin: " << std::setw(10) << m_tfin
378 return StatusCode::SUCCESS;
StatusCode readInputs(bool &done)
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
virtual StatusCode initialize() override
FPGATrackSimEventInputHeader m_eventHeader
ToolHandle< FPGATrackSimRawToLogicalHitsTool > m_hitMapTool
virtual StatusCode execute() override
FPGATrackSimLogicalEventInputHeader * m_logicEventHeader_precluster
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.
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
Gaudi::Property< bool > m_doHitFiltering
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitUnmappedKey
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_inputTruthParticleContainerKey
Class describing a truth particle in the MC record.
Gaudi::Property< bool > m_clustering
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.
Gaudi::Property< bool > m_runOnRDO
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
SG::WriteHandleKeyArray< FPGATrackSimHitCollection > m_FPGAHitKey
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)
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)
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.