Geant4
10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadProcesses.cc
Go to the documentation of this file.
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
//---------------------------------------------------------------------------
27
//
28
// ClassName: G4HadProcesses
29
//
30
// Author: 8 July 2020 V.Ivanchenko
31
//
32
// Modified:
33
//
34
//----------------------------------------------------------------------------
35
//
36
37
#include "
G4HadProcesses.hh
"
38
#include "
G4SystemOfUnits.hh
"
39
#include "
G4PhysListUtil.hh
"
40
#include "
G4ParticleTable.hh
"
41
#include "
G4Neutron.hh
"
42
#include "
G4CrossSectionDataSetRegistry.hh
"
43
#include "
G4VCrossSectionDataSet.hh
"
44
#include "
G4ComponentGGHadronNucleusXsc.hh
"
45
#include "
G4ComponentGGNuclNuclXsc.hh
"
46
#include "
G4ComponentAntiNuclNuclearXS.hh
"
47
48
const
G4ParticleDefinition
*
G4HadProcesses::FindParticle
(
const
G4String
& pname)
49
{
50
return
G4ParticleTable::GetParticleTable
()->
FindParticle
(pname);
51
}
52
53
G4HadronicProcess
*
G4HadProcesses::FindInelasticProcess
(
const
G4ParticleDefinition
* ptr)
54
{
55
return
G4PhysListUtil::FindInelasticProcess
(ptr);
56
}
57
58
G4HadronicProcess
*
G4HadProcesses::FindInelasticProcess
(
const
G4String
& pname)
59
{
60
return
FindInelasticProcess
(
FindParticle
(pname) );
61
}
62
63
G4HadronicProcess
*
G4HadProcesses::FindElasticProcess
(
const
G4ParticleDefinition
* ptr)
64
{
65
return
G4PhysListUtil::FindElasticProcess
(ptr);
66
}
67
68
G4HadronicProcess
*
G4HadProcesses::FindElasticProcess
(
const
G4String
& pname)
69
{
70
return
FindElasticProcess
(
FindParticle
(pname) );
71
}
72
73
G4HadronicProcess
*
G4HadProcesses::FindCaptureProcess
()
74
{
75
return
G4PhysListUtil::FindCaptureProcess
(
G4Neutron::Neutron
());
76
}
77
78
G4HadronicProcess
*
G4HadProcesses::FindFissionProcess
()
79
{
80
return
G4PhysListUtil::FindFissionProcess
(
G4Neutron::Neutron
());
81
}
82
83
G4CrossSectionInelastic
*
G4HadProcesses::InelasticXS
(
const
G4String
& compName)
84
{
85
G4CrossSectionInelastic
* xs =
nullptr
;
86
auto
comp =
G4CrossSectionDataSetRegistry::Instance
()->
GetComponentCrossSection
(compName);
87
if
( comp !=
nullptr
) {
88
xs =
new
G4CrossSectionInelastic
(comp);
89
}
else
if
(
"Glauber-Gribov"
== compName ) {
90
xs =
new
G4CrossSectionInelastic
(
new
G4ComponentGGHadronNucleusXsc
());
91
}
else
if
(
"Glauber-Gribov Nucl-nucl"
== compName ) {
92
xs =
new
G4CrossSectionInelastic
(
new
G4ComponentGGNuclNuclXsc
());
93
}
else
if
(
"AntiAGlauber"
== compName ) {
94
xs =
new
G4CrossSectionInelastic
(
new
G4ComponentAntiNuclNuclearXS
());
95
}
96
return
xs;
97
}
98
99
G4CrossSectionElastic
*
G4HadProcesses::ElasticXS
(
const
G4String
& compName)
100
{
101
G4CrossSectionElastic
* xs =
nullptr
;
102
auto
comp =
G4CrossSectionDataSetRegistry::Instance
()->
GetComponentCrossSection
(compName);
103
if
( comp !=
nullptr
) {
104
xs =
new
G4CrossSectionElastic
(comp);
105
}
else
if
(
"Glauber-Gribov"
== compName ) {
106
xs =
new
G4CrossSectionElastic
(
new
G4ComponentGGHadronNucleusXsc
());
107
}
else
if
(
"Glauber-Gribov Nucl-nucl"
== compName ) {
108
xs =
new
G4CrossSectionElastic
(
new
G4ComponentGGNuclNuclXsc
());
109
}
else
if
(
"AntiAGlauber"
== compName ) {
110
xs =
new
G4CrossSectionElastic
(
new
G4ComponentAntiNuclNuclearXS
());
111
}
112
return
xs;
113
}
114
115
G4bool
G4HadProcesses::AddInelasticCrossSection
(
const
G4ParticleDefinition
* ptr,
116
G4VCrossSectionDataSet
* xs)
117
{
118
G4bool
isOK(
false
);
119
if
( ptr !=
nullptr
) {
120
G4HadronicProcess
* had =
FindInelasticProcess
( ptr );
121
if
( had !=
nullptr
) {
122
isOK =
true
;
123
had->
AddDataSet
( xs );
124
}
125
}
126
return
isOK;
127
}
128
129
G4bool
G4HadProcesses::AddInelasticCrossSection
(
const
G4String
& pname,
G4VCrossSectionDataSet
* xs)
130
{
131
return
AddInelasticCrossSection
(
FindParticle
(pname), xs );
132
}
133
134
G4bool
G4HadProcesses::AddElasticCrossSection
(
const
G4ParticleDefinition
* ptr,
G4VCrossSectionDataSet
* xs)
135
{
136
G4bool
isOK(
false
);
137
if
( ptr !=
nullptr
) {
138
G4HadronicProcess
* had =
FindElasticProcess
( ptr );
139
if
( had !=
nullptr
) {
140
isOK =
true
;
141
had->
AddDataSet
( xs );
142
}
143
}
144
return
isOK;
145
}
146
147
G4bool
G4HadProcesses::AddElasticCrossSection
(
const
G4String
& pname,
G4VCrossSectionDataSet
* xs)
148
{
149
return
AddElasticCrossSection
(
FindParticle
(pname), xs );
150
}
151
152
G4bool
G4HadProcesses::AddCaptureCrossSection
(
G4VCrossSectionDataSet
* xs)
153
{
154
G4bool
isOK(
false
);
155
G4HadronicProcess
* had =
FindCaptureProcess
();
156
if
( had !=
nullptr
) {
157
isOK =
true
;
158
had->
AddDataSet
( xs );
159
}
160
return
isOK;
161
}
162
163
G4bool
G4HadProcesses::AddFissionCrossSection
(
G4VCrossSectionDataSet
* xs)
164
{
165
G4bool
isOK(
false
);
166
G4HadronicProcess
* had =
FindFissionProcess
();
167
if
( had !=
nullptr
) {
168
isOK =
true
;
169
had->
AddDataSet
( xs );
170
}
171
return
isOK;
172
}
G4ComponentAntiNuclNuclearXS.hh
G4ComponentGGHadronNucleusXsc.hh
G4ComponentGGNuclNuclXsc.hh
G4CrossSectionDataSetRegistry.hh
G4HadProcesses.hh
G4Neutron.hh
G4ParticleTable.hh
G4PhysListUtil.hh
G4SystemOfUnits.hh
G4bool
bool G4bool
Definition:
G4Types.hh:86
G4VCrossSectionDataSet.hh
G4ComponentAntiNuclNuclearXS
Definition:
G4ComponentAntiNuclNuclearXS.hh:59
G4ComponentGGHadronNucleusXsc
Definition:
G4ComponentGGHadronNucleusXsc.hh:52
G4ComponentGGNuclNuclXsc
Definition:
G4ComponentGGNuclNuclXsc.hh:53
G4CrossSectionDataSetRegistry::GetComponentCrossSection
G4VComponentCrossSection * GetComponentCrossSection(const G4String &name)
Definition:
G4CrossSectionDataSetRegistry.cc:206
G4CrossSectionDataSetRegistry::Instance
static G4CrossSectionDataSetRegistry * Instance()
Definition:
G4CrossSectionDataSetRegistry.cc:77
G4CrossSectionElastic
Definition:
G4CrossSectionElastic.hh:61
G4CrossSectionInelastic
Definition:
G4CrossSectionInelastic.hh:61
G4HadProcesses::AddElasticCrossSection
static G4bool AddElasticCrossSection(const G4ParticleDefinition *, G4VCrossSectionDataSet *)
Definition:
G4HadProcesses.cc:134
G4HadProcesses::ElasticXS
static G4CrossSectionElastic * ElasticXS(const G4String &componentName)
Definition:
G4HadProcesses.cc:99
G4HadProcesses::FindInelasticProcess
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
Definition:
G4HadProcesses.cc:53
G4HadProcesses::FindParticle
static const G4ParticleDefinition * FindParticle(const G4String &)
Definition:
G4HadProcesses.cc:48
G4HadProcesses::AddFissionCrossSection
static G4bool AddFissionCrossSection(G4VCrossSectionDataSet *)
Definition:
G4HadProcesses.cc:163
G4HadProcesses::FindCaptureProcess
static G4HadronicProcess * FindCaptureProcess()
Definition:
G4HadProcesses.cc:73
G4HadProcesses::FindInelasticProcess
static G4HadronicProcess * FindInelasticProcess(const G4String &)
Definition:
G4HadProcesses.cc:58
G4HadProcesses::AddInelasticCrossSection
static G4bool AddInelasticCrossSection(const G4ParticleDefinition *, G4VCrossSectionDataSet *)
Definition:
G4HadProcesses.cc:115
G4HadProcesses::AddCaptureCrossSection
static G4bool AddCaptureCrossSection(G4VCrossSectionDataSet *)
Definition:
G4HadProcesses.cc:152
G4HadProcesses::FindFissionProcess
static G4HadronicProcess * FindFissionProcess()
Definition:
G4HadProcesses.cc:78
G4HadProcesses::InelasticXS
static G4CrossSectionInelastic * InelasticXS(const G4String &componentName)
Definition:
G4HadProcesses.cc:83
G4HadProcesses::FindElasticProcess
static G4HadronicProcess * FindElasticProcess(const G4ParticleDefinition *)
Definition:
G4HadProcesses.cc:63
G4HadronicProcess
Definition:
G4HadronicProcess.hh:69
G4HadronicProcess::AddDataSet
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
Definition:
G4HadronicProcess.cc:769
G4Neutron::Neutron
static G4Neutron * Neutron()
Definition:
G4Neutron.cc:103
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:60
G4ParticleTable::FindParticle
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
Definition:
G4ParticleTable.cc:586
G4ParticleTable::GetParticleTable
static G4ParticleTable * GetParticleTable()
Definition:
G4ParticleTable.cc:87
G4PhysListUtil::FindElasticProcess
static G4HadronicProcess * FindElasticProcess(const G4ParticleDefinition *)
Definition:
G4PhysListUtil.cc:76
G4PhysListUtil::FindInelasticProcess
static G4HadronicProcess * FindInelasticProcess(const G4ParticleDefinition *)
Definition:
G4PhysListUtil.cc:58
G4PhysListUtil::FindCaptureProcess
static G4HadronicProcess * FindCaptureProcess(const G4ParticleDefinition *)
Definition:
G4PhysListUtil.cc:94
G4PhysListUtil::FindFissionProcess
static G4HadronicProcess * FindFissionProcess(const G4ParticleDefinition *)
Definition:
G4PhysListUtil.cc:112
G4String
Definition:
G4String.hh:53
G4VCrossSectionDataSet
Definition:
G4VCrossSectionDataSet.hh:70
geant4-v10.7.0
source
physics_lists
util
src
G4HadProcesses.cc
Generated by
1.9.6