ATLAS Offline Software
HighGranularityTimingDetector
HGTD_G4
HGTD_G4_SD
src
HGTDSensorSDTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// HGTD Sensitive Detector.
6
// The Hits are processed here. For every hit, the position and information
7
// on the sensor in which the interaction happened are obtained.
8
9
// Class header
10
#include "
HGTDSensorSDTool.h
"
11
12
// For the SD itself
13
#include "
HGTDSensorSD.h
"
14
#include "
HGTDSensorGmxSD.h
"
15
16
#include <GeoModelRead/ReadGeoModel.h>
17
18
// STL includes
19
#include <exception>
20
21
HGTDSensorSDTool::HGTDSensorSDTool
(
const
std::string&
type
,
const
std::string&
name
,
const
IInterface*
parent
)
22
:
SensitiveDetectorBase
(
type
,
name
,
parent
)
23
{
24
}
25
26
G4VSensitiveDetector*
HGTDSensorSDTool::makeSD
()
const
27
{
28
// Make sure the job has been set up properly
29
ATH_MSG_DEBUG
(
"Initializing SD"
);
30
GeoModelIO::ReadGeoModel* sqlreader =
nullptr
;
31
StatusCode
sc
=
m_geoDbTagSvc
.retrieve();
32
if
(
sc
.isFailure()) {
33
msg
(MSG::ERROR) <<
"Could not locate GeoDbTagSvc"
<<
endmsg
;
34
}
35
else
{
36
sqlreader =
m_geoDbTagSvc
->getSqliteReader();
37
}
38
// Create a fresh SD
39
if
(!
m_gmxSensor
){
40
return
new
HGTDSensorSD
(
name
(),
m_outputCollectionNames
[0]);
41
}
else
{
42
return
new
HGTDSensorGmxSD
(
name
(),
m_outputCollectionNames
[0], sqlreader);
43
}
44
45
}
HGTDSensorSDTool::HGTDSensorSDTool
HGTDSensorSDTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition:
HGTDSensorSDTool.cxx:21
HGTDSensorSDTool::m_gmxSensor
Gaudi::Property< bool > m_gmxSensor
Definition:
HGTDSensorSDTool.h:35
SensitiveDetectorBase
Common base class for tools that create and manage Geant4 sensitive detectors.
Definition:
SensitiveDetectorBase.h:42
AthenaPoolTestRead.sc
sc
Definition:
AthenaPoolTestRead.py:27
HGTDSensorSD
Definition:
HGTDSensorSD.h:30
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
HGTDSensorSDTool::makeSD
virtual G4VSensitiveDetector * makeSD() const override final
Definition:
HGTDSensorSDTool.cxx:26
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition:
AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
HGTDSensorSDTool::m_geoDbTagSvc
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
Definition:
HGTDSensorSDTool.h:36
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:228
HGTDSensorGmxSD
Definition:
HGTDSensorGmxSD.h:34
HGTDSensorSD.h
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
HGTDSensorSDTool.h
python.AutoConfigFlags.msg
msg
Definition:
AutoConfigFlags.py:7
HGTDSensorGmxSD.h
Generated on Sun Dec 22 2024 21:11:09 for ATLAS Offline Software by
1.8.18