47 G4cout <<
"G4RPGAntiNeutronInelastic::ApplyYourself called" <<
G4endl;
49 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
60 modifiedOriginal = *originalIncident;
80 p = std::sqrt(
std::abs((et-amas)*(et+amas)) );
90 targetParticle = *originalTarget;
93 G4bool incidentHasChanged =
false;
94 G4bool targetHasChanged =
false;
95 G4bool quasiElastic =
false;
106 originalIncident, currentParticle, targetParticle,
107 incidentHasChanged, targetHasChanged, quasiElastic );
112 originalIncident, originalTarget, modifiedOriginal,
113 targetNucleus, currentParticle, targetParticle,
114 incidentHasChanged, targetHasChanged, quasiElastic );
117 currentParticle, targetParticle,
118 incidentHasChanged );
120 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);
154 const G4int numMul = 1200;
155 const G4int numMulA = 400;
156 const G4int numSec = 60;
163 G4int counter, nt=0, np=0, nneg=0, nz=0;
170 for (i = 0; i < numMul; ++i) protmul[i] = 0.0;
171 for (i = 0; i < numSec; ++i) protnorm[i] = 0.0;
173 for (np = 0; np < (numSec/3); ++np) {
174 for (nneg =
std::max(0,np-2); nneg <= np; ++nneg) {
175 for (nz = 0; nz < numSec/3; ++nz) {
176 if (++counter < numMul) {
178 if (nt > 0 && nt <= numSec) {
179 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
180 protnorm[nt-1] += protmul[counter];
187 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
188 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
190 for (np = 0; np < numSec/3; ++np) {
191 for (nneg=
std::max(0,np-1); nneg<=(np+1); ++nneg ) {
192 for (nz=0; nz<numSec/3; ++nz ) {
193 if (++counter < numMul ) {
195 if ((nt>0) && (nt<=numSec) ) {
196 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
197 neutnorm[nt-1] += neutmul[counter];
204 for (i=0; i<numSec; ++i ) {
205 if (protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
206 if (neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
211 for( i=0; i<numMulA; ++i )protmulA[i] = 0.0;
212 for( i=0; i<numSec; ++i )protnormA[i] = 0.0;
215 for (np=1; np<(numSec/3); ++np ) {
217 for (nz=0; nz<numSec/3; ++nz ) {
218 if (++counter < numMulA ) {
220 if (nt>1 && nt<=numSec ) {
221 protmulA[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
222 protnormA[nt-1] += protmulA[counter];
228 for( i=0; i<numMulA; ++i )neutmulA[i] = 0.0;
229 for( i=0; i<numSec; ++i )neutnormA[i] = 0.0;
231 for (np=0; np<numSec/3; ++np ) {
233 for (nz=0; nz<numSec/3; ++nz) {
234 if (++counter < numMulA ) {
236 if (nt>1 && nt<=numSec ) {
237 neutmulA[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
238 neutnormA[nt-1] += neutmulA[counter];
244 for (i=0; i<numSec; ++i ) {
245 if( protnormA[i] > 0.0 )protnormA[i] = 1.0/protnormA[i];
246 if( neutnormA[i] > 0.0 )neutnormA[i] = 1.0/neutnormA[i];
260 const G4double anhl[] = {1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,0.97,0.88,
261 0.85,0.81,0.75,0.64,0.64,0.55,0.55,0.45,0.47,0.40,
262 0.39,0.36,0.33,0.10,0.01};
264 if( iplab > 9 )iplab =
G4int( (pOriginal/
GeV- 1.0)*5.0 ) + 10;
265 if( iplab > 14 )iplab =
G4int( pOriginal/
GeV- 2.0 ) + 15;
266 if( iplab > 22 )iplab =
G4int( (pOriginal/
GeV-10.0)/10.0 ) + 23;
267 if( iplab > 24 )iplab = 24;
270 if( availableEnergy <= aPiPlus->GetPDGMass()/
MeV )
276 const G4double supp[] = {0.,0.4,0.55,0.65,0.75,0.82,0.86,0.90,0.94,0.98};
306 else if( ran < wp/wt )
321 for( np=0; np<numSec/3 && ran>=excs; ++np )
323 for( nneg=
std::max(0,np-2); nneg<=np && ran>=excs; ++nneg )
325 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
327 if( ++counter < numMul )
333 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
334 if( std::fabs(dum) < 1.0 )
336 if( test >= 1.0
e-10 )excs += dum*
test;
355 for( np=0; np<numSec/3 && ran>=excs; ++np )
357 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
359 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
361 if( ++counter < numMul )
364 if( (nt>=1) && (nt<=numSec) )
367 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
368 if( std::fabs(dum) < 1.0 )
370 if( test >= 1.0
e-10 )excs += dum*
test;
395 incidentHasChanged =
true;
400 targetHasChanged =
true;
406 incidentHasChanged =
true;
407 targetHasChanged =
true;
422 incidentHasChanged =
true;
423 targetHasChanged =
true;
428 incidentHasChanged =
true;
432 targetHasChanged =
true;
437 if (centerofmassEnergy <= 2*aPiPlus->GetPDGMass()/
MeV ) {
451 for (np=1; (np<numSec/3) && (ran>=excs); ++np ) {
453 for (nz=0; (nz<numSec/3) && (ran>=excs); ++nz ) {
454 if (++counter < numMulA) {
456 if (nt>1 && nt<=numSec ) {
458 dum = (
pi/anpn)*nt*protmulA[counter]*protnormA[nt-1]/(2.0*n*n);
459 if (std::fabs(dum) < 1.0 ) {
460 if (test >= 1.0
e-10) excs += dum*
test;
470 for (np=0; (np<numSec/3) && (ran>=excs); ++np ) {
472 for (nz=0; (nz<numSec/3) && (ran>=excs); ++nz ) {
473 if (++counter < numMulA ) {
475 if ((nt>1) && (nt<=numSec) ) {
477 dum = (
pi/anpn)*nt*neutmulA[counter]*neutnormA[nt-1]/(2.0*n*n);
478 if (std::fabs(dum) < 1.0 ) {
479 if( test >= 1.0
e-10 )excs += dum*
test;
494 currentParticle.
SetMass( 0.0 );
500 ed <<
" While count exceeded " <<
G4endl;
501 while(np+nneg+nz<3) {