Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
examples
extended
hadronic
Hadr02
src
HadronPhysicsUrQMD.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
//
28
//
29
// $Id$
30
//
31
//---------------------------------------------------------------------------
32
//
33
// ClassName:
34
//
35
// Author: 2012 A. Dotti
36
// created from HadronPhysicsUrQMD
37
//
38
// Modified:
39
//
40
//----------------------------------------------------------------------------
41
//
42
#ifdef G4_USE_URQMD
43
#include "
HadronPhysicsUrQMD.hh
"
44
45
#include "
globals.hh
"
46
#include "
G4ios.hh
"
47
#include <iomanip>
48
#include "
G4ParticleDefinition.hh
"
49
#include "
G4ParticleTable.hh
"
50
51
#include "
G4MesonConstructor.hh
"
52
#include "
G4BaryonConstructor.hh
"
53
#include "
G4ShortLivedConstructor.hh
"
54
55
#include "
G4QHadronInelasticDataSet.hh
"
56
#include "
G4ProcessManager.hh
"
57
58
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
59
60
HadronPhysicsUrQMD::HadronPhysicsUrQMD
(
G4int
)
61
:
G4VPhysicsConstructor
(
"hInelastic UrQMD"
)
62
{
63
fNeutrons = 0;
64
fUrQMDNeutron = 0;
65
fLEPNeutron = 0;
66
fPiK = 0;
67
fUrQMDPiK = 0;
68
fPro = 0;
69
fUrQMDPro = 0;
70
fHyperon = 0;
71
fAntiBaryon = 0;
72
fUrQMDAntiBaryon = 0;
73
fCHIPSInelastic = 0;
74
}
75
76
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
77
78
void
HadronPhysicsUrQMD::CreateModels()
79
{
80
fNeutrons=
new
G4NeutronBuilder
;
81
fUrQMDNeutron=
new
UrQMDNeutronBuilder
();
82
fNeutrons->
RegisterMe
(fUrQMDNeutron);
83
//Need LEP for capture process
84
fNeutrons->
RegisterMe
(fLEPNeutron=
new
G4LEPNeutronBuilder
);
85
fLEPNeutron->
SetMinInelasticEnergy
(0.0*
eV
);
// no inelastic from LEP
86
fLEPNeutron->
SetMaxInelasticEnergy
(0.0*
eV
);
87
88
fPro=
new
G4ProtonBuilder
;
89
fUrQMDPro=
new
UrQMDProtonBuilder
();
90
fPro->
RegisterMe
(fUrQMDPro);
91
92
fPiK=
new
G4PiKBuilder
;
93
fUrQMDPiK=
new
UrQMDPiKBuilder
();
94
fPiK->
RegisterMe
(fUrQMDPiK);
95
96
//For Hyperons use FTF model
97
fHyperon=
new
G4HyperonFTFPBuilder
;
98
99
fAntiBaryon=
new
G4AntiBarionBuilder
;
100
fUrQMDAntiBaryon=
new
UrQMDAntiBarionBuilder
();
101
fAntiBaryon->
RegisterMe
( fUrQMDAntiBaryon );
102
}
103
104
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105
106
HadronPhysicsUrQMD::~HadronPhysicsUrQMD
()
107
{
108
delete
fNeutrons;
109
delete
fUrQMDNeutron;
110
delete
fLEPNeutron;
111
112
delete
fPiK;
113
delete
fUrQMDPiK;
114
115
delete
fPro;
116
delete
fUrQMDPro;
117
118
delete
fHyperon;
119
delete
fAntiBaryon;
120
delete
fUrQMDAntiBaryon;
121
122
delete
fCHIPSInelastic;
123
}
124
125
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
126
127
void
HadronPhysicsUrQMD::ConstructParticle
()
128
{
129
G4MesonConstructor
pMesonConstructor;
130
pMesonConstructor.
ConstructParticle
();
131
132
G4BaryonConstructor
pBaryonConstructor;
133
pBaryonConstructor.
ConstructParticle
();
134
135
G4ShortLivedConstructor
pShortLivedConstructor;
136
pShortLivedConstructor.
ConstructParticle
();
137
}
138
139
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
140
141
void
HadronPhysicsUrQMD::ConstructProcess
()
142
{
143
CreateModels();
144
fNeutrons->
Build
();
145
fPro->
Build
();
146
fPiK->
Build
();
147
// use CHIPS cross sections also for Kaons
148
fCHIPSInelastic =
new
G4QHadronInelasticDataSet
();
149
150
FindInelasticProcess(
G4KaonMinus::KaonMinus
())->
AddDataSet
(fCHIPSInelastic);
151
FindInelasticProcess(
G4KaonPlus::KaonPlus
())->
AddDataSet
(fCHIPSInelastic);
152
FindInelasticProcess(
G4KaonZeroShort::KaonZeroShort
())->
AddDataSet
(fCHIPSInelastic);
153
FindInelasticProcess(
G4KaonZeroLong::KaonZeroLong
())->
AddDataSet
(fCHIPSInelastic);
154
155
fHyperon->
Build
();
156
fAntiBaryon->
Build
();
157
}
158
159
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
160
161
G4HadronicProcess
*
162
HadronPhysicsUrQMD::FindInelasticProcess(
const
G4ParticleDefinition
*
p
)
163
{
164
G4HadronicProcess
* had = 0;
165
if
(p) {
166
G4ProcessVector
* pvec = p->
GetProcessManager
()->
GetProcessList
();
167
size_t
n
= pvec->
size
();
168
if
(0 < n) {
169
for
(
size_t
i=0; i<
n
; ++i) {
170
if
(
fHadronInelastic
== ((*pvec)[i])->GetProcessSubType()) {
171
had =
static_cast<
G4HadronicProcess
*
>
((*pvec)[i]);
172
break
;
173
}
174
}
175
}
176
}
177
return
had;
178
}
179
180
#endif //G4_USE_URQMD
Generated on Sat May 25 2013 14:32:57 for Geant4 by
1.8.4