76 {
77
79
80
87 theNeutron.SetKineticEnergy( eKinetic );
88
89
96
97
110
111
112 theNeutron.Lorentz(theNeutron, -1*theTarget);
113
114
115
118
119
120
121 eKinetic = theNeutron.GetKineticEnergy();
123 xSec[0] = theFC.
GetXsec(eKinetic);
124 xSec[1] = xSec[0]+theSC.
GetXsec(eKinetic);
125 xSec[2] = xSec[1]+theTC.
GetXsec(eKinetic);
126 xSec[3] = xSec[2]+theLC.
GetXsec(eKinetic);
128 unsigned int i=0;
130 if(xSec[3]==0)
131 {
132 it=-1;
133 }
134 else
135 {
136 for(i=0; i<4; i++)
137 {
138 it =i;
139 if(random<xSec[i]/xSec[3]) break;
140 }
141 }
142
143
144
145
146
147 G4int Prompt=0, delayed=0, all=0;
149 switch(it)
150 {
151 case 0:
153 if(Prompt==0&&delayed==0) Prompt=all;
155
156 break;
157 case 1:
159 if(Prompt==0&&delayed==0) Prompt=all;
161 break;
162 case 2:
164 if(Prompt==0&&delayed==0) Prompt=all;
166 break;
167 case 3:
169 if(Prompt==0&&delayed==0) Prompt=all;
171 break;
172 default:
173 break;
174 }
175
176
177
178
179 if ( produceFissionFragments ) delayed=0;
180
182
183 if( theNeutrons != 0)
184 {
185 theDecayConstants =
new G4double[delayed];
186 for(i=0; i<theNeutrons->size(); ++i)
187 {
189 }
190 delete theNeutrons;
191
193 theDelayed = theFS.
ApplyYourself(0, delayed, theDecayConstants);
194 for(i=0; i<theDelayed->size(); i++)
195 {
200 }
201 delete theDelayed;
202 }
203 else
204 {
206 theDecayConstants =
new G4double[delayed];
207 if(Prompt==0&&delayed==0) Prompt=all;
208 theNeutrons = theFS.
ApplyYourself(Prompt, delayed, theDecayConstants);
210 for(i0=0; i0<Prompt; ++i0)
211 {
213 }
214
215 for(i0=Prompt; i0<Prompt+delayed; ++i0)
216 {
217
219 if ( theDecayConstants[i0-Prompt] > 1.0e-30 ) {
221 } else {
223 ed << " theDecayConstants[i0-Prompt]=" << theDecayConstants[i0-Prompt]
224 <<
" -> cannot sample the time : set it to 0.0 !" <<
G4endl;
226 }
227
231 }
232 delete theNeutrons;
233 }
234 delete [] theDecayConstants;
235
236 std::size_t nPhotons = 0;
237 if(thePhotons!=0)
238 {
239 nPhotons = thePhotons->size();
240 for(i=0; i<nPhotons; ++i)
241 {
243 }
244 delete thePhotons;
245 }
246
247
248
251
253
255
256 if ( produceFissionFragments )
257 {
261
265
267
270
271
273
275 G4double theta = std::acos(costheta);
277 G4ThreeVector direction(sinth*std::cos(phi), sinth*std::sin(phi), costheta);
278
279
289 }
290
292 }
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)