Geant4 VMC
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
source
physics_list
src
TG4EmPhysicsList.cxx
Go to the documentation of this file.
1
//------------------------------------------------
2
// The Geant4 Virtual Monte Carlo package
3
// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4
// All rights reserved.
5
//
6
// For the licensing terms see geant4_vmc/LICENSE.
7
// Contact: root-vmc@cern.ch
8
//-------------------------------------------------
9
14
15
#include "
TG4EmPhysicsList.h
"
16
17
#include <G4DecayPhysics.hh>
18
#include <G4EmStandardPhysics.hh>
19
#include <G4SystemOfUnits.hh>
20
21
#include <G4ParticleDefinition.hh>
22
#include <G4ProcessManager.hh>
23
#include <G4ProcessTable.hh>
24
25
// According to G4VModularPhysicsList.cc
26
#include <G4StateManager.hh>
27
// This macros change the references to fields that are now encapsulated
28
// in the class G4VMPLData.
29
#define G4MT_physicsVector \
30
((G4VMPLsubInstanceManager.offset[g4vmplInstanceID]).physicsVector)
31
32
const
G4double
TG4EmPhysicsList::fgkDefaultCutValue
= 1.0 * mm;
33
34
//
35
// static methods
36
//
37
38
//_____________________________________________________________________________
39
G4String
TG4EmPhysicsList::AvailableSelections
()
40
{
42
43
G4String selections;
44
selections +=
"emStandard "
;
45
46
return
selections;
47
}
48
49
//_____________________________________________________________________________
50
G4bool
TG4EmPhysicsList::IsAvailableSelection
(
const
G4String& selection)
51
{
53
54
G4String available =
AvailableSelections
();
55
G4String checkSelection = selection;
56
checkSelection +=
" "
;
57
58
return
G4StrUtil::contains(available, checkSelection);
59
}
60
61
//
62
// ctors, dtor
63
//
64
65
//_____________________________________________________________________________
66
TG4EmPhysicsList::TG4EmPhysicsList
(
const
G4String& selection)
67
:
G4VModularPhysicsList
(),
TG4Verbose
(
"emPhysicsList"
)
68
{
70
71
Configure
(selection);
72
73
defaultCutValue =
fgkDefaultCutValue
;
74
75
SetVerboseLevel(
TG4Verbose::VerboseLevel
());
76
}
77
78
//_____________________________________________________________________________
79
TG4EmPhysicsList::~TG4EmPhysicsList
()
80
{
82
83
// delete fExtDecayer;
84
// fExtDecayer is deleted in G4Decay destructor
85
}
86
87
//
88
// private methods
89
//
90
91
//_____________________________________________________________________________
92
void
TG4EmPhysicsList::Configure
(
const
G4String&
/*selection*/
)
93
{
96
97
// Standard electromagnetic physics
98
RegisterPhysics(
new
G4EmStandardPhysics(1));
99
100
// decay physics
101
RegisterPhysics(
new
G4DecayPhysics());
102
}
103
104
//
105
// public methods
106
//
107
108
//_____________________________________________________________________________
109
void
TG4EmPhysicsList::ConstructProcess
()
110
{
112
113
// create processes for registered physics
114
G4VModularPhysicsList::ConstructProcess();
115
116
if
(
VerboseLevel
() > 0) G4cout <<
"### EM physics constructed. "
<< G4endl;
117
}
118
119
//_____________________________________________________________________________
120
G4int
TG4EmPhysicsList::VerboseLevel
()
const
121
{
123
124
return
TG4Verbose::VerboseLevel
();
125
}
126
127
//_____________________________________________________________________________
128
void
TG4EmPhysicsList::VerboseLevel
(G4int level)
129
{
133
134
TG4Verbose::VerboseLevel
(level);
135
SetVerboseLevel(level);
136
137
G4PhysConstVector::iterator it;
138
for
(it =
G4MT_physicsVector
->begin(); it !=
G4MT_physicsVector
->end();
139
++it) {
140
TG4Verbose
* verbose =
dynamic_cast<
TG4Verbose
*
>
(*it);
141
if
(verbose)
142
verbose->
VerboseLevel
(level);
143
else
144
(*it)->SetVerboseLevel(level);
145
}
146
}
147
148
//_____________________________________________________________________________
149
void
TG4EmPhysicsList::SetRangeCut
(G4double value)
150
{
155
156
defaultCutValue = value;
157
}
G4MT_physicsVector
#define G4MT_physicsVector
Definition
TG4EmPhysicsList.cxx:29
TG4EmPhysicsList.h
Definition of the TG4EmPhysicsList class.
G4VModularPhysicsList
TG4EmPhysicsList::~TG4EmPhysicsList
virtual ~TG4EmPhysicsList()
Definition
TG4EmPhysicsList.cxx:79
TG4EmPhysicsList::ConstructProcess
virtual void ConstructProcess()
Definition
TG4EmPhysicsList.cxx:109
TG4EmPhysicsList::Configure
void Configure(const G4String &)
Definition
TG4EmPhysicsList.cxx:92
TG4EmPhysicsList::IsAvailableSelection
static G4bool IsAvailableSelection(const G4String &selection)
Definition
TG4EmPhysicsList.cxx:50
TG4EmPhysicsList::TG4EmPhysicsList
TG4EmPhysicsList(const G4String &selection="emStandard")
Definition
TG4EmPhysicsList.cxx:66
TG4EmPhysicsList::AvailableSelections
static G4String AvailableSelections()
Definition
TG4EmPhysicsList.cxx:39
TG4EmPhysicsList::VerboseLevel
virtual G4int VerboseLevel() const
Definition
TG4EmPhysicsList.cxx:120
TG4EmPhysicsList::fgkDefaultCutValue
static const G4double fgkDefaultCutValue
default cut value
Definition
TG4EmPhysicsList.h:56
TG4EmPhysicsList::SetRangeCut
void SetRangeCut(G4double value)
Definition
TG4EmPhysicsList.cxx:149
TG4Verbose::VerboseLevel
virtual G4int VerboseLevel() const
Definition
TG4Verbose.h:78
TG4Verbose::VerboseLevel
virtual void VerboseLevel(G4int level)
Definition
TG4Verbose.h:72
TG4Verbose::TG4Verbose
TG4Verbose(const G4String &cmdName)
Definition
TG4Verbose.cxx:24
Generated on
for Geant4 VMC by
1.17.0