ATLAS Offline Software
InnerDetector
InDetG4
SCT_G4_SD
src
SctSensorSDTool.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 "
SctSensorSDTool.h
"
10
11
// package includes
12
#include "
SctSensorSD.h
"
13
#include "
SctSensorGmxSD.h
"
14
15
#include <GeoModelRead/ReadGeoModel.h>
16
17
// STL includes
18
#include <exception>
19
20
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
21
22
SctSensorSDTool::SctSensorSDTool
(
const
std::string&
type
,
const
std::string&
name
,
const
IInterface*
parent
)
23
:
SensitiveDetectorBase
(
type
,
name
,
parent
),m_isGmxSensor(false)
24
{
25
declareProperty(
"GmxSensor"
,
m_isGmxSensor
);
26
}
27
28
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
29
30
G4VSensitiveDetector*
SctSensorSDTool::makeSD
()
const
31
{
32
ATH_MSG_DEBUG
(
"Initializing SD"
);
33
GeoModelIO::ReadGeoModel* sqlreader =
nullptr
;
34
StatusCode
sc
=
m_geoDbTagSvc
.retrieve();
35
if
(
sc
.isFailure()) {
36
msg
(MSG::ERROR) <<
"Could not locate GeoDbTagSvc"
<<
endmsg
;
37
}
38
else
{
39
sqlreader =
m_geoDbTagSvc
->getSqliteReader();
40
}
41
42
if
(
m_isGmxSensor
)
43
{
44
return
new
SctSensorGmxSD
(
name
(),
m_outputCollectionNames
[0],sqlreader);
45
}
46
else
47
{
48
return
new
SctSensorSD
(
name
(),
m_outputCollectionNames
[0]);
49
}
50
}
51
SctSensorSDTool.h
SensitiveDetectorBase
Common base class for tools that create and manage Geant4 sensitive detectors.
Definition:
SensitiveDetectorBase.h:42
SctSensorSDTool::m_geoDbTagSvc
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
Definition:
SctSensorSDTool.h:37
SctSensorSD.h
SctSensorSDTool::m_isGmxSensor
bool m_isGmxSensor
Definition:
SctSensorSDTool.h:36
AthenaPoolTestRead.sc
sc
Definition:
AthenaPoolTestRead.py:27
SctSensorGmxSD.h
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition:
AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
SctSensorGmxSD
Definition:
SctSensorGmxSD.h:25
SctSensorSD
Definition:
SctSensorSD.h:25
SctSensorSDTool::SctSensorSDTool
SctSensorSDTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition:
SctSensorSDTool.cxx:22
SensitiveDetectorBase::m_outputCollectionNames
Gaudi::Property< std::vector< std::string > > m_outputCollectionNames
Names of all output collections written out by this SD.
Definition:
SensitiveDetectorBase.h:84
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:221
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
SctSensorSDTool::makeSD
G4VSensitiveDetector * makeSD() const override final
Definition:
SctSensorSDTool.cxx:30
python.AutoConfigFlags.msg
msg
Definition:
AutoConfigFlags.py:7
Generated on Thu Nov 7 2024 21:25:40 for ATLAS Offline Software by
1.8.18