52 G4cout <<
"WARNING: model G4HEAntiKaonZeroInelastic is being deprecated and will\n"
53 <<
"disappear in Geant4 version 10.0" <<
G4endl;
59 outFile <<
"G4HEAntiKaonZeroInelastic is one of the High Energy\n"
60 <<
"Parameterized (HEP) models used to implement inelastic\n"
61 <<
"anti-K0 scattering from nuclei. It is a re-engineered\n"
62 <<
"version of the GHEISHA code of H. Fesefeldt. It divides the\n"
63 <<
"initial collision products into backward- and forward-going\n"
64 <<
"clusters which are then decayed into final state hadrons.\n"
65 <<
"The model does not conserve energy on an event-by-event\n"
66 <<
"basis. It may be applied to anti-K0 with initial energies\n"
88 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass;
90 if (incidentKineticEnergy < 1.)
91 G4cout <<
"GHEAntiKaonZeroInelastic: incident energy < 1 GeV" <<
G4endl;
94 G4cout <<
"G4HEAntiKaonZeroInelastic::ApplyYourself" <<
G4endl;
96 <<
"mass " << incidentMass
97 <<
"kinetic energy " << incidentKineticEnergy
99 G4cout <<
"target material with (A,Z) = ("
100 << atomicWeight <<
"," << atomicNumber <<
")" <<
G4endl;
104 atomicWeight, atomicNumber);
106 G4cout <<
"nuclear inelasticity = " << inelasticity <<
G4endl;
108 incidentKineticEnergy -= inelasticity;
114 atomicWeight, atomicNumber,
116 excitationEnergyDTA);
118 G4cout <<
"nuclear excitation = " << excitation << excitationEnergyGNP
119 << excitationEnergyDTA <<
G4endl;
122 incidentKineticEnergy -= excitation;
123 incidentTotalEnergy = incidentKineticEnergy + incidentMass;
136 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass
137 + targetMass*targetMass
138 + 2.0*targetMass*incidentTotalEnergy);
139 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
144 G4cout <<
"ApplyYourself: CallFirstIntInCascade for particle "
145 << incidentCode <<
G4endl;
147 G4bool successful =
false;
151 incidentParticle, targetParticle );
154 G4cout <<
"ApplyYourself::StrangeParticlePairProduction" <<
G4endl;
156 if ((
vecLength > 0) && (availableEnergy > 1.))
159 incidentParticle, targetParticle);
161 excitationEnergyGNP, excitationEnergyDTA,
162 incidentParticle, targetParticle,
163 atomicWeight, atomicNumber);
166 excitationEnergyGNP, excitationEnergyDTA,
167 incidentParticle, targetParticle,
168 atomicWeight, atomicNumber);
171 excitationEnergyGNP, excitationEnergyDTA,
172 incidentParticle, targetParticle,
173 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"
218 static const G4double expxl = -expxu;
224 static const G4int numMul = 1200;
225 static const G4int numSec = 60;
236 static G4bool first =
true;
237 static G4double protmul[numMul], protnorm[numSec];
238 static G4double neutmul[numMul], neutnorm[numSec];
243 G4int i, counter, nt, npos, nneg, nzero;
247 for (i = 0; i < numMul; i++) protmul[i] = 0.0;
248 for (i = 0; i < numSec; i++) protnorm[i] = 0.0;
250 for (npos = 0; npos < (numSec/3); npos++) {
251 for (nneg = std::max(0,npos-2); nneg <= npos; nneg++) {
252 for (nzero = 0; nzero < numSec/3; nzero++) {
253 if (++counter < numMul) {
254 nt = npos+nneg+nzero;
255 if ((nt > 0) && (nt <= numSec) ) {
256 protmul[counter] =
pmltpc(npos,nneg,nzero,nt,protb,c);
257 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++) {
268 for (nneg = std::max(0,npos-1); nneg <= (npos+1); nneg++) {
269 for (nzero = 0; nzero < numSec/3; nzero++) {
270 if (++counter < numMul) {
271 nt = npos+nneg+nzero;
272 if ((nt > 0) && (nt <= numSec) ) {
273 neutmul[counter] =
pmltpc(npos,nneg,nzero,nt,neutb,c);
274 neutnorm[nt-1] += neutmul[counter];
280 for (i = 0; i < numSec; i++) {
281 if (protnorm[i] > 0.0) protnorm[i] = 1.0/protnorm[i];
282 if (neutnorm[i] > 0.0) neutnorm[i] = 1.0/neutnorm[i];
286 pv[0] = incidentParticle;
287 pv[1] = targetParticle;
293 npos = 0, nneg = 0, nzero = 0;
294 G4double cech[] = { 1., 1., 1., 0.70, 0.60, 0.55, 0.35, 0.25, 0.18, 0.15};
295 G4int iplab =
G4int( incidentTotalMomentum*5.);
297 G4int ipl = std::min(19,
G4int( incidentTotalMomentum*5.));
298 G4double cnk0[] = {0.17, 0.18, 0.17, 0.24, 0.26, 0.20, 0.22, 0.21, 0.34, 0.45,
299 0.58, 0.55, 0.36, 0.29, 0.29, 0.32, 0.32, 0.33, 0.33, 0.33};
301 if (targetCode == protonCode) {
311 if (targetCode == protonCode) {
313 }
else if (ran < 0.50) {
316 }
else if (ran < 0.75) {
347 G4double aleab = std::log(availableEnergy);
348 G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
349 + aleab*(0.117712+0.0136912*aleab))) - 2.0;
355 for (nt=1; nt<=numSec; nt++) {
356 test = std::exp(std::min(expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
357 dum = pi*nt/(2.0*n*n);
358 if (std::fabs(dum) < 1.0) {
359 if( test >= 1.0e-10 )anpn += dum*test;
367 if (targetCode == protonCode) {
369 for (npos=0; npos<numSec/3; npos++) {
370 for (nneg=std::max(0,npos-2); nneg<=npos; nneg++) {
371 for (nzero=0; nzero<numSec/3; nzero++) {
372 if (++counter < numMul) {
373 nt = npos+nneg+nzero;
374 if ((nt>0) && (nt<=numSec) ) {
375 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
376 dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
378 if (std::fabs(dum) < 1.0) {
379 if( test >= 1.0e-10 )excs += dum*test;
384 if (ran < excs)
goto outOfLoop;
396 for (npos=0; npos<numSec/3; npos++) {
397 for (nneg=std::max(0,npos-1); nneg<=(npos+1); nneg++) {
398 for (nzero=0; nzero<numSec/3; nzero++) {
399 if (++counter < numMul) {
400 nt = npos+nneg+nzero;
401 if( (nt>=1) && (nt<=numSec) ) {
402 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
403 dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
405 if (std::fabs(dum) < 1.0) {
406 if( test >= 1.0e-10 )excs += dum*test;
411 if (ran < excs)
goto outOfLoop;
425 if (targetCode == protonCode) {
428 }
else if (npos == (1+nneg)) {
451 else if ( npos == (1+nneg))
462 if (((pv[0].getCode() == kaonMinusCode)
464 || ((pv[0].
getCode() == kaonZeroCode)
465 && (pv[1].getCode() == protonCode) )
466 || ((pv[0].
getCode() == antiKaonZeroCode)
467 && (pv[1].getCode() == protonCode) ) ) {
470 if (pv[1].getCode() == protonCode) {
474 }
else if (ran < 0.84) {
523 nt = npos + nneg + nzero;
531 }
else if (ran < (
G4double)(npos+nneg)/nt) {
542 nt = npos + nneg + nzero;
546 G4cout <<
"Particles produced: " ;
549 for (i=2; i < vecLen; i++) {
G4DLLIMPORT std::ostream G4cout
void FirstIntInCasAntiKaonZero(G4bool &inElastic, const G4double availableEnergy, G4HEVector pv[], G4int &vecLen, const G4HEVector &incidentParticle, const G4HEVector &targetParticle)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
virtual void ModelDescription(std::ostream &) const
G4HEAntiKaonZeroInelastic(const G4String &name="G4HEAntiKaonZeroInelastic")
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)
G4double getEnergy() const
G4double getTotalMomentum() const
void setDefinition(G4String name)
void SetStatusChange(G4HadFinalStateStatus aS)
G4HadFinalState theParticleChange