ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
LUCID
LUCID_G4_SD
src
LUCID_SensitiveDetectorTool.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
// Class header
7
#include "
LUCID_SensitiveDetectorTool.h
"
8
9
// Package includes
10
#include "
LUCID_SensitiveDetector.h
"
11
12
#include "
HitManagement/HitCollectionMap.h
"
13
#include "
LUCID_SimEvent/LUCID_SimHitCollection.h
"
14
15
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
16
17
LUCID_SensitiveDetectorTool::LUCID_SensitiveDetectorTool
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent)
18
:
SensitiveDetectorBase
(
type
,name,parent)
19
{
20
}
21
22
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
23
24
StatusCode
LUCID_SensitiveDetectorTool::SetupEvent
(
HitCollectionMap
& hitCollections)
25
{
26
hitCollections.
Emplace
<
LUCID_SimHitCollection
>(
m_outputCollectionNames
[0],
27
m_outputCollectionNames
[0]);
28
return
StatusCode::SUCCESS;
29
}
30
31
StatusCode
LUCID_SensitiveDetectorTool::Gather
(
HitCollectionMap
& hitCollections)
32
{
33
CHECK
(hitCollections.
Record
<
LUCID_SimHitCollection
>(
m_outputCollectionNames
[0]));
34
return
StatusCode::SUCCESS;
35
}
36
37
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
38
39
G4VSensitiveDetector*
LUCID_SensitiveDetectorTool::makeSD
()
const
40
{
41
ATH_MSG_DEBUG
(
"Initializing SD"
);
42
// Create a fresh SD
43
return
new
LUCID_SensitiveDetector
(name(),
m_outputCollectionNames
[0]);
44
}
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:28
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
HitCollectionMap.h
LUCID_SensitiveDetectorTool.h
LUCID_SensitiveDetector.h
LUCID_SimHitCollection.h
LUCID_SimHitCollection
AtlasHitsVector< LUCID_SimHit > LUCID_SimHitCollection
Definition
LUCID_SimHitCollection.h:12
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
LUCID_SensitiveDetectorTool::LUCID_SensitiveDetectorTool
LUCID_SensitiveDetectorTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
LUCID_SensitiveDetectorTool.cxx:17
LUCID_SensitiveDetectorTool::makeSD
G4VSensitiveDetector * makeSD() const override final
Definition
LUCID_SensitiveDetectorTool.cxx:39
LUCID_SensitiveDetectorTool::SetupEvent
StatusCode SetupEvent(HitCollectionMap &) override final
Beginning of an athena event.
Definition
LUCID_SensitiveDetectorTool.cxx:24
LUCID_SensitiveDetectorTool::Gather
StatusCode Gather(HitCollectionMap &) override final
End of an athena event.
Definition
LUCID_SensitiveDetectorTool.cxx:31
LUCID_SensitiveDetector
Definition
LUCID_SensitiveDetector.h:23
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