ATLAS Offline Software
Simulation
G4Utilities
G4StepLimitation
src
G4StepLimitationTool.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
// class header
6
#include "
G4StepLimitationTool.h
"
7
8
// G4 headers
9
#include "G4StepLimiter.hh"
10
#include "G4ParticleDefinition.hh"
11
#include "G4ProcessManager.hh"
12
#include "G4Version.hh"
13
14
//-----------------------------------------------------------------------------
15
// Implementation file for class : G4StepLimitationTool
16
//
17
// 03-08-2015 : Edoardo Farina
18
//-----------------------------------------------------------------------------
19
20
#if G4VERSION_NUMBER > 1029
21
#define PARTICLEITERATOR (this->GetParticleIterator())
22
#elif G4VERSION_NUMBER > 1009
23
#define PARTICLEITERATOR aParticleIterator
24
#else
25
#define PARTICLEITERATOR theParticleIterator
26
#endif
27
28
//=============================================================================
29
// Standard constructor, initializes variables
30
//=============================================================================
31
G4StepLimitationTool::G4StepLimitationTool
(
const
std::string&
type
,
32
const
std::string& nam,
const
IInterface*
parent
)
33
: base_class (
type
, nam ,
parent
)
34
{
35
m_physicsOptionType =
G4AtlasPhysicsOption::Type::GlobalProcesses
;
36
}
37
38
//=============================================================================
39
// Destructor
40
//=============================================================================
41
42
G4StepLimitationTool::~G4StepLimitationTool
()
43
{
44
}
45
46
//=============================================================================
47
// Initialize
48
//=============================================================================
49
StatusCode
G4StepLimitationTool::initialize
( )
50
{
51
ATH_MSG_VERBOSE
(
"G4StepLimitationTool initialize( )"
);
52
53
this->SetPhysicsName(
name
());
54
return
StatusCode::SUCCESS;
55
}
56
57
58
G4VPhysicsConstructor*
G4StepLimitationTool::GetPhysicsOption
()
59
{
60
return
this
;
61
}
62
63
void
G4StepLimitationTool::ConstructParticle
()
64
{
65
66
67
68
}
69
70
void
G4StepLimitationTool::ConstructProcess
()
71
{
72
73
ATH_MSG_DEBUG
(
" ConstructProcess for G4StepLimiter being run"
);
74
PARTICLEITERATOR
->reset();
75
while
( (*
PARTICLEITERATOR
)() )
76
{
77
G4ParticleDefinition*
particle
=
PARTICLEITERATOR
->value();
78
G4ProcessManager* pmanager =
particle
->GetProcessManager();
79
pmanager->AddProcess(
new
G4StepLimiter, -1,-1,3);
80
}
81
}
G4StepLimitationTool::G4StepLimitationTool
G4StepLimitationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition:
G4StepLimitationTool.cxx:31
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition:
ParticleHypothesis.h:76
G4StepLimitationTool::ConstructProcess
virtual void ConstructProcess() override final
Definition:
G4StepLimitationTool.cxx:70
PARTICLEITERATOR
#define PARTICLEITERATOR
Definition:
G4StepLimitationTool.cxx:25
G4StepLimitationTool.h
G4StepLimitationTool::GetPhysicsOption
virtual G4VPhysicsConstructor * GetPhysicsOption() override final
Implements.
Definition:
G4StepLimitationTool.cxx:58
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition:
AthMsgStreamMacros.h:28
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
G4StepLimitationTool::~G4StepLimitationTool
virtual ~G4StepLimitationTool()
Destructor.
Definition:
G4StepLimitationTool.cxx:42
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
G4StepLimitationTool::ConstructParticle
virtual void ConstructParticle() override final
Definition:
G4StepLimitationTool.cxx:63
G4AtlasPhysicsOption::GlobalProcesses
@ GlobalProcesses
Definition:
IPhysicsOptionTool.h:25
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
G4StepLimitationTool::initialize
virtual StatusCode initialize() override final
Initialize method.
Definition:
G4StepLimitationTool.cxx:49
Generated on Fri Jan 10 2025 21:10:34 for ATLAS Offline Software by
1.8.18