46 outFile <<
"G4HEPionMinusInelastic is one of the High Energy\n"
47 <<
"Parameterized (HEP) models used to implement inelastic\n"
48 <<
"pi- scattering from nuclei. It is a re-engineered\n"
49 <<
"version of the GHEISHA code of H. Fesefeldt. It divides the\n"
50 <<
"initial collision products into backward- and forward-going\n"
51 <<
"clusters which are then decayed into final state hadrons.\n"
52 <<
"The model does not conserve energy on an event-by-event\n"
53 <<
"basis. It may be applied to pi- with initial energies\n"
78 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass;
80 if (incidentKineticEnergy < 1.)
81 G4cout <<
"GHEPionMinusInelastic: incident energy < 1 GeV" <<
G4endl;
84 G4cout <<
"G4HEPionMinusInelastic::ApplyYourself" <<
G4endl;
86 <<
"mass " << incidentMass
87 <<
"kinetic energy " << incidentKineticEnergy
89 G4cout <<
"target material with (A,Z) = ("
90 << atomicWeight <<
"," << atomicNumber <<
")" <<
G4endl;
94 atomicWeight, atomicNumber);
96 G4cout <<
"nuclear inelasticity = " << inelasticity <<
G4endl;
98 incidentKineticEnergy -= inelasticity;
104 atomicWeight, atomicNumber,
106 excitationEnergyDTA);
108 G4cout <<
"nuclear excitation = " << excitation << excitationEnergyGNP
109 << excitationEnergyDTA <<
G4endl;
111 incidentKineticEnergy -= excitation;
112 incidentTotalEnergy = incidentKineticEnergy + incidentMass;
126 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass
127 + targetMass*targetMass
128 + 2.0*targetMass*incidentTotalEnergy);
129 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
143 G4cout <<
"ApplyYourself: CallFirstIntInCascade for particle "
144 << incidentCode <<
G4endl;
146 G4bool successful =
false;
149 incidentParticle, targetParticle);
152 G4cout <<
"ApplyYourself::StrangeParticlePairProduction" <<
G4endl;
154 if ((
vecLength > 0) && (availableEnergy > 1.))
157 incidentParticle, targetParticle);
160 excitationEnergyGNP, excitationEnergyDTA,
161 incidentParticle, targetParticle,
162 atomicWeight, atomicNumber);
165 excitationEnergyGNP, excitationEnergyDTA,
166 incidentParticle, targetParticle,
167 atomicWeight, atomicNumber);
170 excitationEnergyGNP, excitationEnergyDTA,
171 incidentParticle, targetParticle,
172 atomicWeight, atomicNumber);
176 excitationEnergyGNP, excitationEnergyDTA,
177 incidentParticle, targetParticle,
178 atomicWeight, atomicNumber);
181 excitationEnergyGNP, excitationEnergyDTA,
182 incidentParticle, targetParticle,
183 atomicWeight, atomicNumber);
187 atomicWeight, atomicNumber);
190 G4cout <<
"GHEInelasticInteraction::ApplyYourself fails to produce final state particles"
217 static const G4double expxl = -expxu;
223 static const G4int numMul = 1200;
224 static const G4int numSec = 60;
230 static G4bool first =
true;
231 static G4double protmul[numMul], protnorm[numSec];
232 static G4double neutmul[numMul], neutnorm[numSec];
237 G4int i, counter, nt, npos, nneg, nero;
242 for( i=0; i<numMul; i++ )protmul[i] = 0.0;
243 for( i=0; i<numSec; i++ )protnorm[i] = 0.0;
245 for( npos=0; npos<(numSec/3); npos++ )
247 for( nneg=
Imax(0,npos-1); nneg<=(npos+1); nneg++ )
249 for( nero=0; nero<numSec/3; nero++ )
251 if( ++counter < numMul )
254 if( (nt>0) && (nt<=numSec) )
257 pmltpc(npos,nneg,nero,nt,protb,c) ;
258 protnorm[nt-1] += protmul[counter];
264 for( i=0; i<numMul; i++ )neutmul[i] = 0.0;
265 for( i=0; i<numSec; i++ )neutnorm[i] = 0.0;
267 for( npos=0; npos<numSec/3; npos++ )
269 for( nneg=npos; nneg<=(npos+2); nneg++ )
271 for( nero=0; nero<numSec/3; nero++ )
273 if( ++counter < numMul )
276 if( (nt>0) && (nt<=numSec) )
279 pmltpc(npos,nneg,nero,nt,neutb,c);
280 neutnorm[nt-1] += neutmul[counter];
286 for( i=0; i<numSec; i++ )
288 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
289 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
296 pv[0] = incidentParticle;
297 pv[1] = targetParticle;
306 npos = 0, nneg = 0, nero = 0;
310 G4double supp[] = {0., 0.4, 0.55, 0.65, 0.75, 0.82, 0.86, 0.90, 0.94, 0.98};
315 G4double cech[] = {1., 0.95, 0.79, 0.32, 0.19, 0.16, 0.14, 0.12, 0.10, 0.08};
319 if( targetCode == protonCode )
332 if( targetCode == protonCode )
334 w0 = -
sqr(1.+protb)/(2.*c*c);
335 wp = w0 = std::exp(w0);
336 wm = -
sqr(-1.+protb)/(2.*c*c);
343 { npos = 0; nneg = 0; nero = 1; }
344 else if ( ran < wp/wt )
345 { npos = 1; nneg = 0; nero = 0; }
347 { npos = 0; nneg = 1; nero = 0; }
351 w0 = -
sqr(1.+neutb)/(2.*c*c);
352 wm = -
sqr(-1.+neutb)/(2.*c*c);
356 { npos = 0; nneg = 0; nero = 1; }
358 { npos = 0; nneg = 1; nero = 0; }
365 G4double aleab = std::log(availableEnergy);
366 G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
367 + aleab*(0.117712+0.0136912*aleab))) - 2.0;
373 for (nt=1; nt<=numSec; nt++) {
374 test = std::exp(
Amin( expxu,
Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
375 dum = pi*nt/(2.0*n*n);
376 if (std::fabs(dum) < 1.0) {
377 if( test >= 1.0e-10 )anpn += dum*test;
385 if( targetCode == protonCode )
388 for (npos=0; npos<numSec/3; npos++) {
389 for (nneg=
Imax(0,npos-1); nneg<=(npos+1); nneg++) {
390 for (nero=0; nero<numSec/3; nero++) {
391 if (++counter < numMul) {
393 if ( (nt>0) && (nt<=numSec) ) {
394 test = std::exp(
Amin( expxu,
Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
395 dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
396 if (std::fabs(dum) < 1.0) {
397 if( test >= 1.0e-10 )excs += dum*test;
401 if (ran < excs)
goto outOfLoop;
415 for (npos=0; npos<numSec/3; npos++) {
416 for (nneg=npos; nneg<=(npos+2); nneg++) {
417 for (nero=0; nero<numSec/3; nero++) {
418 if (++counter < numMul) {
420 if ( (nt>=1) && (nt<=numSec) ) {
421 test = std::exp(
Amin( expxu,
Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
422 dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
423 if (std::fabs(dum) < 1.0) {
424 if( test >= 1.0e-10 )excs += dum*test;
428 if (ran < excs)
goto outOfLoop;
441 if( targetCode == protonCode)
443 if( npos == (1+nneg))
447 else if (npos == nneg)
465 if( npos == (nneg-1))
476 else if ( npos == nneg)
487 nt = npos + nneg + nero;
498 else if ( ran < (
G4double)(npos+nneg)/nt)
514 nt = npos + nneg + nero;
518 G4cout <<
"Particles produced: " ;
521 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)
G4double Amin(G4double a, G4double b)
void QuasiElasticScattering(G4bool &successful, G4HEVector pv[], G4int &vecLen, G4double &excitationEnergyGNP, G4double &excitationEnergyDTA, const G4HEVector &incidentParticle, const G4HEVector &targetParticle, G4double atomicWeight, G4double atomicNumber)
G4int Imin(G4int a, G4int b)
void FillParticleChange(G4HEVector pv[], G4int aVecLength)
G4double Amax(G4double a, G4double b)
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)
G4int Imax(G4int a, G4int b)
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)
virtual void ModelDescription(std::ostream &) const
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
void FirstIntInCasPionMinus(G4bool &inElastic, const G4double availableEnergy, G4HEVector pv[], G4int &vecLen, const G4HEVector &incidentParticle, const G4HEVector &targetParticle)
G4double getEnergy() const
G4double getTotalMomentum() const
void setDefinition(G4String name)
void SetStatusChange(G4HadFinalStateStatus aS)
G4HadFinalState theParticleChange