39 outFile <<
"G4LEOmegaMinusInelastic is one of the Low Energy Parameterized\n"
40 <<
"(LEP) models used to implement inelastic Omega- scattering from\n"
41 <<
"nuclei. It is a re-engineered version of the GHEISHA code of\n"
42 <<
"H. Fesefeldt. It divides the initial collision products into\n"
43 <<
"backward- and forward-going clusters which are then decayed\n"
44 <<
"into final state hadrons. The model does not conserve energy\n"
45 <<
"on an event-by-event basis. It may be applied to Omega- with\n"
46 <<
"initial energies between 0 and 25 GeV.\n";
68 G4cout <<
"G4LEOmegaMinusInelastic::ApplyYourself called" <<
G4endl;
70 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
87 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
99 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
110 G4bool incidentHasChanged =
false;
111 G4bool targetHasChanged =
false;
112 G4bool quasiElastic =
false;
119 Cascade(vec, vecLen, originalIncident, currentParticle, targetParticle,
120 incidentHasChanged, targetHasChanged, quasiElastic);
123 modifiedOriginal, targetNucleus, currentParticle,
124 targetParticle, incidentHasChanged, targetHasChanged,
127 SetUpChange(vec, vecLen, currentParticle, targetParticle, incidentHasChanged);
131 delete originalTarget;
136void G4LEOmegaMinusInelastic::Cascade(
142 G4bool &incidentHasChanged,
159 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
160 targetMass*targetMass +
161 2.0*targetMass*etOriginal );
162 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
168 static G4bool first =
true;
169 const G4int numMul = 1200;
170 const G4int numSec = 60;
171 static G4double protmul[numMul], protnorm[numSec];
172 static G4double neutmul[numMul], neutnorm[numSec];
174 G4int counter, nt=0, npos=0, nneg=0, nzero=0;
177 const G4double b[] = { 0.70, 0.70 };
182 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
183 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
185 for( npos=0; npos<(numSec/3); ++npos )
187 for( nneg=std::max(0,npos-1); nneg<=(npos+1); ++nneg )
189 for( nzero=0; nzero<numSec/3; ++nzero )
191 if( ++counter < numMul )
193 nt = npos+nneg+nzero;
196 protmul[counter] =
Pmltpc(npos,nneg,nzero,nt,b[0],c);
197 protnorm[nt-1] += protmul[counter];
203 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
204 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
206 for( npos=0; npos<numSec/3; ++npos )
208 for( nneg=npos; nneg<=(npos+2); ++nneg )
210 for( nzero=0; nzero<numSec/3; ++nzero )
212 if( ++counter < numMul )
214 nt = npos+nneg+nzero;
215 if( (nt>0) && (nt<=numSec) )
217 neutmul[counter] =
Pmltpc(npos,nneg,nzero,nt,b[1],c);
218 neutnorm[nt-1] += neutmul[counter];
224 for( i=0; i<numSec; ++i )
226 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
227 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
249 for( npos=0; npos<numSec/3 && ran>=excs; ++npos )
251 for( nneg=std::max(0,npos-1); nneg<=(npos+1) && ran>=excs; ++nneg )
253 for( nzero=0; nzero<numSec/3 && ran>=excs; ++nzero )
255 if( ++counter < numMul )
257 nt = npos+nneg+nzero;
260 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
261 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
262 if( std::fabs(dum) < 1.0 )
264 if( test >= 1.0e-10 )excs += dum*test;
278 npos--; nneg--; nzero--;
283 for( npos=0; npos<numSec/3 && ran>=excs; ++npos )
285 for( nneg=npos; nneg<=(npos+2) && ran>=excs; ++nneg )
287 for( nzero=0; nzero<numSec/3 && ran>=excs; ++nzero )
289 if( ++counter < numMul )
291 nt = npos+nneg+nzero;
292 if( (nt>=1) && (nt<=numSec) )
294 test = std::exp( std::min( expxu, std::max( expxl, -(pi/4.0)*(nt*nt)/(n*n) ) ) );
295 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
296 if( std::fabs(dum) < 1.0 )
298 if( test >= 1.0e-10 )excs += dum*test;
312 npos--; nneg--; nzero--;
334 incidentHasChanged =
true;
336 else if( nneg < npos )
339 targetHasChanged =
true;
349 incidentHasChanged =
true;
355 incidentHasChanged =
true;
359 targetHasChanged =
true;
361 else if( nneg == npos+1 )
364 targetHasChanged =
true;
368 for(
G4int i=0; i<vecLen && nvefix>0; ++i )
370 if( vec[i]->GetDefinition() == aPiMinus )
372 if( nvefix >= 1 )vec[i]->SetDefinitionAndUpdateE( aKaonMinus );
G4DLLIMPORT std::ostream G4cout
G4ParticleDefinition * GetDefinition() const
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 G4PionMinus * PionMinus()
static G4PionPlus * PionPlus()
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 G4SigmaPlus * SigmaPlus()
static G4XiZero * XiZero()