ATLAS Offline Software
Simulation
G4Extensions
G4ScoringProcess
src
G4ScoringProcessTool.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 "
G4ScoringProcessTool.h
"
7
// package headers
8
#include "G4ParallelWorldScoringProcess.hh"
9
// Geant4 headers
10
#include "G4ProcessManager.hh"
11
#include "G4Version.hh"
12
//CLHEP headers
13
#include "CLHEP/Units/SystemOfUnits.h"
14
15
16
//-----------------------------------------------------------------------------
17
// Implementation file for class : G4ScoringProcessTool
18
//
19
// 26-10-2015 : Edoardo Farina
20
//-----------------------------------------------------------------------------
21
22
#if G4VERSION_NUMBER > 1029
23
#define PARTICLEITERATOR (this->GetParticleIterator())
24
#elif G4VERSION_NUMBER > 1009
25
#define PARTICLEITERATOR aParticleIterator
26
#else
27
#define PARTICLEITERATOR theParticleIterator
28
#endif
29
30
//=============================================================================
31
// Standard constructor, initializes variables
32
//=============================================================================
33
G4ScoringProcessTool::G4ScoringProcessTool
(
const
std::string&
type
,
34
const
std::string& nam,
const
IInterface*
parent
)
35
: base_class (
type
, nam ,
parent
)
36
{
37
m_physicsOptionType =
G4AtlasPhysicsOption::Type::GlobalProcesses
;
38
}
39
40
//=============================================================================
41
// Destructor
42
//=============================================================================
43
44
G4ScoringProcessTool::~G4ScoringProcessTool
()
45
{
46
47
}
48
49
//=============================================================================
50
// Initialize
51
//=============================================================================
52
StatusCode
G4ScoringProcessTool::initialize
( )
53
{
54
ATH_MSG_DEBUG
(
"G4ScoringProcessTool initialize( )"
);
55
this->SetPhysicsName(
name
());
56
return
StatusCode::SUCCESS;
57
}
58
59
60
G4ScoringProcessTool
*
G4ScoringProcessTool::GetPhysicsOption
()
61
{
62
return
this
;
63
}
64
65
void
G4ScoringProcessTool::ConstructParticle
()
66
{
67
68
}
69
70
void
G4ScoringProcessTool::ConstructProcess
()
71
{
72
// Add parallel world scoring process
73
ATH_MSG_DEBUG
(
" ScoringProcessDefinition::ConstructProcess()"
);
74
75
G4ParallelWorldScoringProcess* theParallelWorldScoringProcess
76
=
new
G4ParallelWorldScoringProcess(
"ParaWorldScoringProc"
);
77
theParallelWorldScoringProcess->SetParallelWorld(
"Scoring"
);
78
79
PARTICLEITERATOR
->reset();
80
while
( (*
PARTICLEITERATOR
)() )
81
{
82
G4ParticleDefinition*
particle
=
PARTICLEITERATOR
->value();
83
if
(!
particle
->IsShortLived())
84
{
85
G4ProcessManager* pmanager =
particle
->GetProcessManager();
86
pmanager->AddProcess(theParallelWorldScoringProcess);
87
pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess, idxAtRest);
88
pmanager->SetProcessOrdering(theParallelWorldScoringProcess, idxAlongStep, 1);
89
pmanager->SetProcessOrderingToLast(theParallelWorldScoringProcess, idxPostStep);
90
}
91
}
92
}
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition:
ParticleHypothesis.h:76
G4ScoringProcessTool::~G4ScoringProcessTool
virtual ~G4ScoringProcessTool()
Destructor.
Definition:
G4ScoringProcessTool.cxx:44
G4ScoringProcessTool::GetPhysicsOption
virtual G4ScoringProcessTool * GetPhysicsOption() override final
Implements.
Definition:
G4ScoringProcessTool.cxx:60
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
G4ScoringProcessTool::ConstructProcess
virtual void ConstructProcess() override final
Definition:
G4ScoringProcessTool.cxx:70
test_pyathena.parent
parent
Definition:
test_pyathena.py:15
G4ScoringProcessTool::ConstructParticle
virtual void ConstructParticle() override final
Definition:
G4ScoringProcessTool.cxx:65
G4ScoringProcessTool::initialize
virtual StatusCode initialize() override final
Initialize method.
Definition:
G4ScoringProcessTool.cxx:52
G4ScoringProcessTool::G4ScoringProcessTool
G4ScoringProcessTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition:
G4ScoringProcessTool.cxx:33
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
G4AtlasPhysicsOption::GlobalProcesses
@ GlobalProcesses
Definition:
IPhysicsOptionTool.h:25
G4ScoringProcessTool
Definition:
G4ScoringProcessTool.h:20
PARTICLEITERATOR
#define PARTICLEITERATOR
Definition:
G4ScoringProcessTool.cxx:27
python.CaloScaleNoiseConfig.type
type
Definition:
CaloScaleNoiseConfig.py:78
G4ScoringProcessTool.h
Generated on Mon Dec 23 2024 21:10:45 for ATLAS Offline Software by
1.8.18