56 G4cout <<
"G4RPGOmegaMinusInelastic::ApplyYourself called" <<
G4endl;
58 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
75 currentParticle.SetKineticEnergy( ek );
78 G4double pp = currentParticle.GetMomentum().mag();
82 currentParticle.SetMomentum( momentum * (p/pp) );
89 currentParticle.SetKineticEnergy( ek );
91 p = std::sqrt(
std::abs((et-amas)*(et+amas)) );
92 pp = currentParticle.GetMomentum().mag();
96 currentParticle.SetMomentum( momentum * (p/pp) );
102 targetParticle.SetSide( -1 );
103 G4bool incidentHasChanged =
false;
104 G4bool targetHasChanged =
false;
105 G4bool quasiElastic =
false;
111 if( currentParticle.GetKineticEnergy() > cutOff )
113 originalIncident, currentParticle, targetParticle,
114 incidentHasChanged, targetHasChanged, quasiElastic );
117 originalIncident, originalTarget, modifiedOriginal,
118 targetNucleus, currentParticle, targetParticle,
119 incidentHasChanged, targetHasChanged, quasiElastic );
122 currentParticle, targetParticle,
123 incidentHasChanged );
125 delete originalTarget;
136 G4bool &incidentHasChanged,
153 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
154 targetMass*targetMass +
155 2.0*targetMass*etOriginal );
156 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
163 const G4int numMul = 1200;
164 const G4int numSec = 60;
168 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 )
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];
243 for( np=0; np<numSec/3 && ran>=excs; ++np )
245 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
247 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
249 if( ++counter < numMul )
255 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
256 if( std::fabs(dum) < 1.0 )
258 if( test >= 1.0
e-10 )excs += dum*
test;
277 for( np=0; np<numSec/3 && ran>=excs; ++np )
279 for( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg )
281 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
283 if( ++counter < numMul )
286 if( (nt>=1) && (nt<=numSec) )
289 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
290 if( std::fabs(dum) < 1.0 )
292 if( test >= 1.0
e-10 )excs += dum*
test;
328 incidentHasChanged =
true;
333 targetHasChanged =
true;
343 incidentHasChanged =
true;
349 incidentHasChanged =
true;
353 targetHasChanged =
true;
355 else if( nneg == np+1 )
358 targetHasChanged =
true;
363 for (
G4int i = 0; i < vecLen && nvefix > 0; ++i) {
364 if (vec[i]->GetDefinition() == aPiMinus) {
365 if( nvefix >= 1 )vec[i]->SetDefinitionAndUpdateE(aKaonMinus);