ATLAS Offline Software
Loading...
Searching...
No Matches
TrackFastSimSDTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6// Class header
8
9// Pacakge includes
11
12// Athena includes
15
16TrackFastSimSDTool::TrackFastSimSDTool(const std::string& type, const std::string& name, const IInterface* parent)
17 : SensitiveDetectorBase( type , name , parent )
18{
19 m_outputCollectionNames.setValue({"NeutronBG"});
20 m_noVolumes.setValue(true);
21}
22
24{
27 return StatusCode::SUCCESS;
28}
29
31{
33 return StatusCode::SUCCESS;
34}
35
36G4VSensitiveDetector* TrackFastSimSDTool::makeSD() const
37{
38 ATH_MSG_DEBUG( "Initializing SD" );
39
40 // Create a fresh SD
41 return new TrackFastSimSD(name(), m_outputCollectionNames[0]);
42}
#define ATH_MSG_DEBUG(x)
#define CHECK(...)
Evaluate an expression and check for errors.
AtlasHitsVector< TrackRecord > TrackRecordCollection
Small wrapper around hit collection map to facilitate accessing the hit collection.
StatusCode Record(std::string const &sgKey, std::string const &hitCollectionName, EventContext const &ctx)
Record the hit collection hitCollectionName to the StoreGate sgKey.
std::pair< StorageIterator, bool > Emplace(std::string const &hitCollectionName, CollectionArgs &&... args)
Insert a container in the map with in-place construction.
Gaudi::Property< bool > m_noVolumes
This SensitiveDetector has no volumes associated with it.
Gaudi::Property< std::vector< std::string > > m_outputCollectionNames
Names of all output collections written out by this SD.
SensitiveDetectorBase(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
StatusCode SetupEvent(HitCollectionMap &) override final
Beginning of an athena event.
TrackFastSimSDTool(const std::string &type, const std::string &name, const IInterface *parent)
StatusCode Gather(HitCollectionMap &) override final
End of an athena event.
G4VSensitiveDetector * makeSD() const override final