ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Atlas
G4AtlasTools
src
FastSimulationMasterTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// Base class
6
#include "
FastSimulationMasterTool.h
"
7
8
// For the process setup
9
#include "G4ParticleTable.hh"
10
#include "G4FastSimulationManagerProcess.hh"
11
#include "G4ProcessManager.hh"
12
#include "
HitManagement/HitCollectionMap.h
"
13
14
FastSimulationMasterTool::FastSimulationMasterTool
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent)
15
: base_class(
type
,name,parent)
16
{
17
}
18
19
StatusCode
FastSimulationMasterTool::initializeFastSims
(){
20
ATH_MSG_VERBOSE
( name() <<
"::initializeFastSims()"
);
21
// Loop through list of fast simulations and retrieve them
22
// This forces a call to initialize() for each of them
23
ATH_MSG_INFO
(
"Initializing list of "
<<
m_FastSimList
.size() <<
" fast simulation tools in "
<< name() );
24
CHECK
(
m_FastSimList
.retrieve() );
25
26
// Initialize the FastSim processes. Each process will attach
27
// itself to the relevant region at construction
28
for
(
auto
& ifs :
m_FastSimList
){
29
CHECK
(ifs->initializeFastSim());
30
}
31
32
return
StatusCode::SUCCESS;
33
}
34
35
StatusCode
FastSimulationMasterTool::BeginOfAthenaEvent
(
HitCollectionMap
& hcm){
36
// Method that gets called at the beginning of every *athena* event
37
for
(
auto
& ifs :
m_FastSimList
){
38
CHECK
(ifs->BeginOfAthenaEvent(hcm));
39
}
40
return
StatusCode::SUCCESS;
41
}
42
43
StatusCode
FastSimulationMasterTool::EndOfAthenaEvent
(
HitCollectionMap
& hcm){
44
// Method that gets called at the end of every *athena* event
45
for
(
auto
& ifs :
m_FastSimList
){
46
CHECK
(ifs->EndOfAthenaEvent(hcm));
47
}
48
return
StatusCode::SUCCESS;
49
}
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
FastSimulationMasterTool.h
HitCollectionMap.h
FastSimulationMasterTool::BeginOfAthenaEvent
StatusCode BeginOfAthenaEvent(HitCollectionMap &) override final
!< Base class method to initialize all the fast simulation models
Definition
FastSimulationMasterTool.cxx:35
FastSimulationMasterTool::initializeFastSims
StatusCode initializeFastSims() override final
Definition
FastSimulationMasterTool.cxx:19
FastSimulationMasterTool::EndOfAthenaEvent
StatusCode EndOfAthenaEvent(HitCollectionMap &) override final
!< Base class method that calls BeginOfAthenaEvent for all fast simulation models.
Definition
FastSimulationMasterTool.cxx:43
FastSimulationMasterTool::m_FastSimList
ToolHandleArray< IFastSimulation > m_FastSimList
!< Base class method that calls EndOfAthenaEvent for all fast simulation models.
Definition
FastSimulationMasterTool.h:29
FastSimulationMasterTool::FastSimulationMasterTool
FastSimulationMasterTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
FastSimulationMasterTool.cxx:14
HitCollectionMap
Small wrapper around hit collection map to facilitate accessing the hit collection.
Definition
HitCollectionMap.h:23
type
Generated on
for ATLAS Offline Software by
1.17.0