ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetG4
SCT_G4_SD
src
SctSensor_CTBTool.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
// SCT Sensitive Detector Tool.
6
//
7
8
//class header
9
#include "
SctSensor_CTBTool.h
"
10
11
//package includes
12
#include "
SctSensor_CTB.h
"
13
#include "
HitManagement/HitCollectionMap.h
"
14
#include "
InDetSimEvent/SiHitCollection.h
"
15
16
// STL includes
17
#include <exception>
18
19
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
20
21
SctSensor_CTBTool::SctSensor_CTBTool
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent)
22
:
SensitiveDetectorBase
(
type
, name , parent )
23
{
24
}
25
26
StatusCode
SctSensor_CTBTool::SetupEvent
(
HitCollectionMap
& hitCollections)
27
{
28
hitCollections.
Emplace
<
SiHitCollection
>(
m_outputCollectionNames
[0]);
29
return
StatusCode::SUCCESS;
30
}
31
32
StatusCode
SctSensor_CTBTool::Gather
(
HitCollectionMap
& hitCollections)
33
{
34
return
hitCollections.
Record
<
SiHitCollection
>(
m_outputCollectionNames
[0]);
35
}
36
37
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
38
39
G4VSensitiveDetector*
SctSensor_CTBTool::makeSD
()
const
40
{
41
ATH_MSG_DEBUG
(
"Initializing SD"
);
42
43
return
new
SctSensor_CTB
(name(),
m_outputCollectionNames
[0]);
44
}
45
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
HitCollectionMap.h
SctSensor_CTBTool.h
SctSensor_CTB.h
SiHitCollection.h
SiHitCollection
AtlasHitsVector< SiHit > SiHitCollection
Definition
SiHitCollection.h:14
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
SctSensor_CTBTool::SetupEvent
virtual StatusCode SetupEvent(HitCollectionMap &) override
Beginning of an athena event.
Definition
SctSensor_CTBTool.cxx:26
SctSensor_CTBTool::Gather
virtual StatusCode Gather(HitCollectionMap &) override
End of an athena event.
Definition
SctSensor_CTBTool.cxx:32
SctSensor_CTBTool::makeSD
G4VSensitiveDetector * makeSD() const override final
Definition
SctSensor_CTBTool.cxx:39
SctSensor_CTBTool::SctSensor_CTBTool
SctSensor_CTBTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
SctSensor_CTBTool.cxx:21
SctSensor_CTB
Definition
SctSensor_CTB.h:28
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