Geant4 VMC
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
source
physics_list
src
TG4HadronPhysicsList.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 "
TG4HadronPhysicsList.h
"
16
17
#include <G4SystemOfUnits.hh>
18
19
#include "G4PhysListFactory.hh"
20
21
const
G4double
TG4HadronPhysicsList::fgkDefaultCutValue
= 1.0 * mm;
22
23
//
24
// static methods
25
//
26
27
//_____________________________________________________________________________
28
G4String
TG4HadronPhysicsList::AvailableHadronSelections
()
29
{
31
32
G4PhysListFactory phyListFactory;
33
const
std::vector<G4String>& availablePhysLists =
34
phyListFactory.AvailablePhysLists();
35
36
G4String selections;
37
for
(G4int i = 0; i < G4int(availablePhysLists.size()); ++i) {
38
selections += availablePhysLists[i];
39
selections +=
" "
;
40
}
41
// selections += "ShieldingLEND ";
42
43
return
selections;
44
}
45
46
//_____________________________________________________________________________
47
G4String
TG4HadronPhysicsList::AvailableEMSelections
()
48
{
50
51
G4PhysListFactory phyListFactory;
52
const
std::vector<G4String>& availablePhysListsEM =
53
phyListFactory.AvailablePhysListsEM();
54
55
G4String selections;
56
for
(G4int i = 0; i < G4int(availablePhysListsEM.size()); ++i) {
57
selections += availablePhysListsEM[i];
58
selections +=
" "
;
59
}
60
61
return
selections;
62
}
63
64
//_____________________________________________________________________________
65
G4bool
TG4HadronPhysicsList::IsAvailableSelection
(
const
G4String& selection)
66
{
68
69
G4PhysListFactory physListFactory;
70
return
physListFactory.IsReferencePhysList(selection);
71
}
72
73
//
74
// ctors, dtor
75
//
76
77
//_____________________________________________________________________________
78
TG4HadronPhysicsList::TG4HadronPhysicsList
(
const
G4String& selection)
79
:
G4VUserPhysicsList
(),
TG4Verbose
(
"hadronPhysicsList"
)
80
{
82
83
Configure
(selection);
84
85
defaultCutValue =
fgkDefaultCutValue
;
86
87
SetVerboseLevel(
TG4Verbose::VerboseLevel
());
88
}
89
90
//_____________________________________________________________________________
91
TG4HadronPhysicsList::~TG4HadronPhysicsList
()
92
{
94
95
// delete fExtDecayer;
96
// fExtDecayer is deleted in G4Decay destructor
97
}
98
99
//
100
// private methods
101
//
102
103
//_____________________________________________________________________________
104
void
TG4HadronPhysicsList::Configure
(
const
G4String& sel)
105
{
108
109
G4PhysListFactory phyListFactory;
110
111
fPhysicsList
= phyListFactory.GetReferencePhysList(sel);
112
}
113
114
//
115
// public methods
116
//
117
118
//_____________________________________________________________________________
119
void
TG4HadronPhysicsList::ConstructParticle
()
120
{
122
123
// create processes for registered physics
124
fPhysicsList
->ConstructParticle();
125
}
126
127
//_____________________________________________________________________________
128
void
TG4HadronPhysicsList::ConstructProcess
()
129
{
131
132
// create processes for registered physics
133
fPhysicsList
->ConstructProcess();
134
135
if
(
VerboseLevel
() > 0)
136
G4cout <<
"### Hadron physics constructed. "
<< G4endl;
137
}
138
139
//_____________________________________________________________________________
140
G4int
TG4HadronPhysicsList::VerboseLevel
()
const
141
{
143
144
return
TG4Verbose::VerboseLevel
();
145
}
146
147
//_____________________________________________________________________________
148
void
TG4HadronPhysicsList::VerboseLevel
(G4int level)
149
{
153
154
TG4Verbose::VerboseLevel
(level);
155
fPhysicsList
->SetVerboseLevel(level);
156
}
157
158
//_____________________________________________________________________________
159
void
TG4HadronPhysicsList::SetRangeCut
(G4double value)
160
{
165
166
defaultCutValue = value;
167
}
TG4HadronPhysicsList.h
Definition of the TG4HadronPhysicsList class.
G4VUserPhysicsList
TG4HadronPhysicsList::ConstructProcess
virtual void ConstructProcess()
Definition
TG4HadronPhysicsList.cxx:128
TG4HadronPhysicsList::Configure
void Configure(const G4String &selection)
Definition
TG4HadronPhysicsList.cxx:104
TG4HadronPhysicsList::~TG4HadronPhysicsList
virtual ~TG4HadronPhysicsList()
Definition
TG4HadronPhysicsList.cxx:91
TG4HadronPhysicsList::fPhysicsList
G4VUserPhysicsList * fPhysicsList
the physics list according to user selection
Definition
TG4HadronPhysicsList.h:71
TG4HadronPhysicsList::SetRangeCut
void SetRangeCut(G4double value)
Definition
TG4HadronPhysicsList.cxx:159
TG4HadronPhysicsList::AvailableHadronSelections
static G4String AvailableHadronSelections()
Definition
TG4HadronPhysicsList.cxx:28
TG4HadronPhysicsList::AvailableEMSelections
static G4String AvailableEMSelections()
Definition
TG4HadronPhysicsList.cxx:47
TG4HadronPhysicsList::VerboseLevel
virtual G4int VerboseLevel() const
Definition
TG4HadronPhysicsList.cxx:140
TG4HadronPhysicsList::ConstructParticle
virtual void ConstructParticle()
Definition
TG4HadronPhysicsList.cxx:119
TG4HadronPhysicsList::TG4HadronPhysicsList
TG4HadronPhysicsList(const G4String &selection)
Definition
TG4HadronPhysicsList.cxx:78
TG4HadronPhysicsList::fgkDefaultCutValue
static const G4double fgkDefaultCutValue
default cut value
Definition
TG4HadronPhysicsList.h:57
TG4HadronPhysicsList::IsAvailableSelection
static G4bool IsAvailableSelection(const G4String &selection)
Definition
TG4HadronPhysicsList.cxx:65
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