45 outFile <<
"G4HEKaonMinusInelastic is one of the High Energy\n"
46 <<
"Parameterized (HEP) models used to implement inelastic\n"
47 <<
"K- scattering from nuclei. It is a re-engineered\n"
48 <<
"version of the GHEISHA code of H. Fesefeldt. It divides the\n"
49 <<
"initial collision products into backward- and forward-going\n"
50 <<
"clusters which are then decayed into final state hadrons.\n"
51 <<
"The model does not conserve energy on an event-by-event\n"
52 <<
"basis. It may be applied to K- with initial energies\n"
77 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass;
79 if (incidentKineticEnergy < 1.)
80 G4cout <<
"GHEKaonMinusInelastic: incident energy < 1 GeV" <<
G4endl;
83 G4cout <<
"G4HEKaonMinusInelastic::ApplyYourself" <<
G4endl;
85 <<
"mass " << incidentMass
86 <<
"kinetic energy " << incidentKineticEnergy
88 G4cout <<
"target material with (A,Z) = ("
89 << atomicWeight <<
"," << atomicNumber <<
")" <<
G4endl;
93 atomicWeight, atomicNumber);
95 G4cout <<
"nuclear inelasticity = " << inelasticity <<
G4endl;
97 incidentKineticEnergy -= inelasticity;
103 atomicWeight, atomicNumber,
105 excitationEnergyDTA);
107 G4cout <<
"nuclear excitation = " << excitation << excitationEnergyGNP
108 << excitationEnergyDTA <<
G4endl;
110 incidentKineticEnergy -= excitation;
111 incidentTotalEnergy = incidentKineticEnergy + incidentMass;
124 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass
125 + targetMass*targetMass
126 + 2.0*targetMass*incidentTotalEnergy);
127 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
134 G4cout <<
"ApplyYourself: CallFirstIntInCascade for particle "
135 << incidentCode <<
G4endl;
137 G4bool successful =
false;
140 incidentParticle, targetParticle);
143 G4cout <<
"ApplyYourself::StrangeParticlePairProduction" <<
G4endl;
145 if ((
vecLength > 0) && (availableEnergy > 1.))
148 incidentParticle, targetParticle);
151 excitationEnergyGNP, excitationEnergyDTA,
152 incidentParticle, targetParticle,
153 atomicWeight, atomicNumber);
156 excitationEnergyGNP, excitationEnergyDTA,
157 incidentParticle, targetParticle,
158 atomicWeight, atomicNumber);
161 excitationEnergyGNP, excitationEnergyDTA,
162 incidentParticle, targetParticle,
163 atomicWeight, atomicNumber);
167 excitationEnergyGNP, excitationEnergyDTA,
168 incidentParticle, targetParticle,
169 atomicWeight, atomicNumber);
172 excitationEnergyGNP, excitationEnergyDTA,
173 incidentParticle, targetParticle,
174 atomicWeight, atomicNumber);
178 atomicWeight, atomicNumber);
180 G4cout <<
"GHEInelasticInteraction::ApplyYourself fails to produce final state particles"
207 static const G4double expxl = -expxu;
213 static const G4int numMul = 1200;
214 static const G4int numSec = 60;
225 static G4bool first =
true;
226 static G4double protmul[numMul], protnorm[numSec];
227 static G4double neutmul[numMul], neutnorm[numSec];
232 G4int i, counter, nt, npos, nneg, nzero;
237 for (i = 0; i < numMul; i++) protmul[i] = 0.0;
238 for (i = 0; i < numSec; i++) protnorm[i] = 0.0;
240 for (npos = 0; npos < (numSec/3); npos++) {
241 for( nneg=
Imax(0,npos-1); nneg<=npos+1; nneg++ )
243 for( nzero=0; nzero<numSec/3; nzero++ )
245 if( ++counter < numMul )
247 nt = npos+nneg+nzero;
248 if( (nt>0) && (nt<=numSec) )
251 pmltpc(npos,nneg,nzero,nt,protb,c) ;
252 protnorm[nt-1] += protmul[counter];
258 for( i=0; i<numMul; i++ )neutmul[i] = 0.0;
259 for( i=0; i<numSec; i++ )neutnorm[i] = 0.0;
261 for (npos = 0; npos < numSec/3; npos++) {
262 for (nneg = npos; nneg <= (npos+2); nneg++) {
263 for( nzero=0; nzero<numSec/3; nzero++ )
265 if( ++counter < numMul )
267 nt = npos+nneg+nzero;
268 if( (nt>0) && (nt<=numSec) )
271 pmltpc(npos,nneg,nzero,nt,neutb,c);
272 neutnorm[nt-1] += neutmul[counter];
279 for (i = 0; i < numSec; i++) {
280 if (protnorm[i] > 0.0) protnorm[i] = 1.0/protnorm[i];
281 if (neutnorm[i] > 0.0) neutnorm[i] = 1.0/neutnorm[i];
285 pv[0] = incidentParticle;
286 pv[1] = targetParticle;
292 npos = 0, nneg = 0, nzero = 0;
293 G4double cech[] = { 1., 1., 1., 0.70, 0.60, 0.55, 0.35, 0.25, 0.18, 0.15};
294 G4int iplab =
G4int( incidentTotalMomentum*5.);
297 G4double cnk0[] = {0.17, 0.18, 0.17, 0.24, 0.26, 0.20, 0.22, 0.21, 0.34, 0.45,
298 0.58, 0.55, 0.36, 0.29, 0.29, 0.32, 0.32, 0.33, 0.33, 0.33};
300 if (targetCode == protonCode) {
309 if (targetCode == protonCode) {
353 G4double aleab = std::log(availableEnergy);
354 G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
355 + aleab*(0.117712+0.0136912*aleab))) - 2.0;
361 for (nt=1; nt<=numSec; nt++) {
362 test = std::exp(
Amin( expxu,
Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
363 dum = pi*nt/(2.0*n*n);
364 if (std::fabs(dum) < 1.0) {
365 if( test >= 1.0e-10 )anpn += dum*test;
373 if( targetCode == protonCode )
376 for( npos=0; npos<numSec/3; npos++ )
378 for( nneg=
Imax(0,npos-1); nneg<=npos+1; nneg++ )
380 for (nzero=0; nzero<numSec/3; nzero++) {
381 if (++counter < numMul) {
382 nt = npos+nneg+nzero;
383 if ( (nt>0) && (nt<=numSec) ) {
384 test = std::exp(
Amin( expxu,
Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
385 dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
386 if (std::fabs(dum) < 1.0) {
387 if( test >= 1.0e-10 )excs += dum*test;
392 if (ran < excs)
goto outOfLoop;
406 for( npos=0; npos<numSec/3; npos++ )
408 for( nneg=npos; nneg<=(npos+2); nneg++ )
410 for (nzero=0; nzero<numSec/3; nzero++) {
411 if (++counter < numMul) {
412 nt = npos+nneg+nzero;
413 if ( (nt>=1) && (nt<=numSec) ) {
414 test = std::exp(
Amin( expxu,
Amax( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
415 dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
416 if (std::fabs(dum) < 1.0) {
417 if( test >= 1.0e-10 )excs += dum*test;
421 if (ran < excs)
goto outOfLoop;
434 if( targetCode == protonCode)
436 if( npos == (1+nneg))
440 else if (npos == nneg)
458 if( npos == (nneg-1))
469 else if ( npos == nneg)
481 if( ( (pv[0].getCode() == kaonMinusCode)
483 || ( (pv[0].
getCode() == kaonZeroCode)
484 && (pv[1].getCode() == protonCode) )
485 || ( (pv[0].
getCode() == antiKaonZeroCode)
486 && (pv[1].getCode() == protonCode) ) )
489 if( pv[1].getCode() == protonCode)
553 nt = npos + nneg + nzero;
564 else if ( ran < (
G4double)(npos+nneg)/nt)
580 nt = npos + nneg + nzero;
584 G4cout <<
"Particles produced: " ;
587 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 FirstIntInCasKaonMinus(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