45 outFile <<
"G4HEKaonZeroShortInelastic is one of the High Energy\n"
46 <<
"Parameterized (HEP) models used to implement inelastic\n"
47 <<
"K0S 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 K0S with initial energies\n"
74 G4double incidentKineticEnergy = incidentTotalEnergy - incidentMass;
76 if(incidentKineticEnergy < 1)
77 G4cout <<
"GHEKaonZeroShortInelastic: incident energy < 1 GeV" <<
G4endl;
80 G4cout <<
"G4HEKaonZeroShortInelastic::ApplyYourself" <<
G4endl;
82 <<
"mass " << incidentMass
83 <<
"kinetic energy " << incidentKineticEnergy
85 G4cout <<
"target material with (A,Z) = ("
86 << atomicWeight <<
"," << atomicNumber <<
")" <<
G4endl;
90 atomicWeight, atomicNumber);
92 G4cout <<
"nuclear inelasticity = " << inelasticity <<
G4endl;
94 incidentKineticEnergy -= inelasticity;
100 atomicWeight, atomicNumber,
102 excitationEnergyDTA);
104 G4cout <<
"nuclear excitation = " << excitation << excitationEnergyGNP
105 << excitationEnergyDTA <<
G4endl;
107 incidentKineticEnergy -= excitation;
108 incidentTotalEnergy = incidentKineticEnergy + incidentMass;
121 G4double centerOfMassEnergy = std::sqrt(incidentMass*incidentMass
122 + targetMass*targetMass
123 + 2.0*targetMass*incidentTotalEnergy);
124 G4double availableEnergy = centerOfMassEnergy - targetMass - incidentMass;
130 G4cout <<
"ApplyYourself: CallFirstIntInCascade for particle "
131 << incidentCode <<
G4endl;
133 G4bool successful =
false;
138 incidentParticle, targetParticle );
141 incidentParticle, targetParticle, atomicWeight );
144 if ((
vecLength > 0) && (availableEnergy > 1.))
147 incidentParticle, targetParticle);
150 excitationEnergyGNP, excitationEnergyDTA,
151 incidentParticle, targetParticle,
152 atomicWeight, atomicNumber);
155 excitationEnergyGNP, excitationEnergyDTA,
156 incidentParticle, targetParticle,
157 atomicWeight, atomicNumber);
160 excitationEnergyGNP, excitationEnergyDTA,
161 incidentParticle, targetParticle,
162 atomicWeight, atomicNumber);
166 excitationEnergyGNP, excitationEnergyDTA,
167 incidentParticle, targetParticle,
168 atomicWeight, atomicNumber);
171 excitationEnergyGNP, excitationEnergyDTA,
172 incidentParticle, targetParticle,
173 atomicWeight, atomicNumber);
178 atomicWeight, atomicNumber);
181 G4cout <<
"GHEInelasticInteraction::ApplyYourself fails to produce final state particles"
223 static const G4double expxl = -expxu;
229 static const G4int numMul = 1200;
230 static const G4int numSec = 60;
238 static G4bool first =
true;
239 static G4double protmul[numMul], protnorm[numSec];
240 static G4double neutmul[numMul], neutnorm[numSec];
245 G4int i, counter, nt, npos, nneg, nzero;
250 for( i=0; i<numMul; i++ )protmul[i] = 0.0;
251 for( i=0; i<numSec; i++ )protnorm[i] = 0.0;
253 for (npos=0; npos<(numSec/3); npos++) {
254 for (nneg=std::max(0,npos-1); nneg<=(npos+1); nneg++) {
255 for (nzero=0; nzero<numSec/3; nzero++) {
256 if (++counter < numMul) {
257 nt = npos+nneg+nzero;
258 if( (nt>0) && (nt<=numSec) ) {
259 protmul[counter] =
pmltpc(npos,nneg,nzero,nt,protb,c) ;
260 protnorm[nt-1] += protmul[counter];
267 for( i=0; i<numMul; i++ )neutmul[i] = 0.0;
268 for( i=0; i<numSec; i++ )neutnorm[i] = 0.0;
270 for (npos=0; npos<numSec/3; npos++) {
271 for (nneg=npos; nneg<=(npos+2); nneg++) {
272 for (nzero=0; nzero<numSec/3; nzero++) {
273 if (++counter < numMul) {
274 nt = npos+nneg+nzero;
275 if( (nt>0) && (nt<=numSec) ) {
276 neutmul[counter] =
pmltpc(npos,nneg,nzero,nt,neutb,c);
277 neutnorm[nt-1] += neutmul[counter];
284 for (i=0; i<numSec; i++) {
285 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
286 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
293 pv[0] = incidentParticle;
294 pv[1] = targetParticle;
299 if( targetCode == protonCode) {
300 G4double cech[] = {0.33,0.27,0.29,0.31,0.27,0.18,0.13,0.10,0.09,0.07};
301 G4int iplab =
G4int( std::min( 9.0, incidentTotalMomentum*5. ) );
302 if(
G4UniformRand() < cech[iplab]/std::pow(atomicWeight,0.42)) {
315 npos = 0, nneg = 0, nzero = 0;
319 G4double supp[] = {0., 0.4, 0.55, 0.65, 0.75, 0.82, 0.86, 0.90, 0.94, 0.98};
326 w0 = -
sqr(1.+protb)/(2.*c*c);
328 wm = -
sqr(-1.+protb)/(2.*c*c);
344 w0 = -
sqr(1.+neutb)/(2.*c*c);
345 wp = w0 = std::exp(w0);
346 wm = -
sqr(-1.+neutb)/(2.*c*c);
355 }
else if (ran < wp/wt) {
368 G4double aleab = std::log(availableEnergy);
369 G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
370 + aleab*(0.117712+0.0136912*aleab))) - 2.0;
376 for (nt=1; nt<=numSec; nt++) {
377 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
378 dum = pi*nt/(2.0*n*n);
379 if (std::fabs(dum) < 1.0) {
380 if( test >= 1.0e-10 )anpn += dum*test;
388 if( targetCode == protonCode )
391 for( npos=0; npos<numSec/3; npos++ )
393 for( nneg=std::max(0,npos-1); nneg<=(npos+1); nneg++ )
395 for (nzero=0; nzero<numSec/3; nzero++) {
396 if (++counter < numMul) {
397 nt = npos+nneg+nzero;
398 if ( (nt>0) && (nt<=numSec) ) {
399 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
400 dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
401 if (std::fabs(dum) < 1.0) {
402 if( test >= 1.0e-10 )excs += dum*test;
406 if (ran < excs)
goto outOfLoop;
420 for( npos=0; npos<numSec/3; npos++ )
422 for( nneg=npos; nneg<=(npos+2); nneg++ )
424 for (nzero=0; nzero<numSec/3; nzero++) {
425 if (++counter < numMul) {
426 nt = npos+nneg+nzero;
427 if ( (nt>=1) && (nt<=numSec) ) {
428 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
429 dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
430 if (std::fabs(dum) < 1.0) {
431 if( test >= 1.0e-10 )excs += dum*test;
435 if (ran < excs)
goto outOfLoop;
453 else if (npos == (nneg-1))
483 else if ( npos == (nneg+1))
493 nt = npos + nneg + nzero;
501 }
else if ( ran < (
G4double)(npos+nneg)/nt) {
512 nt = npos + nneg + nzero;
516 G4cout <<
"Particles produced: " ;
519 for (i=2; i < vecLen; i++)
G4cout << pv[i].getName() <<
" " ;
544 static const G4double expxl = -expxu;
550 static const G4int numMul = 1200;
551 static const G4int numSec = 60;
562 static G4bool first =
true;
563 static G4double protmul[numMul], protnorm[numSec];
564 static G4double neutmul[numMul], neutnorm[numSec];
569 G4int i, counter, nt, npos, nneg, nzero;
574 for( i=0; i<numMul; i++ )protmul[i] = 0.0;
575 for( i=0; i<numSec; i++ )protnorm[i] = 0.0;
577 for(npos=0; npos<(numSec/3); npos++) {
578 for(nneg=std::max(0,npos-2); nneg<=npos; nneg++) {
579 for(nzero=0; nzero<numSec/3; nzero++) {
580 if(++counter < numMul) {
581 nt = npos+nneg+nzero;
582 if( (nt>0) && (nt<=numSec) ) {
583 protmul[counter] =
pmltpc(npos,nneg,nzero,nt,protb,c) ;
584 protnorm[nt-1] += protmul[counter];
591 for( i=0; i<numMul; i++ )neutmul[i] = 0.0;
592 for( i=0; i<numSec; i++ )neutnorm[i] = 0.0;
594 for(npos=0; npos<numSec/3; npos++) {
595 for(nneg=std::max(0,npos-1); nneg<=(npos+1); nneg++) {
596 for(nzero=0; nzero<numSec/3; nzero++) {
597 if(++counter < numMul) {
598 nt = npos+nneg+nzero;
599 if( (nt>0) && (nt<=numSec) ) {
600 neutmul[counter] =
pmltpc(npos,nneg,nzero,nt,neutb,c);
601 neutnorm[nt-1] += neutmul[counter];
608 for(i=0; i<numSec; i++) {
609 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
610 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
616 pv[0] = incidentParticle;
617 pv[1] = targetParticle;
625 npos = 0, nneg = 0, nzero = 0;
626 G4double cech[] = { 1., 1., 1., 0.70, 0.60, 0.55, 0.35, 0.25, 0.18, 0.15};
627 G4int iplab =
G4int( incidentTotalMomentum*5.);
629 G4int ipl = std::min(19,
G4int( incidentTotalMomentum*5.));
630 G4double cnk0[] = {0.17, 0.18, 0.17, 0.24, 0.26, 0.20, 0.22, 0.21, 0.34, 0.45,
631 0.58, 0.55, 0.36, 0.29, 0.29, 0.32, 0.32, 0.33, 0.33, 0.33};
633 if(targetCode == protonCode) {
643 if(targetCode == protonCode) {
648 }
else if (ran < 0.50) {
651 }
else if (ran < 0.75) {
663 }
else if (ran < 0.50) {
666 }
else if (ran < 0.75) {
679 G4double aleab = std::log(availableEnergy);
680 G4double n = 3.62567+aleab*(0.665843+aleab*(0.336514
681 + aleab*(0.117712+0.0136912*aleab))) - 2.0;
687 for (nt=1; nt<=numSec; nt++) {
688 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
689 dum = pi*nt/(2.0*n*n);
690 if (std::fabs(dum) < 1.0) {
691 if( test >= 1.0e-10 )anpn += dum*test;
699 if (targetCode == protonCode) {
701 for (npos=0; npos<numSec/3; npos++) {
702 for (nneg=std::max(0,npos-2); nneg<=npos; nneg++) {
703 for (nzero=0; nzero<numSec/3; nzero++) {
704 if (++counter < numMul) {
705 nt = npos+nneg+nzero;
706 if( (nt>0) && (nt<=numSec) ) {
707 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
708 dum = (pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
710 if (std::fabs(dum) < 1.0) {
711 if( test >= 1.0e-10 )excs += dum*test;
716 if (ran < excs)
goto outOfLoop;
728 for (npos=0; npos<numSec/3; npos++) {
729 for (nneg=std::max(0,npos-1); nneg<=(npos+1); nneg++) {
730 for (nzero=0; nzero<numSec/3; nzero++) {
731 if (++counter < numMul) {
732 nt = npos+nneg+nzero;
733 if( (nt>=1) && (nt<=numSec) ) {
734 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
735 dum = (pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
737 if (std::fabs(dum) < 1.0) {
738 if( test >= 1.0e-10 )excs += dum*test;
743 if (ran < excs)
goto outOfLoop;
756 if( targetCode == protonCode)
761 else if (npos == (1+nneg))
791 else if ( npos == (1+nneg))
804 if( ( (pv[0].getCode() == kaonMinusCode)
806 || ( (pv[0].
getCode() == kaonZeroCode)
807 && (pv[1].getCode() == protonCode) )
808 || ( (pv[0].
getCode() == antiKaonZeroCode)
809 && (pv[1].getCode() == protonCode) ) )
812 if( pv[1].getCode() == protonCode)
875 nt = npos + nneg + nzero;
883 }
else if (ran < (
G4double)(npos+nneg)/nt) {
894 nt = npos + nneg + nzero;
898 G4cout <<
"Particles produced: " ;
901 for (i=2; i < vecLen; i++)
G4cout << pv[i].getName() <<
" " ;
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)
void FirstIntInCasAntiKaonZero(G4bool &inElastic, const G4double availableEnergy, G4HEVector pv[], G4int &vecLen, const G4HEVector &incidentParticle, const G4HEVector &targetParticle)
virtual void ModelDescription(std::ostream &) const
void FirstIntInCasKaonZero(G4bool &inElastic, const G4double availableEnergy, G4HEVector pv[], G4int &vecLen, const G4HEVector &incidentParticle, const G4HEVector &targetParticle, const G4double atomicWeight)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
G4double getEnergy() const
G4double getTotalMomentum() const
void setDefinition(G4String name)
void SetStatusChange(G4HadFinalStateStatus aS)
G4HadFinalState theParticleChange