39 outFile <<
"G4LEAntiSigmaPlusInelastic is one of the Low Energy\n"
40 <<
"Parameterized (LEP) models used to implement inelastic\n"
41 <<
"antiSigma+ scattering from nuclei. It is a re-engineered\n"
42 <<
"version of the GHEISHA code of H. Fesefeldt. It divides the\n"
43 <<
"initial collision products into backward- and forward-going\n"
44 <<
"clusters which are then decayed into final state hadrons. The\n"
45 <<
"model does not conserve energy on an event-by-event basis. It\n"
46 <<
"may be applied to antiSigma+ with initial energies between 0\n"
68 G4cout <<
"G4LEAntiSigmaPlusInelastic::ApplyYourself called" <<
G4endl;
70 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
80 modifiedOriginal = *originalIncident;
86 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
98 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
106 targetParticle = *originalTarget;
109 G4bool incidentHasChanged =
false;
110 G4bool targetHasChanged =
false;
111 G4bool quasiElastic =
false;
120 Cascade(vec, vecLen, originalIncident, currentParticle, targetParticle,
121 incidentHasChanged, targetHasChanged, quasiElastic);
124 modifiedOriginal, targetNucleus, currentParticle,
125 targetParticle, incidentHasChanged, targetHasChanged,
128 SetUpChange(vec, vecLen, currentParticle, targetParticle, incidentHasChanged);
132 delete originalTarget;
136 void G4LEAntiSigmaPlusInelastic::Cascade(
142 G4bool &incidentHasChanged,
160 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
161 targetMass*targetMass +
162 2.0*targetMass*etOriginal );
163 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
165 static G4bool first =
true;
166 const G4int numMul = 1200;
167 const G4int numMulA = 400;
168 const G4int numSec = 60;
169 static G4double protmul[numMul], protnorm[numSec];
170 static G4double neutmul[numMul], neutnorm[numSec];
171 static G4double protmulA[numMulA], protnormA[numSec];
172 static G4double neutmulA[numMulA], neutnormA[numSec];
174 G4int counter,
nt=0, npos=0, nneg=0, nzero=0;
182 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
183 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
185 for( npos=0; npos<(numSec/3); ++npos )
187 for( nneg=std::max(0,npos-1); nneg<=(npos+1); ++nneg )
189 for( nzero=0; nzero<numSec/3; ++nzero )
191 if( ++counter < numMul )
193 nt = npos+nneg+nzero;
194 if( nt>0 && nt<=numSec )
196 protmul[counter] =
Pmltpc(npos,nneg,nzero,nt,b[0],c);
197 protnorm[nt-1] += protmul[counter];
203 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
204 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
206 for( npos=0; npos<numSec/3; ++npos )
208 for( nneg=npos; nneg<=(npos+2); ++nneg )
210 for( nzero=0; nzero<numSec/3; ++nzero )
212 if( ++counter < numMul )
214 nt = npos+nneg+nzero;
215 if( nt>0 && nt<=numSec )
217 neutmul[counter] =
Pmltpc(npos,nneg,nzero,nt,b[1],c);
218 neutnorm[nt-1] += neutmul[counter];
224 for( i=0; i<numSec; ++i )
226 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
227 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
232 for( i=0; i<numMulA; ++i )protmulA[i] = 0.0;
233 for( i=0; i<numSec; ++i )protnormA[i] = 0.0;
235 for( npos=1; npos<(numSec/3); ++npos )
238 for( nzero=0; nzero<numSec/3; ++nzero )
240 if( ++counter < numMulA )
242 nt = npos+nneg+nzero;
243 if( nt>1 && nt<=numSec )
245 protmulA[counter] =
Pmltpc(npos,nneg,nzero,nt,b[0],c);
246 protnormA[nt-1] += protmulA[counter];
251 for( i=0; i<numMulA; ++i )neutmulA[i] = 0.0;
252 for( i=0; i<numSec; ++i )neutnormA[i] = 0.0;
254 for( npos=0; npos<numSec/3; ++npos )
257 for( nzero=0; nzero<numSec/3; ++nzero )
259 if( ++counter < numMulA )
261 nt = npos+nneg+nzero;
262 if( nt>1 && nt<=numSec )
264 neutmulA[counter] =
Pmltpc(npos,nneg,nzero,nt,b[1],c);
265 neutnormA[nt-1] += neutmulA[counter];
270 for( i=0; i<numSec; ++i )
272 if( protnormA[i] > 0.0 )protnormA[i] = 1.0/protnormA[i];
273 if( neutnormA[i] > 0.0 )neutnormA[i] = 1.0/neutnormA[i];
287 const G4double anhl[] = {1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,0.97,0.88,
288 0.85,0.81,0.75,0.64,0.64,0.55,0.55,0.45,0.47,0.40,
289 0.39,0.36,0.33,0.10,0.01};
291 if( iplab > 9 )iplab =
G4int( (pOriginal/
GeV- 1.0)*5.0 ) + 10;
292 if( iplab > 14 )iplab =
G4int( pOriginal/
GeV- 2.0 ) + 15;
293 if( iplab > 22 )iplab =
G4int( (pOriginal/
GeV-10.0)/10.0 ) + 23;
294 if( iplab > 24 )iplab = 24;
297 if( availableEnergy <= aPiPlus->GetPDGMass()/
MeV )
309 for( npos=0; npos<numSec/3 && ran>=excs; ++npos )
311 for( nneg=std::max(0,npos-1); nneg<=(npos+1) && ran>=excs; ++nneg )
313 for( nzero=0; nzero<numSec/3 && ran>=excs; ++nzero )
315 if( ++counter < numMul )
317 nt = npos+nneg+nzero;
318 if( (nt>0) && (nt<=numSec) )
320 test = std::exp( std::min( expxu, std::max( expxl, -(
pi/4.0)*(nt*nt)/(n*n) ) ) );
321 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
322 if( std::fabs(dum) < 1.0 )
324 if( test >= 1.0
e-10 )excs += dum*
test;
338 npos--; nneg--; nzero--;
339 G4int ncht = std::min( 3, std::max( 1, npos-nneg+2 ) );
347 incidentHasChanged =
true;
356 incidentHasChanged =
true;
359 targetHasChanged =
true;
363 targetHasChanged =
true;
370 for( npos=0; npos<numSec/3 && ran>=excs; ++npos )
372 for( nneg=npos; nneg<=(npos+2) && ran>=excs; ++nneg )
374 for( nzero=0; nzero<numSec/3 && ran>=excs; ++nzero )
376 if( ++counter < numMul )
378 nt = npos+nneg+nzero;
379 if( (nt>0) && (nt<=numSec) )
381 test = std::exp( std::min( expxu, std::max( expxl, -(
pi/4.0)*(nt*nt)/(n*n) ) ) );
382 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
383 if( std::fabs(dum) < 1.0 )
385 if( test >= 1.0
e-10 )excs += dum*
test;
399 npos--; nneg--; nzero--;
400 G4int ncht = std::min( 3, std::max( 1, npos-nneg+3 ) );
408 incidentHasChanged =
true;
410 targetHasChanged =
true;
418 incidentHasChanged =
true;
423 targetHasChanged =
true;
431 incidentHasChanged =
true;
436 targetHasChanged =
true;
447 if( centerofmassEnergy <= aPiPlus->GetPDGMass()/
MeV+aKaonPlus->
GetPDGMass()/
MeV )
459 for( npos=1; npos<numSec/3 && ran>=excs; ++npos )
462 for( nzero=0; nzero<numSec/3 && ran>=excs; ++nzero )
464 if( ++counter < numMulA )
466 nt = npos+nneg+nzero;
467 if( nt>1 && nt<=numSec )
469 test = std::exp( std::min( expxu, std::max( expxl, -(
pi/4.0)*(nt*nt)/(n*n) ) ) );
470 dum = (
pi/anpn)*nt*protmulA[counter]*protnormA[nt-1]/(2.0*n*n);
471 if( std::fabs(dum) < 1.0 )
473 if( test >= 1.0
e-10 )excs += dum*
test;
491 for( npos=0; npos<numSec/3 && ran>=excs; ++npos )
494 for( nzero=0; nzero<numSec/3 && ran>=excs; ++nzero )
496 if( ++counter < numMulA )
498 nt = npos+nneg+nzero;
499 if( nt>1 && nt<=numSec )
501 test = std::exp( std::min( expxu, std::max( expxl, -(
pi/4.0)*(nt*nt)/(n*n) ) ) );
502 dum = (
pi/anpn)*nt*neutmulA[counter]*neutnormA[nt-1]/(2.0*n*n);
503 if( std::fabs(dum) < 1.0 )
505 if( test >= 1.0
e-10 )excs += dum*
test;
565 currentParticle.
SetMass( 0.0 );