43 outFile <<
"G4LEAntiXiMinusInelastic is one of the Low Energy Parameterized\n"
44 <<
"(LEP) models used to implement inelastic antiXi- scattering\n"
45 <<
"from nuclei. It is a re-engineered version of the GHEISHA\n"
46 <<
"code of H. Fesefeldt. It divides the initial collision\n"
47 <<
"products into backward- and forward-going clusters which are\n"
48 <<
"then decayed into final state hadrons. The model does not\n"
49 <<
"conserve energy on an event-by-event basis. It may be applied\n"
50 <<
"to antiXi- with initial energies between 0 and 25 GeV.\n";
70 G4cout <<
"G4LEAntiXiMinusInelastic::ApplyYourself called" <<
G4endl;
72 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
82 modifiedOriginal = *originalIncident;
88 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
100 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
108 targetParticle = *originalTarget;
111 G4bool incidentHasChanged =
false;
112 G4bool targetHasChanged =
false;
113 G4bool quasiElastic =
false;
121 Cascade(vec, vecLen, originalIncident, currentParticle, targetParticle,
122 incidentHasChanged, targetHasChanged, quasiElastic);
125 modifiedOriginal, targetNucleus, currentParticle,
126 targetParticle, incidentHasChanged, targetHasChanged,
129 SetUpChange(vec, vecLen, currentParticle, targetParticle, incidentHasChanged);
133 delete originalTarget;
138void G4LEAntiXiMinusInelastic::Cascade(
144 G4bool &incidentHasChanged,
162 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
163 targetMass*targetMass +
164 2.0*targetMass*etOriginal );
165 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
171 static G4bool first =
true;
172 const G4int numMul = 1200;
173 const G4int numSec = 60;
174 static G4double protmul[numMul], protnorm[numSec];
175 static G4double neutmul[numMul], neutnorm[numSec];
177 G4int counter, nt=0, npos=0, nneg=0, nzero=0;
185 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
186 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
188 for( npos=0; npos<(numSec/3); ++npos )
190 for( nneg=std::max(0,npos-1); nneg<=(npos+1); ++nneg )
192 for( nzero=0; nzero<numSec/3; ++nzero )
194 if( ++counter < numMul )
196 nt = npos+nneg+nzero;
197 if( nt>0 && nt<=numSec )
199 protmul[counter] =
Pmltpc(npos,nneg,nzero,nt,b[0],c);
200 protnorm[nt-1] += protmul[counter];
206 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
207 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
209 for( npos=0; npos<numSec/3; ++npos )
211 for( nneg=npos; nneg<=(npos+2); ++nneg )
213 for( nzero=0; nzero<numSec/3; ++nzero )
215 if( ++counter < numMul )
217 nt = npos+nneg+nzero;
218 if( nt>0 && nt<=numSec )
220 neutmul[counter] =
Pmltpc(npos,nneg,nzero,nt,b[1],c);
221 neutnorm[nt-1] += neutmul[counter];
227 for( i=0; i<numSec; ++i )
229 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
230 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
251 for( npos=0; npos<numSec/3 && ran>=excs; ++npos )
253 for( nneg=std::max(0,npos-1); nneg<=(npos+1) && ran>=excs; ++nneg )
255 for( nzero=0; nzero<numSec/3 && ran>=excs; ++nzero )
257 if( ++counter < numMul )
259 nt = npos+nneg+nzero;
260 if( nt>0 && nt<=numSec )
262 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
263 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
264 if( std::fabs(dum) < 1.0 )
266 if( test >= 1.0e-10 )excs += dum*test;
280 npos--; nneg--; nzero--;
292 incidentHasChanged =
true;
297 incidentHasChanged =
true;
309 else if( npos == nneg )
314 incidentHasChanged =
true;
316 targetHasChanged =
true;
322 targetHasChanged =
true;
328 for( npos=0; npos<numSec/3 && ran>=excs; ++npos )
330 for( nneg=npos; nneg<=(npos+2) && ran>=excs; ++nneg )
332 for( nzero=0; nzero<numSec/3 && ran>=excs; ++nzero )
334 if( ++counter < numMul )
336 nt = npos+nneg+nzero;
337 if( nt>0 && nt<=numSec )
339 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
340 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
341 if( std::fabs(dum) < 1.0 )
343 if( test >= 1.0e-10 )excs += dum*test;
357 npos--; nneg--; nzero--;
363 incidentHasChanged =
true;
365 targetHasChanged =
true;
370 incidentHasChanged =
true;
372 targetHasChanged =
true;
384 else if( npos+1 == nneg )
389 incidentHasChanged =
true;
394 targetHasChanged =
true;
G4DLLIMPORT std::ostream G4cout
G4ParticleDefinition * GetDefinition() const
void SetElement(G4int anIndex, Type *anElement)
void Initialize(G4int items)
void SetStatusChange(G4HadFinalStateStatus aS)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() 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()
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 G4PionPlus * PionPlus()
static G4Proton * Proton()
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 SetDefinitionAndUpdateE(G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(const G4double en)
G4ParticleDefinition * GetDefinition() const
void SetDefinition(G4ParticleDefinition *aParticleDefinition)
static G4SigmaPlus * SigmaPlus()
static G4XiZero * XiZero()