ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonPhaseII
MuonG4
MuonSensitiveDetectorsR4
src
MuonSensitiveDetectorTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonSensitiveDetectorTool.h
"
6
#include "
MuonSensitiveDetector.h
"
7
8
namespace
MuonG4R4
{
9
10
StatusCode
MuonSensitiveDetectorTool::initialize
() {
11
ATH_CHECK
(SensitiveDetectorBase::initialize());
12
ATH_CHECK
(detStore()->retrieve(
m_detMgr
));
13
return
StatusCode::SUCCESS;
14
}
15
StatusCode
MuonSensitiveDetectorTool::SetupEvent
(
HitCollectionMap
& hitCollections) {
16
hitCollections.
Emplace
<
MuonSimHitsVec
>(
m_outputCollectionNames
[0]);
17
18
return
StatusCode::SUCCESS;
19
}
20
StatusCode
MuonSensitiveDetectorTool::Gather
(
HitCollectionMap
& hitCollections) {
21
return
hitCollections.
Record
<
MuonSimHitsVec
>(
m_outputCollectionNames
[0]);
22
}
23
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
MuonSensitiveDetectorTool.h
MuonSensitiveDetector.h
HitCollectionMap
Small wrapper around hit collection map to facilitate accessing the hit collection.
Definition
HitCollectionMap.h:23
HitCollectionMap::Record
StatusCode Record(std::string const &sgKey, std::string const &hitCollectionName, EventContext const &ctx)
Record the hit collection hitCollectionName to the StoreGate sgKey.
Definition
HitCollectionMap.h:83
HitCollectionMap::Emplace
std::pair< StorageIterator, bool > Emplace(std::string const &hitCollectionName, CollectionArgs &&... args)
Insert a container in the map with in-place construction.
Definition
HitCollectionMap.h:40
MuonG4R4::MuonSensitiveDetectorTool::initialize
virtual StatusCode initialize() override final
Definition
MuonSensitiveDetectorTool.cxx:10
MuonG4R4::MuonSensitiveDetectorTool::SetupEvent
virtual StatusCode SetupEvent(HitCollectionMap &hitCollections) override final
Beginning of an athena event.
Definition
MuonSensitiveDetectorTool.cxx:15
MuonG4R4::MuonSensitiveDetectorTool::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
The muon detector manager to retrieve the sensitive elements.
Definition
MuonSensitiveDetectorTool.h:38
MuonG4R4::MuonSensitiveDetectorTool::Gather
virtual StatusCode Gather(HitCollectionMap &hitCollections) override final
End of an athena event.
Definition
MuonSensitiveDetectorTool.cxx:20
SensitiveDetectorBase::m_outputCollectionNames
Gaudi::Property< std::vector< std::string > > m_outputCollectionNames
Names of all output collections written out by this SD.
Definition
SensitiveDetectorBase.h:80
MuonG4R4
Include the common definitions from the MuonReadoutGeometry.
Definition
MuonSpectrometer/MuonPhaseII/MuonG4/MuonSensitiveDetectorsR4/MuonSensitiveDetectorsR4/Utils.h:22
MuonG4R4::MuonSimHitsVec
AthHitVec::AuxStoreHitCollection< xAOD::MuonSimHitContainer, xAOD::MuonSimHitAuxContainer > MuonSimHitsVec
Helper type which can be filled into the HitCollectionMap storing the event content in the event.
Definition
MuonSensitiveDetector.h:32
Generated on
for ATLAS Offline Software by
1.17.0