55 G4cout <<
"G4RPGKMinusInelastic::ApplyYourself called" <<
G4endl;
57 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
74 currentParticle.SetKineticEnergy( ek );
77 G4double pp = currentParticle.GetMomentum().mag();
81 currentParticle.SetMomentum( momentum * (p/pp) );
88 currentParticle.SetKineticEnergy( ek );
90 p = std::sqrt(
std::abs((et-amas)*(et+amas)) );
91 pp = currentParticle.GetMomentum().mag();
95 currentParticle.SetMomentum( momentum * (p/pp) );
101 targetParticle.SetSide( -1 );
102 G4bool incidentHasChanged =
false;
103 G4bool targetHasChanged =
false;
104 G4bool quasiElastic =
false;
110 if( currentParticle.GetKineticEnergy() > cutOff )
112 originalIncident, currentParticle, targetParticle,
113 incidentHasChanged, targetHasChanged, quasiElastic );
116 originalIncident, originalTarget, modifiedOriginal,
117 targetNucleus, currentParticle, targetParticle,
118 incidentHasChanged, targetHasChanged, quasiElastic );
121 currentParticle, targetParticle,
122 incidentHasChanged );
124 delete originalTarget;
135 G4bool &incidentHasChanged,
153 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
154 targetMass*targetMass +
155 2.0*targetMass*etOriginal );
156 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
159 const G4int numMul = 1200;
160 const G4int numSec = 60;
164 G4int 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=
std::max(0,np-1); nneg<=(np+1); ++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=np; nneg<=(np+2); ++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];
234 const G4double cech[] = {1.,1.,1.,0.70,0.60,0.55,0.35,0.25,0.18,0.15};
238 np = nneg = nz = nt = 0;
240 const G4double cnk0[] = {0.17,0.18,0.17,0.24,0.26,0.20,0.22,0.21,0.34,0.45,
241 0.58,0.55,0.36,0.29,0.29,0.32,0.32,0.33,0.33,0.33};
248 incidentHasChanged =
true;
250 targetHasChanged =
true;
262 incidentHasChanged =
true;
263 targetHasChanged =
true;
266 else if( ran < 0.50 )
273 incidentHasChanged =
true;
274 targetHasChanged =
true;
276 else if( ran < 0.75 )
283 incidentHasChanged =
true;
284 targetHasChanged =
true;
293 incidentHasChanged =
true;
294 targetHasChanged =
true;
300 if( availableEnergy < aPiPlus->GetPDGMass() )
312 for( np=0; np<numSec/3 && ran>=excs; ++np )
314 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
316 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
318 if( ++counter < numMul )
324 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
325 if( std::fabs(dum) < 1.0 )
327 if( test >= 1.0
e-10 )excs += dum*
test;
348 incidentHasChanged =
true;
349 targetHasChanged =
true;
352 else if( np == nneg+1 )
355 targetHasChanged =
true;
360 incidentHasChanged =
true;
366 for( np=0; np<numSec/3 && ran>=excs; ++np )
368 for( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg )
370 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
372 if( ++counter < numMul )
375 if( (nt>=1) && (nt<=numSec) )
378 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
379 if( std::fabs(dum) < 1.0 )
381 if( test >= 1.0
e-10 )excs += dum*
test;
401 targetHasChanged =
true;
406 incidentHasChanged =
true;
409 else if( np != nneg )
412 incidentHasChanged =
true;
429 incidentHasChanged =
true;
430 targetHasChanged =
true;
436 incidentHasChanged =
true;
437 targetHasChanged =
true;
440 else if( ran < 0.84 )
446 incidentHasChanged =
true;
447 targetHasChanged =
true;
453 incidentHasChanged =
true;
454 targetHasChanged =
true;
463 incidentHasChanged =
true;
464 targetHasChanged =
true;
470 incidentHasChanged =
true;
471 targetHasChanged =
true;
483 incidentHasChanged =
true;
484 targetHasChanged =
true;
486 else if( ran < 0.78 )
490 incidentHasChanged =
true;
491 targetHasChanged =
true;
493 else if( ran < 0.89 )
497 incidentHasChanged =
true;
498 targetHasChanged =
true;
504 incidentHasChanged =
true;
505 targetHasChanged =
true;
514 incidentHasChanged =
true;
521 targetHasChanged =
true;