44 G4bool& incidentHasChanged,
65 if( vecLen == 0 )
return true;
69 if( currentParticle.
GetMass() == 0.0 || targetParticle.
GetMass() == 0.0 )
return true;
74 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
75 targetMass*targetMass +
76 2.0*targetMass*etOriginal );
78 G4double availableEnergy = centerofmassEnergy-(targetMass+currentMass);
79 if( availableEnergy <= 1.0 )
return true;
103 const G4double avrs[] = {3.,4.,5.,6.,7.,8.,9.,10.,20.,30.,40.,50.};
108 while( (i<12) && (centerofmassEnergy>avrs[i]) )++i;
123 i4 = i3 =
G4int(vecLen*rnd);
127 i4 =
G4int(vecLen*rnd);
133 const G4double avkkb[] = { 0.0015, 0.005, 0.012, 0.0285, 0.0525, 0.075,
134 0.0975, 0.123, 0.28, 0.398, 0.495, 0.573 };
135 const G4double avky[] = { 0.005, 0.03, 0.064, 0.095, 0.115, 0.13,
136 0.145, 0.155, 0.20, 0.205, 0.210, 0.212 };
137 const G4double avnnb[] = { 0.00001, 0.0001, 0.0006, 0.0025, 0.01, 0.02,
138 0.04, 0.05, 0.12, 0.15, 0.18, 0.20 };
140 avk = (std::log(avkkb[ibin])-std::log(avkkb[ibin-1]))*(centerofmassEnergy-avrs[ibin-1])
141 /(avrs[ibin]-avrs[ibin-1]) + std::log(avkkb[ibin-1]);
144 avy = (std::log(avky[ibin])-std::log(avky[ibin-1]))*(centerofmassEnergy-avrs[ibin-1])
145 /(avrs[ibin]-avrs[ibin-1]) + std::log(avky[ibin-1]);
148 avn = (std::log(avnnb[ibin])-std::log(avnnb[ibin-1]))*(centerofmassEnergy-avrs[ibin-1])
149 /(avrs[ibin]-avrs[ibin-1]) + std::log(avnnb[ibin-1]);
152 if( avk+avy+avn <= 0.0 )
return true;
154 if( currentMass < protonMass )avy /= 2.0;
155 if( targetMass < protonMass )avy = 0.0;
161 if( availableEnergy < 2.0 )
return true;
167 vec[0]->SetDefinition( aNeutron );
170 vec[0]->SetMayBeKilled(
false);
175 vec[0]->SetDefinition( aProton );
178 vec[0]->SetMayBeKilled(
false);
188 vec[i3]->SetDefinition( aNeutron );
189 vec[i4]->SetDefinition( anAntiNeutron );
190 vec[i3]->SetMayBeKilled(
false);
191 vec[i4]->SetMayBeKilled(
false);
195 vec[i3]->SetDefinition( aProton );
196 vec[i4]->SetDefinition( anAntiProton );
197 vec[i3]->SetMayBeKilled(
false);
198 vec[i4]->SetMayBeKilled(
false);
204 if( availableEnergy < 1.0 )
return true;
206 const G4double kkb[] = { 0.2500, 0.3750, 0.5000, 0.5625, 0.6250,
207 0.6875, 0.7500, 0.8750, 1.000 };
208 const G4int ipakkb1[] = { 10, 10, 10, 11, 11, 12, 12, 11, 12 };
209 const G4int ipakkb2[] = { 13, 11, 12, 11, 12, 11, 12, 13, 13 };
212 while( (i<9) && (ran>=kkb[i]) )++i;
213 if( i == 9 )
return true;
221 vec[i3]->SetDefinition( aKaonPlus );
222 vec[i3]->SetMayBeKilled(
false);
225 vec[i3]->SetDefinition( aKaonZS );
226 vec[i3]->SetMayBeKilled(
false);
229 vec[i3]->SetDefinition( aKaonZL );
230 vec[i3]->SetMayBeKilled(
false);
261 vec[i4]->SetDefinition( aKaonZS );
262 vec[i4]->SetMayBeKilled(
false);
265 vec[i4]->SetDefinition( aKaonZL );
266 vec[i4]->SetMayBeKilled(
false);
269 vec[i4]->SetDefinition( aKaonMinus );
270 vec[i4]->SetMayBeKilled(
false);
277 if( availableEnergy < 1.6 )
return true;
279 const G4double ky[] = { 0.200, 0.300, 0.400, 0.550, 0.625, 0.700,
280 0.800, 0.850, 0.900, 0.950, 0.975, 1.000 };
281 const G4int ipaky1[] = { 18, 18, 18, 20, 20, 20, 21, 21, 21, 22, 22, 22 };
282 const G4int ipaky2[] = { 10, 11, 12, 10, 11, 12, 10, 11, 12, 10, 11, 12 };
283 const G4int ipakyb1[] = { 19, 19, 19, 23, 23, 23, 24, 24, 24, 25, 25, 25 };
284 const G4int ipakyb2[] = { 13, 12, 11, 13, 12, 11, 13, 12, 11, 13, 12, 11 };
287 while( (i<12) && (ran>ky[i]) )++i;
288 if( i == 12 )
return true;
311 targetHasChanged =
true;
315 vec[i3]->SetDefinition( aKaonPlus );
316 vec[i3]->SetMayBeKilled(
false);
319 vec[i3]->SetDefinition( aKaonZS );
320 vec[i3]->SetMayBeKilled(
false);
323 vec[i3]->SetDefinition( aKaonZL );
324 vec[i3]->SetMayBeKilled(
false);
335 (currentMass > sigmaMinusMass) )
352 incidentHasChanged =
true;
356 vec[i3]->SetDefinition( aKaonZS );
357 vec[i3]->SetMayBeKilled(
false);
360 vec[i3]->SetDefinition( aKaonZL );
361 vec[i3]->SetMayBeKilled(
false);
364 vec[i3]->SetDefinition( aKaonMinus );
365 vec[i3]->SetMayBeKilled(
false);
386 incidentHasChanged =
true;
390 vec[i3]->SetDefinition( aKaonPlus );
391 vec[i3]->SetMayBeKilled(
false);
394 vec[i3]->SetDefinition( aKaonZS );
395 vec[i3]->SetMayBeKilled(
false);
398 vec[i3]->SetDefinition( aKaonZL );
399 vec[i3]->SetMayBeKilled(
false);
416 currentMass = currentParticle.
GetMass()/GeV;
417 targetMass = targetParticle.
GetMass()/GeV;
419 G4double energyCheck = centerofmassEnergy-(currentMass+targetMass);
420 for( i=0; i<vecLen; ++i )
422 energyCheck -= vec[i]->GetMass()/GeV;
423 if( energyCheck < 0.0 )
425 vecLen = std::max( 0, --i );
427 for(j=i; j<vecLen; j++)
delete vec[j];
static G4AntiLambda * AntiLambda()
static G4AntiNeutron * AntiNeutron()
static G4AntiProton * AntiProton()
static G4AntiSigmaMinus * AntiSigmaMinus()
static G4AntiSigmaPlus * AntiSigmaPlus()
static G4AntiSigmaZero * AntiSigmaZero()
G4ParticleDefinition * GetDefinition() const
void SetElement(G4int anIndex, Type *anElement)
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4KaonZeroLong * KaonZeroLong()
static G4KaonZeroShort * KaonZeroShort()
static G4Lambda * Lambda()
static G4Neutron * Neutron()
G4double GetPDGMass() const
static G4Proton * Proton()
G4bool ReactionStage(const G4HadProjectile *, G4ReactionProduct &, G4bool &, const G4DynamicParticle *, G4ReactionProduct &, G4bool &, const G4Nucleus &, G4ReactionProduct &, G4FastVector< G4ReactionProduct, 256 > &, G4int &, G4bool, G4ReactionProduct &)
G4double GetTotalEnergy() const
void SetMayBeKilled(const G4bool f)
void SetSide(const G4int sid)
void SetDefinitionAndUpdateE(G4ParticleDefinition *aParticleDefinition)
G4ParticleDefinition * GetDefinition() const
void SetDefinition(G4ParticleDefinition *aParticleDefinition)
static G4SigmaMinus * SigmaMinus()
static G4SigmaPlus * SigmaPlus()
static G4SigmaZero * SigmaZero()