58 G4cout <<
"G4RPGAntiXiMinusInelastic::ApplyYourself called" <<
G4endl;
60 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
71 modifiedOriginal = *originalIncident;
91 p = std::sqrt(
std::abs((et-amas)*(et+amas)) );
100 targetParticle = *originalTarget;
103 G4bool incidentHasChanged =
false;
104 G4bool targetHasChanged =
false;
105 G4bool quasiElastic =
false;
114 originalIncident, currentParticle, targetParticle,
115 incidentHasChanged, targetHasChanged, quasiElastic );
118 originalIncident, originalTarget, modifiedOriginal,
119 targetNucleus, currentParticle, targetParticle,
120 incidentHasChanged, targetHasChanged, quasiElastic );
123 currentParticle, targetParticle,
124 incidentHasChanged );
126 delete originalTarget;
137 G4bool &incidentHasChanged,
154 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
155 targetMass*targetMass +
156 2.0*targetMass*etOriginal );
157 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
163 const G4int numMul = 1200;
164 const G4int numSec = 60;
169 G4int counter, nt=0, np=0, nneg=0, nz=0;
176 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
177 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
179 for( np=0; np<(numSec/3); ++np )
181 for( nneg=
std::max(0,np-1); nneg<=(np+1); ++nneg )
183 for( nz=0; nz<numSec/3; ++nz )
185 if( ++counter < numMul )
188 if( nt>0 && nt<=numSec )
190 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
191 protnorm[nt-1] += protmul[counter];
197 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
198 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
200 for( np=0; np<numSec/3; ++np )
202 for( nneg=np; nneg<=(np+2); ++nneg )
204 for( nz=0; nz<numSec/3; ++nz )
206 if( ++counter < numMul )
209 if( nt>0 && nt<=numSec )
211 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
212 neutnorm[nt-1] += neutmul[counter];
218 for( i=0; i<numSec; ++i )
220 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
221 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
242 for( np=0; np<numSec/3 && ran>=excs; ++np )
244 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
246 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
248 if( ++counter < numMul )
251 if( nt>0 && nt<=numSec )
254 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
255 if( std::fabs(dum) < 1.0 )
257 if( test >= 1.0
e-10 )excs += dum*
test;
283 incidentHasChanged =
true;
288 incidentHasChanged =
true;
300 else if( np == nneg )
305 incidentHasChanged =
true;
307 targetHasChanged =
true;
313 targetHasChanged =
true;
319 for( np=0; np<numSec/3 && ran>=excs; ++np )
321 for( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg )
323 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
325 if( ++counter < numMul )
328 if( nt>0 && nt<=numSec )
331 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
332 if( std::fabs(dum) < 1.0 )
334 if( test >= 1.0
e-10 )excs += dum*
test;
354 incidentHasChanged =
true;
356 targetHasChanged =
true;
361 incidentHasChanged =
true;
363 targetHasChanged =
true;
375 else if( np+1 == nneg )
380 incidentHasChanged =
true;
385 targetHasChanged =
true;