54 G4cout <<
"G4RPGXiMinusInelastic::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;
132 G4bool& incidentHasChanged,
149 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
150 targetMass*targetMass +
151 2.0*targetMass*etOriginal );
152 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
158 const G4int numMul = 1200;
159 const G4int numSec = 60;
164 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) {
175 for (nneg =
std::max(0,np-1); nneg <= (np+1); ++nneg) {
176 for (nz = 0; nz < numSec/3; ++nz) {
177 if (++counter < numMul) {
179 if (nt > 0 && nt <= numSec) {
180 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
181 protnorm[nt-1] += protmul[counter];
188 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
189 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
191 for( np=0; np<numSec/3; ++np )
193 for( nneg=np; nneg<=(np+2); ++nneg )
195 for( nz=0; nz<numSec/3; ++nz )
197 if( ++counter < numMul )
200 if( nt>0 && nt<=numSec )
202 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
203 neutnorm[nt-1] += neutmul[counter];
209 for( i=0; i<numSec; ++i )
211 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
212 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
233 for( np=0; np<numSec/3 && ran>=excs; ++np )
235 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
237 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
239 if( ++counter < numMul )
242 if( nt>0 && nt<=numSec )
245 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
246 if( std::fabs(dum) < 1.0 )
248 if( test >= 1.0
e-10 )excs += dum*
test;
274 incidentHasChanged =
true;
279 incidentHasChanged =
true;
291 else if( np == nneg )
296 incidentHasChanged =
true;
298 targetHasChanged =
true;
304 targetHasChanged =
true;
310 for( np=0; np<numSec/3 && ran>=excs; ++np )
312 for( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg )
314 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
316 if( ++counter < numMul )
319 if( nt>0 && nt<=numSec )
322 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
323 if( std::fabs(dum) < 1.0 )
325 if( test >= 1.0
e-10 )excs += dum*
test;
345 incidentHasChanged =
true;
347 targetHasChanged =
true;
352 incidentHasChanged =
true;
354 targetHasChanged =
true;
366 else if( np+1 == nneg )
371 incidentHasChanged =
true;
376 targetHasChanged =
true;