ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Utilities
G4UserActions
src
FastIDKillerTool.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
FastIDKillerTool.h
"
6
7
namespace
G4UA
8
{
9
10
//---------------------------------------------------------------------------
11
FastIDKillerTool::FastIDKillerTool
(
const
std::string&
type
,
12
const
std::string& name,
13
const
IInterface* parent)
14
:
UserActionToolBase
<
FastIDKiller
>(
type
, name, parent)
15
{
16
declareProperty(
"R"
,
m_config
.R);
17
declareProperty(
"Z"
,
m_config
.Z);
18
declareProperty(
"energyCut"
,
m_config
.energyCut);
19
declareProperty(
"isDalek"
,
m_config
.isDalek);
20
}
21
22
//---------------------------------------------------------------------------
23
std::unique_ptr<FastIDKiller>
24
FastIDKillerTool::makeAndFillAction
(
G4AtlasUserActions
& actionList)
25
{
26
ATH_MSG_DEBUG
(
"Constructing a FastIDKiller action"
);
27
auto
action = std::make_unique<FastIDKiller>(
m_config
);
28
actionList.
runActions
.push_back( action.get() );
29
actionList.
steppingActions
.push_back( action.get() );
30
return
action;
31
}
32
33
//---------------------------------------------------------------------------
34
StatusCode
FastIDKillerTool::finalize
()
35
{
36
// Accumulate results across threads
37
FastIDKiller::Report
report;
38
m_actions
.accumulate(report, &
FastIDKiller::getReport
,
39
&
FastIDKiller::Report::merge
);
40
ATH_MSG_INFO
(
"Fast Inner Detector Killer killed "
<< report.killCount <<
41
" particles during this run."
);
42
return
StatusCode::SUCCESS;
43
}
44
45
}
// namespace G4UA
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
FastIDKillerTool.h
G4UA::FastIDKillerTool::FastIDKillerTool
FastIDKillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition
FastIDKillerTool.cxx:11
G4UA::FastIDKillerTool::makeAndFillAction
virtual std::unique_ptr< FastIDKiller > makeAndFillAction(G4AtlasUserActions &) override final
Create the action for the current thread.
Definition
FastIDKillerTool.cxx:24
G4UA::FastIDKillerTool::m_config
FastIDKiller::Config m_config
Definition
FastIDKillerTool.h:37
G4UA::FastIDKillerTool::finalize
virtual StatusCode finalize() override
Definition
FastIDKillerTool.cxx:34
G4UA::FastIDKiller
NEEDS DOCUMENTATION.
Definition
FastIDKiller.h:20
G4UA::FastIDKiller::getReport
const Report & getReport() const
Definition
FastIDKiller.h:45
G4UA::UserActionToolBase< FastIDKiller >::m_actions
ThreadSpecificUserAction< FastIDKiller > m_actions
Definition
UserActionToolBase.h:70
G4UA::UserActionToolBase< FastIDKiller >::UserActionToolBase
UserActionToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition
UserActionToolBase.h:40
G4UA
for nSW
Definition
CalibrationDefaultProcessing.h:19
G4UA::FastIDKiller::Report
Per-thread results for merging at end of run.
Definition
FastIDKiller.h:38
G4UA::FastIDKiller::Report::merge
void merge(const Report &rep)
Definition
FastIDKiller.h:40
G4UA::G4AtlasUserActions
Struct for passing around user actions.
Definition
IUserActionTool.h:35
G4UA::G4AtlasUserActions::steppingActions
std::vector< G4UserSteppingAction * > steppingActions
Definition
IUserActionTool.h:41
G4UA::G4AtlasUserActions::runActions
std::vector< G4UserRunAction * > runActions
Definition
IUserActionTool.h:36
type
Generated on
for ATLAS Offline Software by
1.17.0