43 outFile <<
"G4LEAntiXiMinusInelastic is one of the Low Energy Parameterized\n"
44 <<
"(LEP) models used to implement inelastic antiXi- scattering\n"
45 <<
"from nuclei. It is a re-engineered version of the GHEISHA\n"
46 <<
"code of H. Fesefeldt. It divides the initial collision\n"
47 <<
"products into backward- and forward-going clusters which are\n"
48 <<
"then decayed into final state hadrons. The model does not\n"
49 <<
"conserve energy on an event-by-event basis. It may be applied\n"
50 <<
"to antiXi- with initial energies between 0 and 25 GeV.\n";
70 G4cout <<
"G4LEAntiXiMinusInelastic::ApplyYourself called" <<
G4endl;
72 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
82 modifiedOriginal = *originalIncident;
88 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
100 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
108 targetParticle = *originalTarget;
111 G4bool incidentHasChanged =
false;
112 G4bool targetHasChanged =
false;
113 G4bool quasiElastic =
false;
121 Cascade(vec, vecLen, originalIncident, currentParticle, targetParticle,
122 incidentHasChanged, targetHasChanged, quasiElastic);
125 modifiedOriginal, targetNucleus, currentParticle,
126 targetParticle, incidentHasChanged, targetHasChanged,
129 SetUpChange(vec, vecLen, currentParticle, targetParticle, incidentHasChanged);
133 delete originalTarget;
138 void G4LEAntiXiMinusInelastic::Cascade(
144 G4bool &incidentHasChanged,
162 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
163 targetMass*targetMass +
164 2.0*targetMass*etOriginal );
165 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
171 static G4bool first =
true;
172 const G4int numMul = 1200;
173 const G4int numSec = 60;
174 static G4double protmul[numMul], protnorm[numSec];
175 static G4double neutmul[numMul], neutnorm[numSec];
177 G4int counter,
nt=0, npos=0, nneg=0, nzero=0;
185 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
186 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
188 for( npos=0; npos<(numSec/3); ++npos )
190 for( nneg=std::max(0,npos-1); nneg<=(npos+1); ++nneg )
192 for( nzero=0; nzero<numSec/3; ++nzero )
194 if( ++counter < numMul )
196 nt = npos+nneg+nzero;
197 if( nt>0 && nt<=numSec )
199 protmul[counter] =
Pmltpc(npos,nneg,nzero,nt,b[0],c);
200 protnorm[nt-1] += protmul[counter];
206 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
207 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
209 for( npos=0; npos<numSec/3; ++npos )
211 for( nneg=npos; nneg<=(npos+2); ++nneg )
213 for( nzero=0; nzero<numSec/3; ++nzero )
215 if( ++counter < numMul )
217 nt = npos+nneg+nzero;
218 if( nt>0 && nt<=numSec )
220 neutmul[counter] =
Pmltpc(npos,nneg,nzero,nt,b[1],c);
221 neutnorm[nt-1] += neutmul[counter];
227 for( i=0; i<numSec; ++i )
229 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
230 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
251 for( npos=0; npos<numSec/3 && ran>=excs; ++npos )
253 for( nneg=std::max(0,npos-1); nneg<=(npos+1) && ran>=excs; ++nneg )
255 for( nzero=0; nzero<numSec/3 && ran>=excs; ++nzero )
257 if( ++counter < numMul )
259 nt = npos+nneg+nzero;
260 if( nt>0 && nt<=numSec )
262 test = std::exp( std::min( expxu, std::max( expxl, -(
pi/4.0)*(nt*nt)/(n*n) ) ) );
263 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
264 if( std::fabs(dum) < 1.0 )
266 if( test >= 1.0
e-10 )excs += dum*
test;
280 npos--; nneg--; nzero--;
292 incidentHasChanged =
true;
297 incidentHasChanged =
true;
309 else if( npos == nneg )
314 incidentHasChanged =
true;
316 targetHasChanged =
true;
322 targetHasChanged =
true;
328 for( npos=0; npos<numSec/3 && ran>=excs; ++npos )
330 for( nneg=npos; nneg<=(npos+2) && ran>=excs; ++nneg )
332 for( nzero=0; nzero<numSec/3 && ran>=excs; ++nzero )
334 if( ++counter < numMul )
336 nt = npos+nneg+nzero;
337 if( nt>0 && nt<=numSec )
339 test = std::exp( std::min( expxu, std::max( expxl, -(
pi/4.0)*(nt*nt)/(n*n) ) ) );
340 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
341 if( std::fabs(dum) < 1.0 )
343 if( test >= 1.0
e-10 )excs += dum*
test;
357 npos--; nneg--; nzero--;
363 incidentHasChanged =
true;
365 targetHasChanged =
true;
370 incidentHasChanged =
true;
372 targetHasChanged =
true;
384 else if( npos+1 == nneg )
389 incidentHasChanged =
true;
394 targetHasChanged =
true;