73{
74
76
77
85 theNeutron.SetKineticEnergy(eKinetic);
86
87
92 (1. / incidentParticle->
GetDefinition()->GetPDGMass()) * theNeutron.GetMomentum();
93 theTarget =
97
98
111
112
113 theNeutron.Lorentz(theNeutron, -1 * theTarget);
114
115
116
119
120
121
122 eKinetic = theNeutron.GetKineticEnergy();
124 xSec[0] = theFC.
GetXsec(eKinetic);
125 xSec[1] = xSec[0] + theSC.
GetXsec(eKinetic);
126 xSec[2] = xSec[1] + theTC.
GetXsec(eKinetic);
127 xSec[3] = xSec[2] + theLC.
GetXsec(eKinetic);
129 unsigned int i = 0;
131 if (xSec[3] == 0) {
132 it = -1;
133 }
134 else {
135 for (i = 0; i < 4; i++) {
136 it = i;
137 if (random < xSec[i] / xSec[3]) break;
138 }
139 }
140
141
142
143
144
145 G4int Prompt = 0, delayed = 0, all = 0;
147 switch (it)
148
149 {
150 case 0:
152 if (Prompt == 0 && delayed == 0) Prompt = all;
154
155 break;
156 case 1:
158 if (Prompt == 0 && delayed == 0) Prompt = all;
160 break;
161 case 2:
163 if (Prompt == 0 && delayed == 0) Prompt = all;
165 break;
166 case 3:
168 if (Prompt == 0 && delayed == 0) Prompt = all;
170 break;
171 default:
172 break;
173 }
174
175
176
177
178 if (produceFissionFragments) delayed = 0;
179
181
182 if (theNeutrons != nullptr) {
183 theDecayConstants =
new G4double[delayed];
184 for (i = 0; i < theNeutrons->size(); ++i) {
186 }
187 delete theNeutrons;
188
190 theDelayed = theFS.
ApplyYourself(0, delayed, theDecayConstants);
191 for (i = 0; i < theDelayed->size(); i++) {
196 }
197 delete theDelayed;
198 }
199 else {
201 theDecayConstants =
new G4double[delayed];
202 if (Prompt == 0 && delayed == 0) Prompt = all;
203 theNeutrons = theFS.
ApplyYourself(Prompt, delayed, theDecayConstants);
205 for (i0 = 0; i0 < Prompt; ++i0) {
207 }
208
209 for (i0 = Prompt; i0 < Prompt + delayed; ++i0) {
210
212 if (theDecayConstants[i0 - Prompt] > 1.0e-30) {
214 }
215 else {
217 ed << " theDecayConstants[i0-Prompt]=" << theDecayConstants[i0 - Prompt]
218 <<
" -> cannot sample the time : set it to 0.0 !" <<
G4endl;
220 }
221
225 }
226 delete theNeutrons;
227 }
228 delete[] theDecayConstants;
229
230 std::size_t nPhotons = 0;
231 if (thePhotons != nullptr) {
232 nPhotons = thePhotons->size();
233 for (i = 0; i < nPhotons; ++i) {
235 }
236 delete thePhotons;
237 }
238
239
240
243
245
247
248 if (produceFissionFragments) {
252
257
259
262
263
265
267 G4double theta = std::acos(costheta);
269 G4ThreeVector direction(sinth * std::cos(phi), sinth * std::sin(phi), costheta);
270
271
281 }
282
284}
std::vector< G4DynamicParticle * > G4DynamicParticleVector
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4double G4Log(G4double x)
void Put(const value_type &val) const
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
std::size_t GetNumberOfSecondaries() const
G4HadSecondary * GetSecondary(size_t i)
void SetLocalEnergyDeposit(G4double aE)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double GetGlobalTime() const
void SetTime(G4double aT)
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4IonTable * GetIonTable()
G4double GetTemperature() const
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
G4double GetPDGMass() const
G4DynamicParticleVector * ApplyYourself(G4int nNeutrons)
void GetAFissionFragment(G4double, G4int &, G4int &, G4int &)
G4DynamicParticleVector * ApplyYourself(G4int Prompt, G4int delayed, G4double *decayconst)
void SampleNeutronMult(G4int &all, G4int &Prompt, G4int &delayed, G4double energy, G4int off)
G4ParticleHPFissionERelease * GetEnergyRelease()
void SetNeutronRP(const G4ReactionProduct &aNeutron)
void SetTarget(const G4ReactionProduct &aTarget)
G4DynamicParticleVector * GetPhotons()
G4Cache< G4HadFinalState * > theResult
G4double GetXsec(G4double anEnergy) override
void SetTarget(const G4ReactionProduct &aTarget)
void SetNeutronRP(const G4ReactionProduct &aNeutron)
G4double GetFragmentKinetic()
G4DynamicParticleVector * ApplyYourself(G4int NNeutrons)
G4bool GetProduceFissionFragments() const
static G4ParticleHPManager * GetInstance()
G4DynamicParticleVector * ApplyYourself(G4int NNeutrons)
G4DynamicParticleVector * ApplyYourself(G4int NNeutrons)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)