198{
199 cache = 0;
201
203 originalTarget, currentParticle,
204 targetParticle, incidentHasChanged,
205 targetHasChanged);
206
207 if (quasiElastic) {
209 modifiedOriginal, originalTarget,
210 currentParticle, targetParticle,
211 targetNucleus, targetHasChanged);
212 return;
213 }
216 targetParticle,
217 leadingStrangeParticle);
218
219
220 G4bool finishedGenXPt =
false;
221 G4bool annihilation =
false;
223 currentParticle.
GetMass() == 0.0 && targetParticle.
GetMass() == 0.0 )
224 {
225
226 annihilation = true;
230
232 if( ek > 1.0*GeV )ekcor = 1./(ek/GeV);
234 ek = 2*tarmas + ek*(1.+ekcor/atomicWeight);
236 ek += tkin;
237 ekOrg += tkin;
238
239
240
241
242
244 ekOrg -= tkin;
245 ekOrg = std::max( 0.0001*GeV, ekOrg );
249 G4double p = std::sqrt( std::abs(et*et-amas*amas) );
251 if( pp > 0.0 )
252 {
255 }
256 if( ekOrg <= 0.0001 )
257 {
260 }
261 }
262 const G4double twsup[] = { 1.0, 0.7, 0.5, 0.3, 0.2, 0.1 };
265
266
269 std::vector<G4ReactionProduct> savevec;
270 for (
G4int i = 0; i < vecLen; i++) savevec.push_back(*vec[i]);
271
272 if (annihilation ||
273 vecLen >= 6 ||
279 &&
280 rand1 < 0.5 )
281 || rand2 > twsup[vecLen] ) ) )
282
283 finishedGenXPt =
285 modifiedOriginal, originalIncident,
286 currentParticle, targetParticle,
287 originalTarget,
288 targetNucleus, incidentHasChanged,
289 targetHasChanged, leadFlag,
290 leadingStrangeParticle );
291 if( finishedGenXPt )
292 {
294 return;
295 }
296
297 G4bool finishedTwoClu =
false;
299 {
300 for(
G4int i=0; i<vecLen; i++)
delete vec[i];
301 vecLen = 0;
302 }
303 else
304 {
305
306
307
308
309 if (!finishedGenXPt && annihilation) {
310 currentParticle = saveCurrent;
311 targetParticle = saveTarget;
312 for (
G4int i = 0; i < vecLen; i++)
delete vec[i];
313 vecLen = 0;
315 for (
G4int i = 0; i <
G4int(savevec.size()); i++) {
317 *p = savevec[i];
319 }
320 }
321
323 modifiedOriginal, currentParticle,
324 targetParticle, targetNucleus,
325 incidentHasChanged, targetHasChanged );
326 try
327 {
329 modifiedOriginal, originalIncident,
330 currentParticle, targetParticle,
331 originalTarget,
332 targetNucleus, incidentHasChanged,
333 targetHasChanged, leadFlag,
334 leadingStrangeParticle );
335 }
337 {
340 }
341 }
342
343 if (finishedTwoClu) {
345 return;
346 }
347
349 currentParticle, targetParticle,
350 targetNucleus, targetHasChanged);
351}
G4DLLIMPORT std::ostream G4cout
G4ParticleDefinition * GetDefinition() const
void SetElement(G4int anIndex, Type *anElement)
void Initialize(G4int items)
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
void Report(std::ostream &aS)
void Rotate(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen)
G4ReactionDynamics theReactionDynamics
G4bool MarkLeadingStrangeParticle(const G4ReactionProduct ¤tParticle, const G4ReactionProduct &targetParticle, G4ReactionProduct &leadParticle)
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4KaonZeroLong * KaonZeroLong()
static G4KaonZeroShort * KaonZeroShort()
G4double AnnihilationEvaporationEffects(G4double kineticEnergy, G4double ekOrg)
G4double Cinema(G4double kineticEnergy)
G4double GetPDGMass() const
G4int GetPDGEncoding() const
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 SetKineticEnergy(const G4double en)