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.0e-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);
G4DLLIMPORT std::ostream G4cout
Hep3Vector & rotate(double, const Hep3Vector &)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
const G4ParticleDefinition * GetParticleDefinition() const
G4ParticleDefinition * GetDefinition() const
void SetMomentum(const G4ThreeVector &momentum)
void SetElement(G4int anIndex, Type *anElement)
void Initialize(G4int items)
void SetStatusChange(G4HadFinalStateStatus aS)
G4int GetNumberOfSecondaries() const
void AddSecondary(G4DynamicParticle *aP)
void SetEnergyChange(G4double anEnergy)
G4HadSecondary * GetSecondary(size_t i)
void SetMomentumChange(const G4ThreeVector &aV)
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double GetGlobalTime() const
void Report(std::ostream &aS)
G4DynamicParticle * GetParticle()
G4HadFinalState theParticleChange
const G4String & GetModelName() const
G4IsoResult * ExtractResidualNucleus(const G4Nucleus &aNucleus)
static G4IsoParticleChange * GetIsotopeProductionInfo()
void Rotate(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen)
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
void GetNormalizationConstant(const G4double availableEnergy, G4double &n, G4double &anpn)
G4ReactionDynamics theReactionDynamics
G4InelasticInteraction(const G4String &name="LEInelastic")
void SetUpPions(const G4int np, const G4int nm, const G4int nz, G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen)
void CalculateMomenta(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, const G4DynamicParticle *originalTarget, G4ReactionProduct &modifiedOriginal, G4Nucleus &targetNucleus, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool quasiElastic)
virtual const std::pair< G4double, G4double > GetFatalEnergyCheckLevels() const
void DoIsotopeCounting(const G4HadProjectile *theProjectile, const G4Nucleus &aNucleus)
virtual ~G4InelasticInteraction()
G4bool MarkLeadingStrangeParticle(const G4ReactionProduct ¤tParticle, const G4ReactionProduct &targetParticle, G4ReactionProduct &leadParticle)
void SetUpChange(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
void SetProducer(const G4String &aProducer)
void SetIsotope(const G4String &anIsotope)
void SetProductionTime(const G4double &aProductionTime)
void SetMotherNucleus(const G4Nucleus &aTarget)
void SetParentParticle(const G4ParticleDefinition *aProjectile)
G4Nucleus GetMotherNucleus()
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4KaonZeroLong * KaonZeroLong()
static G4KaonZeroShort * KaonZeroShort()
static G4Neutron * Neutron()
G4double AnnihilationEvaporationEffects(G4double kineticEnergy, G4double ekOrg)
G4double Cinema(G4double kineticEnergy)
G4double GetPDGMass() const
G4int GetPDGEncoding() const
G4double GetPDGCharge() const
G4int GetBaryonNumber() const
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
static G4PionZero * PionZero()
static G4Proton * Proton()
G4bool TwoCluster(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, G4ReactionProduct &modifiedOriginal, const G4HadProjectile *originalIncident, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, const G4DynamicParticle *originalTarget, const G4Nucleus &targetNucleus, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool leadFlag, G4ReactionProduct &leadingStrangeParticle)
void SuppressChargedPions(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, const G4ReactionProduct &modifiedOriginal, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, const G4Nucleus &targetNucleus, G4bool &incidentHasChanged, G4bool &targetHasChanged)
void ProduceStrangeParticlePairs(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, const G4ReactionProduct &modifiedOriginal, const G4DynamicParticle *originalTarget, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged)
G4bool GenerateXandPt(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, G4ReactionProduct &modifiedOriginal, const G4HadProjectile *originalIncident, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, const G4DynamicParticle *originalTarget, const G4Nucleus &targetNucleus, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool leadFlag, G4ReactionProduct &leadingStrangeParticle)
void TwoBody(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, G4ReactionProduct &modifiedOriginal, const G4DynamicParticle *originalTarget, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, const G4Nucleus &targetNucleus, G4bool &targetHasChanged)
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double GetTotalMomentum() const
G4double GetKineticEnergy() const
G4ThreeVector GetMomentum() const
void SetSide(const G4int sid)
void SetKineticEnergy(const G4double en)
G4ParticleDefinition * GetDefinition() const
void SetDefinition(G4ParticleDefinition *aParticleDefinition)