65 {
66
67
69
70
71
72
79 theNeutron.SetKineticEnergy( eKinetic );
80
81
88
99
100
103
104
105
106
107
108
109
110
111 theNeutron.Lorentz(theNeutron, -1*theTarget);
112
113
114
117
118
119
120 eKinetic = theNeutron.GetKineticEnergy();
122 xSec[0] = theFC.
GetXsec(eKinetic);
123 xSec[1] = xSec[0]+theSC.
GetXsec(eKinetic);
124 xSec[2] = xSec[1]+theTC.
GetXsec(eKinetic);
125 xSec[3] = xSec[2]+theLC.
GetXsec(eKinetic);
127 unsigned int i=0;
129 if(xSec[3]==0)
130 {
131 it=-1;
132 }
133 else
134 {
135 for(i=0; i<4; i++)
136 {
137 it =i;
138 if(random<xSec[i]/xSec[3]) break;
139 }
140 }
141
142
143
144
145
146 G4int Prompt=0, delayed=0, all=0;
148 switch(it)
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
179 if ( produceFissionFragments ) delayed=0;
180
182
183 if( theNeutrons != 0)
184 {
185 theDecayConstants =
new G4double[delayed];
186
187
188
189
190 for(i=0; i<theNeutrons->size(); i++)
191 {
193 }
194 delete theNeutrons;
195
197
198 theDelayed = theFS.
ApplyYourself(0, delayed, theDecayConstants);
199 for(i=0; i<theDelayed->size(); i++)
200 {
205 }
206 delete theDelayed;
207 }
208 else
209 {
210
212 theDecayConstants =
new G4double[delayed];
213 if(Prompt==0&&delayed==0) Prompt=all;
214 theNeutrons = theFS.
ApplyYourself(Prompt, delayed, theDecayConstants);
215
216
217
219 for(i0=0; i0<Prompt; i0++)
220 {
222 }
223
224
225 for(i0=Prompt; i0<Prompt+delayed; i0++)
226 {
227
229 if ( theDecayConstants[i0-Prompt] > 1.0e-30 ) {
231 } else {
233 ed << " theDecayConstants[i0-Prompt]=" << theDecayConstants[i0-Prompt]
234 <<
" -> cannot sample the time : set it to 0.0 !" <<
G4endl;
236 }
237
241 }
242 delete theNeutrons;
243 }
244 delete [] theDecayConstants;
245
246 unsigned int nPhotons = 0;
247 if(thePhotons!=0)
248 {
249 nPhotons = thePhotons->size();
250 for(i=0; i<nPhotons; i++)
251 {
253 }
254 delete thePhotons;
255 }
256
257
258
259
260
261
262
265
267
268
270
271
272
273
274 if ( produceFissionFragments )
275 {
279
283
284
285
286
287
289
292
293
295
297 G4double theta = std::acos(costheta);
299 G4ThreeVector direction(sinth*std::cos(phi), sinth*std::sin(phi), costheta);
300
301
311 }
312
313
315 }
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
virtual G4double GetXsec(G4double anEnergy)
void SetTarget(const G4ReactionProduct &aTarget)
void SetNeutronRP(const G4ReactionProduct &aNeutron)
G4double GetFragmentKinetic()
G4DynamicParticleVector * ApplyYourself(G4int NNeutrons)
G4bool GetProduceFissionFragments()
static G4ParticleHPManager * GetInstance()
G4DynamicParticleVector * ApplyYourself(G4int NNeutrons)
G4DynamicParticleVector * ApplyYourself(G4int NNeutrons)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)