ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetG4
BCM_G4_SD
src
BCMSensorSDTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//###############################################
6
// BCM Sensitive Detector Tool
7
//
8
//###############################################
9
10
// Class header
11
#include "
BCMSensorSDTool.h
"
12
13
// For the SD itself
14
#include "
BCMSensorSD.h
"
15
#include "
HitManagement/HitCollectionMap.h
"
16
#include "
InDetSimEvent/SiHitCollection.h
"
17
18
BCMSensorSDTool::BCMSensorSDTool
(
const
std::string&
type
,
const
std::string& name,
const
IInterface *parent) :
19
SensitiveDetectorBase
(
type
,name,parent)
20
{
21
}
22
23
StatusCode
BCMSensorSDTool::SetupEvent
(
HitCollectionMap
& hitCollections)
24
{
25
hitCollections.
Emplace
<
SiHitCollection
>(
m_outputCollectionNames
[0]);
26
return
StatusCode::SUCCESS;
27
}
28
29
StatusCode
BCMSensorSDTool::Gather
(
HitCollectionMap
& hitCollections)
30
{
31
return
hitCollections.
Record
<
SiHitCollection
>(
m_outputCollectionNames
[0]);
32
}
33
34
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
35
36
G4VSensitiveDetector*
BCMSensorSDTool::makeSD
()
const
37
{
38
ATH_MSG_DEBUG
(
"Initializing SD"
);
39
40
// Create a fresh SD
41
return
new
BCMSensorSD
(name(),
m_outputCollectionNames
[0]);
42
}
43
44
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
BCMSensorSDTool.h
BCMSensorSD.h
HitCollectionMap.h
SiHitCollection.h
SiHitCollection
AtlasHitsVector< SiHit > SiHitCollection
Definition
SiHitCollection.h:14
BCMSensorSDTool::makeSD
G4VSensitiveDetector * makeSD() const override final
Definition
BCMSensorSDTool.cxx:36
BCMSensorSDTool::SetupEvent
virtual StatusCode SetupEvent(HitCollectionMap &) override
Beginning of an athena event.
Definition
BCMSensorSDTool.cxx:23
BCMSensorSDTool::BCMSensorSDTool
BCMSensorSDTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
BCMSensorSDTool.cxx:18
BCMSensorSDTool::Gather
virtual StatusCode Gather(HitCollectionMap &) override
End of an athena event.
Definition
BCMSensorSDTool.cxx:29
BCMSensorSD
Definition
BCMSensorSD.h:25
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
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
SensitiveDetectorBase::SensitiveDetectorBase
SensitiveDetectorBase(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition
SensitiveDetectorBase.cxx:17
type
Generated on
for ATLAS Offline Software by
1.17.0