ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArG4
LArG4FastSimulation
src
LArFastShowerTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArFastShowerTool.h
"
6
#include "
BarrelFastSimDedicatedSD.h
"
7
#include "
EndcapFastSimDedicatedSD.h
"
8
#include "
FCALFastSimDedicatedSD.h
"
9
#include "
LArFastShower.h
"
10
#include "G4SDManager.hh"
11
12
LArFastShowerTool::LArFastShowerTool
(
const
std::string&
type
13
,
const
std::string& name
14
,
const
IInterface *parent)
15
:
FastSimulationBase
(
type
, name, parent)
16
{
17
}
18
19
StatusCode
LArFastShowerTool::initialize
()
20
{
21
ATH_MSG_VERBOSE
( name() <<
"::initialize()"
);
22
CHECK
(
m_showerLibSvc
.retrieve() );
23
24
m_configuration
.m_showerLibSvcName =
m_showerLibSvc
.name();
25
26
m_configuration
.m_e_FlagShowerLib =
m_e_FlagShowerLib
;
27
m_configuration
.m_e_MinEneShowerLib =
m_e_MinEneShowerLib
;
28
m_configuration
.m_e_MaxEneShowerLib =
m_e_MaxEneShowerLib
;
29
30
m_configuration
.m_g_FlagShowerLib =
m_g_FlagShowerLib
;
31
m_configuration
.m_g_MinEneShowerLib =
m_g_MinEneShowerLib
;
32
m_configuration
.m_g_MaxEneShowerLib =
m_g_MaxEneShowerLib
;
33
34
m_configuration
.m_Neut_FlagShowerLib =
m_Neut_FlagShowerLib
;
35
m_configuration
.m_Neut_MinEneShowerLib =
m_Neut_MinEneShowerLib
;
36
m_configuration
.m_Neut_MaxEneShowerLib =
m_Neut_MaxEneShowerLib
;
37
38
m_configuration
.m_Pion_FlagShowerLib =
m_Pion_FlagShowerLib
;
39
m_configuration
.m_Pion_MinEneShowerLib =
m_Pion_MinEneShowerLib
;
40
m_configuration
.m_Pion_MaxEneShowerLib =
m_Pion_MaxEneShowerLib
;
41
42
m_configuration
.m_containLow =
m_containLow
;
43
m_configuration
.m_absLowEta =
m_absLowEta
;
44
m_configuration
.m_containHigh =
m_containHigh
;
45
m_configuration
.m_absHighEta =
m_absHighEta
;
46
m_configuration
.m_containCrack =
m_containCrack
;
47
m_configuration
.m_absCrackEta1 =
m_absCrackEta1
;
48
m_configuration
.m_absCrackEta2 =
m_absCrackEta2
;
49
50
m_configuration
.m_generated_starting_points_file =
m_generated_starting_points_file
;
51
m_configuration
.m_generated_starting_points_ratio =
m_generated_starting_points_ratio
;
52
m_configuration
.m_detector_tag =
m_detector_tag
;
53
m_configuration
.m_applyRRWeights =
m_applyRRWeights
;
54
55
return
FastSimulationBase::initialize();
56
}
57
58
G4VFastSimulationModel*
LArFastShowerTool::makeFastSimModel
()
59
{
60
ATH_MSG_DEBUG
(
"Initializing Fast Sim Model"
);
61
IFastSimDedicatedSD
* fastSD =
dynamic_cast<
IFastSimDedicatedSD
*
>
(G4SDManager::GetSDMpointer()->FindSensitiveDetector(
m_fastSimDedicatedSD
.value(),
false
));
62
if
(fastSD) {
63
ATH_MSG_DEBUG
(
"SD "
<<
m_fastSimDedicatedSD
<<
" already created."
);
64
}
else
if
(
"BarrelFastSimDedicatedSD"
==
m_fastSimDedicatedSD
){
65
fastSD =
new
BarrelFastSimDedicatedSD
(&*detStore(),
m_outputCollectionName
,
66
msgLevel(MSG::DEBUG));
67
}
else
if
(
"EndcapFastSimDedicatedSD"
==
m_fastSimDedicatedSD
){
68
fastSD =
new
EndcapFastSimDedicatedSD
(&*detStore(),
m_outputCollectionName
,
69
msgLevel(MSG::DEBUG));
70
}
else
if
(
"FCALFastSimDedicatedSD"
==
m_fastSimDedicatedSD
){
71
fastSD =
new
FCALFastSimDedicatedSD
(&*detStore(),
m_outputCollectionName
,
72
msgLevel(MSG::DEBUG));
73
}
else
{
74
ATH_MSG_FATAL
(
"Fast sim SD type "
<<
m_fastSimDedicatedSD
<<
" not found!"
);
75
throw
std::runtime_error(
"Bad SD name"
);
76
}
77
G4SDManager::GetSDMpointer()->AddNewDetector(fastSD);
78
79
// Create a fresh Fast Sim Model
80
return
new
LArFastShower
(name(),
getRegion
(),
m_configuration
, fastSD);
81
}
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition
AthMsgStreamMacros.h:34
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
BarrelFastSimDedicatedSD.h
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
EndcapFastSimDedicatedSD.h
FCALFastSimDedicatedSD.h
LArFastShowerTool.h
LArFastShower.h
BarrelFastSimDedicatedSD
NEEDS DOCUMENTATION.
Definition
BarrelFastSimDedicatedSD.h:26
EndcapFastSimDedicatedSD
NEEDS DOCUMENTATION.
Definition
EndcapFastSimDedicatedSD.h:24
FCALFastSimDedicatedSD
NEEDS DOCUMENTATION.
Definition
FCALFastSimDedicatedSD.h:22
FastSimulationBase::FastSimulationBase
FastSimulationBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition
FastSimulationBase.cxx:13
FastSimulationBase::getRegion
G4Region * getRegion() const
Definition
FastSimulationBase.cxx:18
IFastSimDedicatedSD
This is the interface for the fast simulation dedicated sensitive detector.
Definition
IFastSimDedicatedSD.h:16
LArFastShowerTool::LArFastShowerTool
LArFastShowerTool(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
Definition
LArFastShowerTool.cxx:12
LArFastShowerTool::m_g_MinEneShowerLib
Gaudi::Property< double > m_g_MinEneShowerLib
Definition
LArFastShowerTool.h:49
LArFastShowerTool::m_Pion_MinEneShowerLib
Gaudi::Property< double > m_Pion_MinEneShowerLib
Definition
LArFastShowerTool.h:57
LArFastShowerTool::m_Neut_MaxEneShowerLib
Gaudi::Property< double > m_Neut_MaxEneShowerLib
Definition
LArFastShowerTool.h:54
LArFastShowerTool::initialize
StatusCode initialize() override final
Definition
LArFastShowerTool.cxx:19
LArFastShowerTool::m_detector_tag
Gaudi::Property< int > m_detector_tag
Definition
LArFastShowerTool.h:72
LArFastShowerTool::makeFastSimModel
virtual G4VFastSimulationModel * makeFastSimModel() override final
Method to make the actual fast simulation model itself, which will be owned by the tool.
Definition
LArFastShowerTool.cxx:58
LArFastShowerTool::m_e_MinEneShowerLib
Gaudi::Property< double > m_e_MinEneShowerLib
Definition
LArFastShowerTool.h:45
LArFastShowerTool::m_Neut_FlagShowerLib
Gaudi::Property< bool > m_Neut_FlagShowerLib
Definition
LArFastShowerTool.h:52
LArFastShowerTool::m_g_FlagShowerLib
Gaudi::Property< bool > m_g_FlagShowerLib
Definition
LArFastShowerTool.h:48
LArFastShowerTool::m_e_MaxEneShowerLib
Gaudi::Property< double > m_e_MaxEneShowerLib
Definition
LArFastShowerTool.h:46
LArFastShowerTool::m_fastSimDedicatedSD
Gaudi::Property< std::string > m_fastSimDedicatedSD
Shower library sensitive detector for this shower.
Definition
LArFastShowerTool.h:37
LArFastShowerTool::m_generated_starting_points_ratio
Gaudi::Property< float > m_generated_starting_points_ratio
Definition
LArFastShowerTool.h:70
LArFastShowerTool::m_absCrackEta2
Gaudi::Property< double > m_absCrackEta2
Definition
LArFastShowerTool.h:66
LArFastShowerTool::m_containCrack
Gaudi::Property< bool > m_containCrack
Definition
LArFastShowerTool.h:64
LArFastShowerTool::m_Pion_FlagShowerLib
Gaudi::Property< bool > m_Pion_FlagShowerLib
Definition
LArFastShowerTool.h:56
LArFastShowerTool::m_showerLibSvc
ServiceHandle< ILArG4ShowerLibSvc > m_showerLibSvc
Pointer to the shower library service.
Definition
LArFastShowerTool.h:41
LArFastShowerTool::m_configuration
FastShowerConfigStruct m_configuration
Definition
LArFastShowerTool.h:77
LArFastShowerTool::m_g_MaxEneShowerLib
Gaudi::Property< double > m_g_MaxEneShowerLib
Definition
LArFastShowerTool.h:50
LArFastShowerTool::m_outputCollectionName
Gaudi::Property< std::string > m_outputCollectionName
Definition
LArFastShowerTool.h:39
LArFastShowerTool::m_containHigh
Gaudi::Property< bool > m_containHigh
Definition
LArFastShowerTool.h:62
LArFastShowerTool::m_absCrackEta1
Gaudi::Property< double > m_absCrackEta1
Definition
LArFastShowerTool.h:65
LArFastShowerTool::m_e_FlagShowerLib
Gaudi::Property< bool > m_e_FlagShowerLib
Definition
LArFastShowerTool.h:44
LArFastShowerTool::m_Neut_MinEneShowerLib
Gaudi::Property< double > m_Neut_MinEneShowerLib
Definition
LArFastShowerTool.h:53
LArFastShowerTool::m_Pion_MaxEneShowerLib
Gaudi::Property< double > m_Pion_MaxEneShowerLib
Definition
LArFastShowerTool.h:58
LArFastShowerTool::m_containLow
Gaudi::Property< bool > m_containLow
Definition
LArFastShowerTool.h:60
LArFastShowerTool::m_generated_starting_points_file
Gaudi::Property< std::string > m_generated_starting_points_file
Definition
LArFastShowerTool.h:68
LArFastShowerTool::m_applyRRWeights
Gaudi::Property< bool > m_applyRRWeights
Definition
LArFastShowerTool.h:74
LArFastShowerTool::m_absLowEta
Gaudi::Property< double > m_absLowEta
Definition
LArFastShowerTool.h:61
LArFastShowerTool::m_absHighEta
Gaudi::Property< double > m_absHighEta
Definition
LArFastShowerTool.h:63
LArFastShower
NEEDS DOCUMENTATION.
Definition
LArFastShower.h:28
type
Generated on
for ATLAS Offline Software by
1.17.0