73 for (i = 2; i <= npos; i++) npf += std::log((
G4double)i);
74 for (i = 2; i <= nneg; i++) nmf += std::log((
G4double)i);
75 for (i = 2; i <= nzero; i++) nzf += std::log((
G4double)i);
76 G4double r = std::min(expxu, std::max(expxl,
77 -(npos-nneg+nzero+b)*(npos-nneg+nzero+b)/(2*c*c*n*n)
78 - npf - nmf - nzf ) );
98 leadParticle = currentParticle;
104 leadParticle = targetParticle;
117 if (npos + nneg + nzero == 0)
return;
121 for (i = 0; i < npos; ++i) {
127 for (i = npos; i < npos+nneg; ++i) {
133 for (i = npos+nneg; i < npos+nneg+nzero; ++i) {
150 const G4int numSec = 60;
166 n = 3.62567 + aleab*(0.665843 + aleab*(0.336514 + aleab*(0.117712 + 0.0136912*aleab)));
173 for(
G4int i=iBegin; i<=numSec; ++i )
175 temp =
pi*i/(2.0*n*
n);
176 test = std::exp( std::min( expxu, std::max( expxl, -(
pi/4.0)*(i*i)/(n*n) ) ) );
179 if( test >= 1.0
e-10 )anpn += temp*
test;
195 G4bool& incidentHasChanged,
203 originalTarget, currentParticle,
204 targetParticle, incidentHasChanged,
209 modifiedOriginal, originalTarget,
210 currentParticle, targetParticle,
211 targetNucleus, targetHasChanged);
217 leadingStrangeParticle);
220 G4bool finishedGenXPt =
false;
221 G4bool annihilation =
false;
223 currentParticle.
GetMass() == 0.0 && targetParticle.
GetMass() == 0.0 )
232 if( ek > 1.0*
GeV )ekcor = 1./(ek/
GeV);
234 ek = 2*tarmas + ek*(1.+ekcor/atomicWeight);
245 ekOrg = std::max( 0.0001*
GeV, ekOrg );
249 G4double p = std::sqrt( std::abs(et*et-amas*amas) );
256 if( ekOrg <= 0.0001 )
262 const G4double twsup[] = { 1.0, 0.7, 0.5, 0.3, 0.2, 0.1 };
269 std::vector<G4ReactionProduct> savevec;
270 for (
G4int i = 0; i < vecLen; i++) savevec.push_back(*vec[i]);
281 || rand2 > twsup[vecLen] ) ) )
285 modifiedOriginal, originalIncident,
286 currentParticle, targetParticle,
288 targetNucleus, incidentHasChanged,
289 targetHasChanged, leadFlag,
290 leadingStrangeParticle );
297 G4bool finishedTwoClu =
false;
300 for(
G4int i=0; i<vecLen; i++)
delete vec[i];
309 if (!finishedGenXPt && annihilation) {
310 currentParticle = saveCurrent;
311 targetParticle = saveTarget;
312 for (
G4int i = 0; i < vecLen; i++)
delete vec[i];
315 for (
G4int i = 0; i <
G4int(savevec.size()); i++) {
323 modifiedOriginal, currentParticle,
324 targetParticle, targetNucleus,
325 incidentHasChanged, targetHasChanged );
329 modifiedOriginal, originalIncident,
330 currentParticle, targetParticle,
332 targetNucleus, incidentHasChanged,
333 targetHasChanged, leadFlag,
334 leadingStrangeParticle );
343 if (finishedTwoClu) {
349 currentParticle, targetParticle,
350 targetNucleus, targetHasChanged);
360 for (i = 0; i < vecLen; ++i) {
362 momentum = momentum.
rotate(rotation, what);
363 vec[i]->SetMomentum(momentum);
373 G4bool& incidentHasChanged)
382 incidentHasChanged =
true;
387 incidentHasChanged =
true;
397 for (i = 0; i < vecLen; ++i) {
398 if (vec[i]->GetDefinition() == aKaonZL) {
400 }
else if (vec[i]->GetDefinition() == aKaonZS) {
405 if (incidentHasChanged) {
421 if (std::fabs(aE) < .1*
eV) aE = .1*
eV;
425 if (targetParticle.
GetMass() > 0.0) {
430 momentum = momentum.
rotate(cache, what);
436 for (i = 0; i < vecLen; ++i) {
447 if(theIsoResult) theOldIsoResult = theIsoResult;
457 delete theOldIsoResult;
462 G4int nModels = theProductionModels.size();
464 for (
G4int i = 0; i < nModels; i++) {
465 anIsoResult = theProductionModels[i]->GetIsotope(theProjectile, aNucleus);
466 if (anIsoResult)
break;
537 std::ostringstream ost1;
538 ost1 << Z <<
"_" << A;
548 return std::pair<G4double, G4double>(5*
perCent,250*
GeV);