ATLAS Offline Software
InnerDetector
InDetG4
PixelG4_SD
src
PixelSensorSDTool.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
// Pixel Sensitive Detector.
6
// The Hits are processed here. For every hit I get the position and
7
// an information on the sensor in which the interaction happened
8
9
// Class header
10
#include "
PixelSensorSDTool.h
"
11
12
// For the SD itself
13
#include "
PixelSensorSD.h
"
14
#include "
PixelSensorGmxSD.h
"
15
16
#include <GeoModelRead/ReadGeoModel.h>
17
18
// STL includes
19
#include <exception>
20
21
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
22
23
PixelSensorSDTool::PixelSensorSDTool
(
const
std::string&
type
,
const
std::string&
name
,
const
IInterface*
parent
)
24
:
SensitiveDetectorBase
(
type
,
name
,
parent
)
25
{
26
}
27
28
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
29
30
G4VSensitiveDetector*
PixelSensorSDTool::makeSD
()
const
31
{
32
// Make sure the job has been set up properly
33
ATH_MSG_DEBUG
(
"Initializing SD"
);
34
GeoModelIO::ReadGeoModel* sqlreader =
nullptr
;
35
StatusCode
sc
=
m_geoDbTagSvc
.retrieve();
36
if
(
sc
.isFailure()) {
37
msg
(MSG::ERROR) <<
"Could not locate GeoDbTagSvc"
<<
endmsg
;
38
}
39
else
{
40
sqlreader =
m_geoDbTagSvc
->getSqliteReader();
41
}
42
43
44
// Create a fresh SD
45
if
(!
m_gmxSensor
){
46
return
new
PixelSensorSD
(
name
(),
m_outputCollectionNames
[0]);
47
}
else
{
48
return
new
PixelSensorGmxSD
(
name
(),
m_outputCollectionNames
[0],sqlreader);
49
}
50
}
51
PixelSensorSDTool::PixelSensorSDTool
PixelSensorSDTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition:
PixelSensorSDTool.cxx:23
PixelSensorGmxSD
Definition:
PixelSensorGmxSD.h:29
SensitiveDetectorBase
Common base class for tools that create and manage Geant4 sensitive detectors.
Definition:
SensitiveDetectorBase.h:42
AthenaPoolTestRead.sc
sc
Definition:
AthenaPoolTestRead.py:27
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
PixelSensorSDTool::makeSD
G4VSensitiveDetector * makeSD() const override final
Definition:
PixelSensorSDTool.cxx:30
PixelSensorSD
Definition:
PixelSensorSD.h:28
PixelSensorGmxSD.h
PixelSensorSD.h
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
PixelSensorSDTool::m_geoDbTagSvc
ServiceHandle< IGeoDbTagSvc > m_geoDbTagSvc
Definition:
PixelSensorSDTool.h:38
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:221
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
PixelSensorSDTool::m_gmxSensor
Gaudi::Property< bool > m_gmxSensor
Definition:
PixelSensorSDTool.h:37
PixelSensorSDTool.h
python.AutoConfigFlags.msg
msg
Definition:
AutoConfigFlags.py:7
Generated on Thu Nov 7 2024 21:23:55 for ATLAS Offline Software by
1.8.18