54 G4cout <<
"G4RPGSigmaPlusInelastic::ApplyYourself called" <<
G4endl;
56 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
67 modifiedOriginal = *originalIncident;
87 p = std::sqrt(
std::abs((et-amas)*(et+amas)) );
96 targetParticle = *originalTarget;
99 G4bool incidentHasChanged =
false;
100 G4bool targetHasChanged =
false;
101 G4bool quasiElastic =
false;
109 originalIncident, currentParticle, targetParticle,
110 incidentHasChanged, targetHasChanged, quasiElastic );
113 originalIncident, originalTarget, modifiedOriginal,
114 targetNucleus, currentParticle, targetParticle,
115 incidentHasChanged, targetHasChanged, quasiElastic );
118 currentParticle, targetParticle,
119 incidentHasChanged );
121 delete originalTarget;
131 G4bool &incidentHasChanged,
148 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
149 targetMass*targetMass +
150 2.0*targetMass*etOriginal );
151 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
158 const G4int numMul = 1200;
159 const G4int numSec = 60;
163 G4int counter, nt=0, np=0, nneg=0, nz=0;
171 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
172 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
174 for( np=0; np<(numSec/3); ++np )
176 for( nneg=np; nneg<=(np+2); ++nneg )
178 for( nz=0; nz<numSec/3; ++nz )
180 if( ++counter < numMul )
183 if( nt>0 && nt<=numSec )
185 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
186 protnorm[nt-1] += protmul[counter];
192 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
193 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
195 for( np=0; np<numSec/3; ++np )
197 for( nneg=
std::max(0,np-1); nneg<=(np+1); ++nneg )
199 for( nz=0; nz<numSec/3; ++nz )
201 if( ++counter < numMul )
204 if( nt>0 && nt<=numSec )
206 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
207 neutnorm[nt-1] += neutmul[counter];
213 for( i=0; i<numSec; ++i )
215 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
216 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
236 for( np=0; np<numSec/3 && ran>=excs; ++np )
238 for( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg )
240 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
242 if( ++counter < numMul )
245 if( nt>0 && nt<=numSec )
248 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
249 if( std::fabs(dum) < 1.0 )
251 if( test >= 1.0
e-10 )excs += dum*
test;
273 incidentHasChanged =
true;
275 targetHasChanged =
true;
281 targetHasChanged =
true;
289 incidentHasChanged =
true;
299 for( np=0; np<numSec/3 && ran>=excs; ++np )
301 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
303 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
305 if( ++counter < numMul )
308 if( nt>0 && nt<=numSec )
311 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
312 if( std::fabs(dum) < 1.0 )
314 if( test >= 1.0
e-10 )excs += dum*
test;
333 targetHasChanged =
true;
341 incidentHasChanged =
true;
343 targetHasChanged =
true;
348 targetHasChanged =
true;
356 incidentHasChanged =
true;
358 targetHasChanged =
true;
367 incidentHasChanged =
true;