56 G4cout <<
"G4RPGOmegaMinusInelastic::ApplyYourself called" <<
G4endl;
58 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
76 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
90 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
101 targetParticle.SetSide( -1 );
102 G4bool incidentHasChanged =
false;
103 G4bool targetHasChanged =
false;
104 G4bool quasiElastic =
false;
111 Cascade( vec, vecLen,
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;
129 void G4RPGOmegaMinusInelastic::Cascade(
135 G4bool &incidentHasChanged,
152 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
153 targetMass*targetMass +
154 2.0*targetMass*etOriginal );
155 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
161 static G4bool first =
true;
162 const G4int numMul = 1200;
163 const G4int numSec = 60;
164 static G4double protmul[numMul], protnorm[numSec];
165 static G4double neutmul[numMul], neutnorm[numSec];
167 G4int counter,
nt=0, np=0, nneg=0, nz=0;
175 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
176 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
178 for( np=0; np<(numSec/3); ++np )
180 for( nneg=std::max(0,np-1); nneg<=(np+1); ++nneg )
182 for( nz=0; nz<numSec/3; ++nz )
184 if( ++counter < numMul )
189 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
190 protnorm[nt-1] += protmul[counter];
196 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
197 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
199 for( np=0; np<numSec/3; ++np )
201 for( nneg=np; nneg<=(np+2); ++nneg )
203 for( nz=0; nz<numSec/3; ++nz )
205 if( ++counter < numMul )
208 if( (nt>0) && (nt<=numSec) )
210 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
211 neutnorm[nt-1] += neutmul[counter];
217 for( i=0; i<numSec; ++i )
219 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
220 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 )
253 test = std::exp( std::min( expxu, std::max( expxl, -(
pi/4.0)*(nt*nt)/(n*n) ) ) );
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;
276 for( np=0; np<numSec/3 && ran>=excs; ++np )
278 for( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg )
280 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
282 if( ++counter < numMul )
285 if( (nt>=1) && (nt<=numSec) )
287 test = std::exp( std::min( expxu, std::max( expxl, -(
pi/4.0)*(nt*nt)/(n*n) ) ) );
288 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
289 if( std::fabs(dum) < 1.0 )
291 if( test >= 1.0
e-10 )excs += dum*
test;
327 incidentHasChanged =
true;
332 targetHasChanged =
true;
342 incidentHasChanged =
true;
348 incidentHasChanged =
true;
352 targetHasChanged =
true;
354 else if( nneg == np+1 )
357 targetHasChanged =
true;
362 for (
G4int i = 0; i < vecLen && nvefix > 0; ++i) {
363 if (vec[i]->GetDefinition() == aPiMinus) {
364 if( nvefix >= 1 )vec[i]->SetDefinitionAndUpdateE(aKaonMinus);