39 outFile <<
"G4LEAntiLambdaInelastic is one of the Low Energy Parameterized\n"
40 <<
"(LEP) models used to implement inelastic anti-lambda\n"
41 <<
"scattering from nuclei. It is a re-engineered version of the\n"
42 <<
"GHEISHA code of H. Fesefeldt. It divides the initial\n"
43 <<
"collision products into backward- and forward-going clusters\n"
44 <<
"which are then decayed into final state hadrons. The model\n"
45 <<
"does not conserve energy on an event-by-event basis. It may\n"
46 <<
"be applied to anti-lambdas with initial energies between 0 and\n"
62 G4cout <<
"G4LEAntiLambdaInelastic::ApplyYourself called" <<
G4endl;
64 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
74 modifiedOriginal = *originalIncident;
80 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
92 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
101 targetParticle = *originalTarget;
104 G4bool incidentHasChanged =
false;
105 G4bool targetHasChanged =
false;
106 G4bool quasiElastic =
false;
114 Cascade(vec, vecLen, originalIncident, currentParticle, targetParticle,
115 incidentHasChanged, targetHasChanged, quasiElastic);
118 modifiedOriginal, targetNucleus, currentParticle,
119 targetParticle, incidentHasChanged, targetHasChanged,
122 SetUpChange(vec, vecLen, currentParticle, targetParticle, incidentHasChanged);
126 delete originalTarget;
131void G4LEAntiLambdaInelastic::Cascade(
137 G4bool &incidentHasChanged,
155 G4double centerofmassEnergy = std::sqrt(mOriginal*mOriginal +
156 targetMass*targetMass +
157 2.0*targetMass*etOriginal);
158 G4double availableEnergy = centerofmassEnergy - (targetMass+mOriginal);
160 static G4bool first =
true;
161 const G4int numMul = 1200;
162 const G4int numMulA = 400;
163 const G4int numSec = 60;
164 static G4double protmul[numMul], protnorm[numSec];
165 static G4double neutmul[numMul], neutnorm[numSec];
166 static G4double protmulA[numMulA], protnormA[numSec];
167 static G4double neutmulA[numMulA], neutnormA[numSec];
171 G4int npos = 0, nneg = 0, nzero = 0;
178 for (i = 0; i < numMul; ++i) protmul[i] = 0.0;
179 for (i = 0; i < numSec; ++i) protnorm[i] = 0.0;
181 for (npos = 0; npos < (numSec/3); ++npos) {
182 for (nneg = std::max(0, npos-2); nneg <= (npos+1); ++nneg) {
183 for (nzero = 0; nzero < numSec/3; ++nzero) {
184 if (++counter < numMul) {
185 nt = npos + nneg + nzero;
186 if (nt > 0 && nt <= numSec) {
187 protmul[counter] =
Pmltpc(npos,nneg,nzero,nt,b[0],c);
188 protnorm[nt-1] += protmul[counter];
195 for (i = 0; i < numMul; ++i) neutmul[i] = 0.0;
196 for (i = 0; i < numSec; ++i) neutnorm[i] = 0.0;
198 for (npos = 0; npos < numSec/3; ++npos) {
199 for (nneg = std::max(0,npos-1); nneg <= (npos+2); ++nneg) {
200 for (nzero = 0; nzero < numSec/3; ++nzero) {
201 if (++counter < numMul) {
202 nt = npos + nneg + nzero;
203 if (nt > 0 && nt <= numSec) {
204 neutmul[counter] =
Pmltpc(npos,nneg,nzero,nt,b[1],c);
205 neutnorm[nt-1] += neutmul[counter];
212 for (i = 0; i < numSec; ++i) {
213 if (protnorm[i] > 0.0) protnorm[i] = 1.0/protnorm[i];
214 if (neutnorm[i] > 0.0) neutnorm[i] = 1.0/neutnorm[i];
218 for (i = 0; i < numMulA; ++i) protmulA[i] = 0.0;
219 for (i = 0; i < numSec; ++i) protnormA[i] = 0.0;
221 for (npos = 1; npos < (numSec/3); ++npos) {
223 for (nzero = 0; nzero < numSec/3; ++nzero) {
224 if (++counter < numMulA) {
225 nt = npos + nneg + nzero;
226 if (nt > 1 && nt <= numSec) {
227 protmulA[counter] =
Pmltpc(npos,nneg,nzero,nt,b[0],c);
228 protnormA[nt-1] += protmulA[counter];
234 for (i = 0; i < numMulA; ++i) neutmulA[i] = 0.0;
235 for (i = 0; i < numSec; ++i) neutnormA[i] = 0.0;
237 for (npos = 0; npos < numSec/3; ++npos) {
239 for (nzero = 0; nzero < numSec/3; ++nzero) {
240 if (++counter < numMulA) {
241 nt = npos + nneg + nzero;
242 if (nt > 1 && nt <= numSec) {
243 neutmulA[counter] =
Pmltpc(npos,nneg,nzero,nt,b[1],c);
244 neutnormA[nt-1] += neutmulA[counter];
249 for (i = 0; i < numSec; ++i) {
250 if (protnormA[i] > 0.0) protnormA[i] = 1.0/protnormA[i];
251 if (neutnormA[i] > 0.0) neutnormA[i] = 1.0/neutnormA[i];
269 const G4double anhl[] = {1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,0.97,0.88,
270 0.85,0.81,0.75,0.64,0.64,0.55,0.55,0.45,0.47,0.40,
271 0.39,0.36,0.33,0.10,0.01};
273 if (iplab > 9) iplab =
G4int( (pOriginal- 1.0)*5.0 ) + 10;
274 if (iplab > 14) iplab =
G4int( pOriginal- 2.0 ) + 15;
275 if (iplab > 22) iplab =
G4int( (pOriginal-10.0)/10.0 ) + 23;
276 if (iplab > 24) iplab = 24;
279 if (availableEnergy <= aPiPlus->GetPDGMass()/MeV) {
290 for (npos = 0; npos < numSec/3 && ran>=excs; ++npos) {
291 for (nneg = std::max(0,npos-2); nneg <= (npos+1) && ran >= excs; ++nneg) {
292 for (nzero = 0; nzero < numSec/3 && ran >= excs; ++nzero) {
293 if (++counter < numMul) {
294 nt = npos + nneg + nzero;
295 if (nt > 0 && nt <= numSec) {
296 test = std::exp(std::min(expxu,
297 std::max(expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
298 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
299 if (std::fabs(dum) < 1.0) {
300 if (test >= 1.0e-10 )excs += dum*test;
315 npos--; nneg--; nzero--;
316 G4int ncht = std::min(4, std::max(1, npos-nneg+2 ) );
321 incidentHasChanged =
true;
327 incidentHasChanged =
true;
330 incidentHasChanged =
true;
332 targetHasChanged =
true;
337 incidentHasChanged =
true;
339 targetHasChanged =
true;
347 incidentHasChanged =
true;
349 targetHasChanged =
true;
352 incidentHasChanged =
true;
357 targetHasChanged =
true;
360 incidentHasChanged =
true;
366 incidentHasChanged =
true;
368 targetHasChanged =
true;
375 for (npos = 0; npos < numSec/3 && ran>=excs; ++npos) {
376 for (nneg = std::max(0,npos-1); nneg <= (npos+2) && ran>=excs; ++nneg) {
377 for (nzero = 0; nzero < numSec/3 && ran >= excs; ++nzero) {
378 if (++counter < numMul) {
379 nt = npos + nneg + nzero;
380 if (nt > 0 && nt <= numSec) {
381 test = std::exp(std::min(expxu,
382 std::max(expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
383 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
384 if (std::fabs(dum) < 1.0) {
385 if (test >= 1.0e-10) excs += dum*test;
400 npos--; nneg--; nzero--;
401 G4int ncht = std::min(4, std::max(1, npos-nneg+3) );
406 incidentHasChanged =
true;
408 targetHasChanged =
true;
414 incidentHasChanged =
true;
416 targetHasChanged =
true;
419 incidentHasChanged =
true;
424 targetHasChanged =
true;
427 incidentHasChanged =
true;
435 incidentHasChanged =
true;
438 incidentHasChanged =
true;
440 targetHasChanged =
true;
445 incidentHasChanged =
true;
447 targetHasChanged =
true;
453 incidentHasChanged =
true;
458 if (centerofmassEnergy <= aPiPlus->GetPDGMass()/MeV+aKaonPlus->
GetPDGMass()/MeV) {
470 for (npos = 1; npos < numSec/3 && ran>=excs; ++npos) {
472 for (nzero = 0; nzero < numSec/3 && ran >= excs; ++nzero) {
473 if (++counter < numMulA) {
474 nt = npos + nneg + nzero;
475 if (nt > 1 && nt <= numSec) {
476 test = std::exp(std::min(expxu,
477 std::max(expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
478 dum = (
pi/anpn)*nt*protmulA[counter]*protnormA[nt-1]/(2.0*n*n);
479 if (std::fabs(dum) < 1.0) {
480 if (test >= 1.0e-10) excs += dum*test;
491 for (npos = 0; npos < numSec/3 && ran >= excs; ++npos) {
493 for (nzero = 0; nzero < numSec/3 && ran >= excs; ++nzero) {
494 if (++counter < numMulA) {
495 nt = npos + nneg + nzero;
496 if (nt > 1 && nt <= numSec) {
497 test = std::exp(std::min(expxu,
498 std::max(expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
499 dum = (
pi/anpn)*nt*neutmulA[counter]*neutnormA[nt-1]/(2.0*n*n);
500 if (std::fabs(dum) < 1.0) {
501 if (test >= 1.0e-10) excs += dum*test;
516 currentParticle.
SetMass( 0.0 );
521 if (currentParticle.
GetMass() == 0.0) {
524 for (
G4int i = 0; i < vecLen; ++i) {
525 if (vec[i]->GetDefinition() == aPiMinus) {
526 vec[i]->SetDefinitionAndUpdateE( aKaonMinus );
534 for (
G4int i = 0; i < vecLen; ++i) {
535 if (vec[i]->GetDefinition() == aPiZero) {
536 vec[i]->SetDefinitionAndUpdateE(aKaonZL);
544 for (
G4int i = 0; i < vecLen; ++i) {
545 if (vec[i]->GetDefinition() == aPiMinus) {
546 vec[i]->SetDefinitionAndUpdateE(aKaonMinus);
553 for (
G4int i = 0; i < vecLen; ++i) {
554 if (vec[i]->GetDefinition() == aPiZero) {
555 vec[i]->SetDefinitionAndUpdateE( aKaonZL );
G4DLLIMPORT std::ostream G4cout
static G4AntiSigmaMinus * AntiSigmaMinus()
static G4AntiSigmaPlus * AntiSigmaPlus()
static G4AntiSigmaZero * AntiSigmaZero()
G4ParticleDefinition * GetDefinition() const
void Initialize(G4int items)
const G4Material * GetMaterial() const
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4HadFinalState theParticleChange
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
void GetNormalizationConstant(const G4double availableEnergy, G4double &n, G4double &anpn)
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)
void DoIsotopeCounting(const G4HadProjectile *theProjectile, const G4Nucleus &aNucleus)
void SetUpChange(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
static G4KaonMinus * KaonMinus()
static G4KaonPlus * KaonPlus()
static G4KaonZeroLong * KaonZeroLong()
virtual void ModelDescription(std::ostream &outFile) const
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
const G4String & GetName() const
static G4Neutron * Neutron()
G4double EvaporationEffects(G4double kineticEnergy)
G4double Cinema(G4double kineticEnergy)
G4DynamicParticle * ReturnTargetParticle() const
G4double GetPDGMass() const
const G4String & GetParticleName() const
static G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
static G4PionZero * PionZero()
static G4Proton * Proton()
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double GetTotalMomentum() const
G4ThreeVector GetMomentum() const
void SetSide(const G4int sid)
void SetDefinitionAndUpdateE(G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(const G4double en)
G4ParticleDefinition * GetDefinition() const
void SetMass(const G4double mas)