41 outFile <<
"G4LEAntiKaonZeroInelastic is one of the Low Energy\n"
42 <<
"Parameterized (LEP) models used to implement anti-K0 scattering\n"
43 <<
"from nuclei. It is a re-engineered version of the GHEISHA code\n"
44 <<
"of H. Fesefeldt. It divides the initial collision products\n"
45 <<
"into backward- and forward-going clusters which are then\n"
46 <<
"decayed into final state hadrons. The model does not conserve\n"
47 <<
"energy on an event-by-event basis. It may be applied to\n"
48 <<
"anti-K0s with initial energies between 0 and 25 GeV.\n";
63 G4cout <<
"G4LEAntiKaonZeroInelastic::ApplyYourself called" <<
G4endl;
65 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
75 modifiedOriginal = *originalIncident;
81 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
93 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
102 targetParticle = *originalTarget;
105 G4bool incidentHasChanged =
false;
106 G4bool targetHasChanged =
false;
107 G4bool quasiElastic =
false;
115 originalIncident, currentParticle, targetParticle,
116 incidentHasChanged, targetHasChanged, quasiElastic);
120 modifiedOriginal, targetNucleus, currentParticle,
121 targetParticle, incidentHasChanged, targetHasChanged,
129 SetUpChange(vec, vecLen, currentParticle, targetParticle, incidentHasChanged);
132 delete originalTarget;
137void G4LEAntiKaonZeroInelastic::Cascade(
143 G4bool &incidentHasChanged,
161 G4double centerofmassEnergy = std::sqrt(mOriginal*mOriginal +
162 targetMass*targetMass +
163 2.0*targetMass*etOriginal );
164 G4double availableEnergy = centerofmassEnergy - (targetMass+mOriginal);
166 static G4bool first =
true;
167 const G4int numMul = 1200;
168 const G4int numSec = 60;
169 static G4double protmul[numMul], protnorm[numSec];
170 static G4double neutmul[numMul], neutnorm[numSec];
175 G4int npos = 0, nneg = 0, nzero = 0;
181 for (i = 0; i < numMul; ++i) protmul[i] = 0.0;
182 for (i = 0; i < numSec; ++i) protnorm[i] = 0.0;
184 for (npos = 0; npos < numSec/3; ++npos) {
185 for (nneg = std::max(0,npos - 2); nneg <= npos; ++nneg) {
186 for (nzero = 0; nzero < numSec/3; ++nzero) {
187 if (++counter < numMul) {
188 nt = npos + nneg + nzero;
189 if (nt > 0 && nt <= numSec) {
190 protmul[counter] =
Pmltpc(npos, nneg, nzero, nt, b[0], c);
191 protnorm[nt-1] += protmul[counter];
198 for (i = 0; i < numMul; ++i) neutmul[i] = 0.0;
199 for (i = 0; i < numSec; ++i) neutnorm[i] = 0.0;
201 for (npos = 0; npos < (numSec/3); ++npos) {
202 for (nneg = std::max(0,npos-1); nneg <= (npos+1); ++nneg) {
203 for (nzero = 0; nzero < numSec/3; ++nzero) {
204 if (++counter < numMul) {
205 nt = npos + nneg + nzero;
206 if (nt > 0 && nt <= numSec) {
207 neutmul[counter] =
Pmltpc(npos, nneg, nzero, nt, b[1], c);
208 neutnorm[nt-1] += neutmul[counter];
215 for (i = 0; i < numSec; ++i) {
216 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
217 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
235 const G4double cech[] = {1.,1.,1.,0.70,0.60,0.55,0.35,0.25,0.18,0.15};
236 G4int iplab =
G4int(std::min( 9.0, 5.0*pOriginal*MeV/GeV ));
237 if ((pOriginal*MeV/GeV <= 2.0) && (
G4UniformRand() < cech[iplab]) ) {
238 npos = nneg = nzero = nt = 0;
239 iplab =
G4int(std::min( 19.0, pOriginal*MeV/GeV*10.0 ));
240 const G4double cnk0[] = {0.17,0.18,0.17,0.24,0.26,0.20,0.22,0.21,0.34,0.45,
241 0.58,0.55,0.36,0.29,0.29,0.32,0.32,0.33,0.33,0.33};
249 incidentHasChanged =
true;
250 targetHasChanged =
true;
252 }
else if( ran < 0.50 ) {
259 incidentHasChanged =
true;
260 targetHasChanged =
true;
261 }
else if (ran < 0.75) {
267 incidentHasChanged =
true;
268 targetHasChanged =
true;
277 incidentHasChanged =
true;
278 targetHasChanged =
true;
286 incidentHasChanged =
true;
287 targetHasChanged =
true;
292 if (availableEnergy < aPiPlus->GetPDGMass()/MeV) {
302 for (npos = 0; (npos < numSec/3) && (ran >= excs); ++npos) {
303 for (nneg = std::max(0,npos-2); nneg <= npos && ran >= excs; ++nneg) {
304 for (nzero = 0; nzero < numSec/3 && ran >= excs; ++nzero) {
305 if (++counter < numMul) {
306 nt = npos + nneg +nzero;
307 if (nt > 0 && nt <= numSec) {
308 test = std::exp(std::min(expxu,
309 std::max(expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
310 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
311 if (std::fabs(dum) < 1.0) {
312 if( test >= 1.0e-10 )excs += dum*test;
326 npos--; nneg--; nzero--;
332 incidentHasChanged =
true;
335 targetHasChanged =
true;
342 incidentHasChanged =
true;
343 targetHasChanged =
true;
349 for (npos = 0; npos < numSec/3 && ran >= excs; ++npos) {
350 for (nneg = std::max(0,npos-1); nneg <= (npos+1) && ran >= excs; ++nneg) {
351 for (nzero = 0; nzero < numSec/3 && ran >= excs; ++nzero) {
352 if (++counter < numMul) {
353 nt = npos + nneg + nzero;
354 if (nt > 0 && nt <= numSec) {
355 test = std::exp(std::min(expxu,
356 std::max(expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
357 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
358 if (std::fabs(dum) < 1.0) {
359 if (test >= 1.0e-10) excs += dum*test;
373 npos--; nneg--; nzero--;
379 incidentHasChanged =
true;
380 targetHasChanged =
true;
384 incidentHasChanged =
true;
388 targetHasChanged =
true;
400 }
else if (ran < 0.84) {
414 }
else if (ran < 0.84) {
426 }
else if (ran < 0.78) {
429 }
else if (ran < 0.89) {
437 incidentHasChanged =
true;
438 targetHasChanged =
true;
445 incidentHasChanged =
true;
451 targetHasChanged =
true;
G4DLLIMPORT std::ostream G4cout
G4ParticleDefinition * GetDefinition() const
void Initialize(G4int items)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
void Report(std::ostream &aS)
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 G4KaonZeroLong * KaonZeroLong()
static G4KaonZeroShort * KaonZeroShort()
virtual void ModelDescription(std::ostream &outFile) const
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
static G4Lambda * Lambda()
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 GetKineticEnergy() const
G4ThreeVector GetMomentum() const
void SetSide(const G4int sid)
void SetDefinitionAndUpdateE(G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(const G4double en)
G4ParticleDefinition * GetDefinition() const
static G4SigmaMinus * SigmaMinus()
static G4SigmaPlus * SigmaPlus()
static G4SigmaZero * SigmaZero()