55 G4cout <<
"G4RPGAntiProtonInelastic::ApplyYourself called" <<
G4endl;
57 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
68 modifiedOriginal = *originalIncident;
88 p = std::sqrt(
std::abs((et-amas)*(et+amas)) );
97 targetParticle = *originalTarget;
100 G4bool incidentHasChanged =
false;
101 G4bool targetHasChanged =
false;
102 G4bool quasiElastic =
false;
113 originalIncident, currentParticle, targetParticle,
114 incidentHasChanged, targetHasChanged, quasiElastic );
119 originalIncident, originalTarget, modifiedOriginal,
120 targetNucleus, currentParticle, targetParticle,
121 incidentHasChanged, targetHasChanged, quasiElastic );
124 currentParticle, targetParticle,
125 incidentHasChanged );
127 delete originalTarget;
138 G4bool &incidentHasChanged,
155 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
156 targetMass*targetMass +
157 2.0*targetMass*etOriginal );
158 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
161 const G4int numMul = 1200;
162 const G4int numMulA = 400;
163 const G4int numSec = 60;
169 G4int counter, nt=0, np=0, nneg=0, nz=0;
177 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
178 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
180 for (np=0; np<(numSec/3); ++np ) {
181 for (nneg=
std::max(0,np-1); nneg<=(np+1); ++nneg ) {
182 for (nz=0; nz<numSec/3; ++nz ) {
183 if (++counter < numMul ) {
185 if (nt>0 && nt<=numSec ) {
186 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
187 protnorm[nt-1] += protmul[counter];
194 for (i=0; i<numMul; ++i )neutmul[i] = 0.0;
195 for (i=0; i<numSec; ++i )neutnorm[i] = 0.0;
197 for (np=0; np<numSec/3; ++np ) {
198 for( nneg=np; nneg<=(np+2); ++nneg )
200 for( nz=0; nz<numSec/3; ++nz )
202 if( ++counter < numMul )
205 if( (nt>0) && (nt<=numSec) )
207 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
208 neutnorm[nt-1] += neutmul[counter];
215 for (i=0; i<numSec; ++i ) {
216 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
217 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
222 for (i=0; i<numMulA; ++i )protmulA[i] = 0.0;
223 for (i=0; i<numSec; ++i )protnormA[i] = 0.0;
226 for (np=0; np<(numSec/3); ++np ) {
228 for (nz=0; nz<numSec/3; ++nz ) {
229 if ( ++counter < numMulA ) {
231 if ( nt>1 && nt<=numSec ) {
232 protmulA[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
233 protnormA[nt-1] += protmulA[counter];
239 for( i=0; i<numMulA; ++i )neutmulA[i] = 0.0;
240 for( i=0; i<numSec; ++i )neutnormA[i] = 0.0;
243 for (np=0; np<numSec/3; ++np ) {
245 for (nz=0; nz<numSec/3; ++nz ) {
246 if (++counter < numMulA ) {
248 if ( (nt>1) && (nt<=numSec) ) {
249 neutmulA[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
250 neutnormA[nt-1] += neutmulA[counter];
255 for (i=0; i<numSec; ++i) {
256 if( protnormA[i] > 0.0 )protnormA[i] = 1.0/protnormA[i];
257 if( neutnormA[i] > 0.0 )neutnormA[i] = 1.0/neutnormA[i];
271 const G4double anhl[] = {1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.90,
272 0.6,0.52,0.47,0.44,0.41,0.39,0.37,0.35,0.34,0.24,
273 0.19,0.15,0.12,0.10,0.09,0.07,0.06,0.05,0.0};
276 if( iplab > 9 )iplab =
G4int( pOriginal/
GeV ) + 9;
277 if( iplab > 18 )iplab =
G4int( pOriginal/
GeV/10.0 ) + 18;
278 if( iplab > 27 )iplab = 28;
280 if (availableEnergy <= aPiPlus->GetPDGMass()/
MeV ) {
285 const G4double supp[] = {0.,0.4,0.55,0.65,0.75,0.82,0.86,0.90,0.94,0.98};
304 else if( ran < wp/wt )
314 if( ran < w0/(w0+wm) )
326 for (np=0; np<numSec/3 && ran>=excs; ++np ) {
327 for (nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg ) {
328 for (nz=0; nz<numSec/3 && ran>=excs; ++nz ) {
329 if (++counter < numMul ) {
331 if ((nt>0) && (nt<=numSec) ) {
333 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
334 if (std::fabs(dum) < 1.0 ) {
335 if( test >= 1.0
e-10 )excs += dum*
test;
350 for ( np=0; np<numSec/3 && ran>=excs; ++np ) {
351 for ( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg ) {
352 for ( nz=0; nz<numSec/3 && ran>=excs; ++nz ) {
353 if ( ++counter < numMul ) {
355 if ( (nt>0) && (nt<=numSec) ) {
357 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
358 if ( std::fabs(dum) < 1.0 )
360 if( test >= 1.0
e-10 )excs += dum*
test;
386 incidentHasChanged =
true;
387 targetHasChanged =
true;
392 targetHasChanged =
true;
396 incidentHasChanged =
true;
407 targetHasChanged =
true;
412 incidentHasChanged =
true;
420 incidentHasChanged =
true;
421 targetHasChanged =
true;
427 if (centerofmassEnergy <= 2*aPiPlus->GetPDGMass()/
MeV ) {
440 for( np=0; (np<numSec/3) && (ran>=excs); ++np )
443 for( nz=0; (nz<numSec/3) && (ran>=excs); ++nz )
445 if( ++counter < numMulA )
448 if( (nt>1) && (nt<=numSec) )
451 dum = (
pi/anpn)*nt*protmulA[counter]*protnormA[nt-1]/(2.0*n*n);
454 if( test >= 1.0
e-10 )excs += dum*
test;
464 for( np=0; (np<numSec/3) && (ran>=excs); ++np )
467 for( nz=0; (nz<numSec/3) && (ran>=excs); ++nz )
469 if( ++counter < numMulA )
472 if( (nt>1) && (nt<=numSec) )
475 dum = (
pi/anpn)*nt*neutmulA[counter]*neutnormA[nt-1]/(2.0*n*n);
476 if( std::fabs(dum) < 1.0 )
478 if( test >= 1.0
e-10 )excs += dum*
test;
492 currentParticle.
SetMass( 0.0 );
498 ed <<
" While count exceeded " <<
G4endl;
499 while(np + nneg + nz < 3) {