44 outFile <<
"G4HENeutronInelastic is one of the High Energy\n"
45 <<
"Parameterized (HEP) models used to implement inelastic\n"
46 <<
"neutron scattering from nuclei. It is a re-engineered\n"
47 <<
"version of the GHEISHA code of H. Fesefeldt. It divides the\n"
48 <<
"initial collision products into backward- and forward-going\n"
49 <<
"clusters which are then decayed into final state hadrons.\n"
50 <<
"The model does not conserve energy on an event-by-event\n"
51 <<
"basis. It may be applied to neutrons with initial energies\n"
76 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass;
78 if (incidentKineticEnergy < 1.)
79 G4cout <<
"GHENeutronInelastic: incident energy < 1 GeV" <<
G4endl;
82 G4cout <<
"G4HENeutronInelastic::ApplyYourself" <<
G4endl;
84 <<
"mass " << incidentMass
85 <<
"kinetic energy " << incidentKineticEnergy
87 G4cout <<
"target material with (A,Z) = ("
88 << atomicWeight <<
"," << atomicNumber <<
")" <<
G4endl;
92 atomicWeight, atomicNumber);
94 G4cout <<
"nuclear inelasticity = " << inelasticity <<
G4endl;
96 incidentKineticEnergy -= inelasticity;
102 atomicWeight, atomicNumber,
104 excitationEnergyDTA);
106 G4cout <<
"nuclear excitation = " << excitation << excitationEnergyGNP
107 << excitationEnergyDTA <<
G4endl;
109 incidentKineticEnergy -= excitation;
110 incidentTotalEnergy = incidentKineticEnergy + incidentMass;
123 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass
124 + targetMass*targetMass
125 + 2.0*targetMass*incidentTotalEnergy);
126 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
139 G4cout <<
"ApplyYourself: CallFirstIntInCascade for particle "
140 << incidentCode <<
G4endl;
142 G4bool successful =
false;
145 incidentParticle, targetParticle, atomicWeight);
148 G4cout <<
"ApplyYourself::StrangeParticlePairProduction" <<
G4endl;
150 if ((
vecLength > 0) && (availableEnergy > 1.))
153 incidentParticle, targetParticle);
156 excitationEnergyGNP, excitationEnergyDTA,
157 incidentParticle, targetParticle,
158 atomicWeight, atomicNumber);
161 excitationEnergyGNP, excitationEnergyDTA,
162 incidentParticle, targetParticle,
163 atomicWeight, atomicNumber);
166 excitationEnergyGNP, excitationEnergyDTA,
167 incidentParticle, targetParticle,
168 atomicWeight, atomicNumber);
172 excitationEnergyGNP, excitationEnergyDTA,
173 incidentParticle, targetParticle,
174 atomicWeight, atomicNumber);
177 excitationEnergyGNP, excitationEnergyDTA,
178 incidentParticle, targetParticle,
179 atomicWeight, atomicNumber);
183 atomicWeight, atomicNumber);
186 G4cout <<
"GHEInelasticInteraction::ApplyYourself fails to produce final state particles"
214 static const G4double expxl = -expxu;
220 static const G4int numMul = 1200;
221 static const G4int numSec = 60;
229 static G4bool first =
true;
230 static G4double protmul[numMul], protnorm[numSec];
231 static G4double neutmul[numMul], neutnorm[numSec];
236 G4int i, counter, nt, npos, nneg, nzero;
241 for (i = 0; i < numMul; i++) protmul[i] = 0.0;
242 for (i = 0; i < numSec; i++) protnorm[i] = 0.0;
244 for (npos = 0; npos < (numSec/3); npos++) {
245 for (nneg = std::max(0,npos-1); nneg <= (npos+1); nneg++) {
246 for( nzero=0; nzero<numSec/3; nzero++ )
248 if( ++counter < numMul )
250 nt = npos+nneg+nzero;
251 if( (nt>0) && (nt<=numSec) )
253 protmul[counter] =
pmltpc(npos,nneg,nzero,nt,protb,c)
255 protnorm[nt-1] += protmul[counter];
262 for( i=0; i<numMul; i++ )neutmul[i] = 0.0;
263 for( i=0; i<numSec; i++ )neutnorm[i] = 0.0;
265 for( npos=0; npos<numSec/3; npos++ )
267 for( nneg=npos; nneg<=(npos+2); nneg++ )
269 for( nzero=0; nzero<numSec/3; nzero++ )
271 if( ++counter < numMul )
273 nt = npos+nneg+nzero;
274 if( (nt>0) && (nt<=numSec) )
276 neutmul[counter] =
pmltpc(npos,nneg,nzero,nt,neutb,c)
278 neutnorm[nt-1] += neutmul[counter];
284 for( i=0; i<numSec; i++ )
286 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
287 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
294 pv[0] = incidentParticle;
295 pv[1] = targetParticle;
300 if( targetCode == protonCode )
302 G4double cech[] = {0.50, 0.45, 0.40, 0.35, 0.30, 0.25, 0.06, 0.04, 0.005, 0.};
303 G4int iplab =
G4int( std::min( 9.0, incidentTotalMomentum*2.5) );
304 if(
G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42) )
317 npos = 0, nneg = 0, nzero = 0;
321 G4double supp[] = {0., 0.4, 0.55, 0.65, 0.75, 0.82, 0.86, 0.90, 0.94, 0.98};
329 w0 = -
sqr(1.+neutb)/(2.*c*c);
330 wm = w0 = std::exp(w0);
333 { npos = 0; nneg = 0; nzero = 1; }
335 { npos = 0; nneg = 1; nzero = 0; }
339 w0 = -
sqr(1.+protb)/(2.*c*c);
342 wm = -
sqr(-1.+protb)/(2.*c*c);
343 wm = std::exp(wm)/2.;
348 { npos = 0; nneg = 0; nzero = 1; }
349 else if( ran < wp/wt)
350 { npos = 1; nneg = 0; nzero = 0; }
352 { npos = 0; nneg = 1; nzero = 0; }
359 G4double aleab = std::log(availableEnergy);
360 G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
361 + aleab*(0.117712+0.0136912*aleab))) - 2.0;
367 for (nt=1; nt<=numSec; nt++) {
368 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
369 dum = pi*nt/(2.0*n*n);
370 if (std::fabs(dum) < 1.0) {
371 if( test >= 1.0e-10 )anpn += dum*test;
379 if( targetCode == protonCode )
382 for (npos=0; npos<numSec/3; npos++) {
383 for (nneg=std::max(0,npos-1); nneg<=(npos+1); nneg++) {
384 for (nzero=0; nzero<numSec/3; nzero++) {
385 if (++counter < numMul) {
386 nt = npos+nneg+nzero;
387 if ( (nt>0) && (nt<=numSec) ) {
388 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
389 dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
390 if (std::fabs(dum) < 1.0) {
391 if( test >= 1.0e-10 )excs += dum*test;
395 if (ran < excs)
goto outOfLoop;
409 for (npos=0; npos<numSec/3; npos++) {
410 for (nneg=npos; nneg<=(npos+2); nneg++) {
411 for (nzero=0; nzero<numSec/3; nzero++) {
412 if (++counter < numMul) {
413 nt = npos+nneg+nzero;
414 if ( (nt>=1) && (nt<=numSec) ) {
415 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
416 dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
417 if (std::fabs(dum) < 1.0) {
418 if( test >= 1.0e-10 )excs += dum*test;
422 if (ran < excs)
goto outOfLoop;
440 else if (npos == (nneg-1))
470 else if ( npos == (1+nneg))
481 nt = npos + nneg + nzero;
492 else if ( ran < (
G4double)(npos+nneg)/nt)
508 nt = npos + nneg + nzero;
512 G4cout <<
"Particles produced: " ;
515 for (i=2; i < vecLen; i++)
G4DLLIMPORT std::ostream G4cout
G4double pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
void MediumEnergyClusterProduction(G4bool &successful, G4HEVector pv[], G4int &vecLen, G4double &excitationEnergyGNP, G4double &excitationEnergyDTA, const G4HEVector &incidentParticle, const G4HEVector &targetParticle, G4double atomicWeight, G4double atomicNumber)
void ElasticScattering(G4bool &successful, G4HEVector pv[], G4int &vecLen, const G4HEVector &incidentParticle, G4double atomicWeight, G4double atomicNumber)
void QuasiElasticScattering(G4bool &successful, G4HEVector pv[], G4int &vecLen, G4double &excitationEnergyGNP, G4double &excitationEnergyDTA, const G4HEVector &incidentParticle, const G4HEVector &targetParticle, G4double atomicWeight, G4double atomicNumber)
void FillParticleChange(G4HEVector pv[], G4int aVecLength)
void HighEnergyClusterProduction(G4bool &successful, G4HEVector pv[], G4int &vecLen, G4double &excitationEnergyGNP, G4double &excitationEnergyDTA, const G4HEVector &incidentParticle, const G4HEVector &targetParticle, G4double atomicWeight, G4double atomicNumber)
G4double NuclearExcitation(G4double incidentKineticEnergy, G4double atomicWeight, G4double atomicNumber, G4double &excitationEnergyCascade, G4double &excitationEnergyEvaporation)
void MediumEnergyCascading(G4bool &successful, G4HEVector pv[], G4int &vecLen, G4double &excitationEnergyGNP, G4double &excitationEnergyDTA, const G4HEVector &incidentParticle, const G4HEVector &targetParticle, G4double atomicWeight, G4double atomicNumber)
G4double NuclearInelasticity(G4double incidentKineticEnergy, G4double atomicWeight, G4double atomicNumber)
void StrangeParticlePairProduction(const G4double availableEnergy, const G4double centerOfMassEnergy, G4HEVector pv[], G4int &vecLen, const G4HEVector &incidentParticle, const G4HEVector &targetParticle)
void HighEnergyCascading(G4bool &successful, G4HEVector pv[], G4int &vecLen, G4double &excitationEnergyGNP, G4double &excitationEnergyDTA, const G4HEVector &incidentParticle, const G4HEVector &targetParticle, G4double atomicWeight, G4double atomicNumber)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
virtual void ModelDescription(std::ostream &) const
void FirstIntInCasNeutron(G4bool &inElastic, const G4double availableEnergy, G4HEVector pv[], G4int &vecLen, const G4HEVector &incidentParticle, const G4HEVector &targetParticle, const G4double atomicWeight)
G4double getEnergy() const
G4double getTotalMomentum() const
void setDefinition(G4String name)
void SetStatusChange(G4HadFinalStateStatus aS)
G4HadFinalState theParticleChange