55 G4cout <<
"G4RPGSigmaPlusInelastic::ApplyYourself called" <<
G4endl;
57 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
68 modifiedOriginal = *originalIncident;
74 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
88 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
97 targetParticle = *originalTarget;
100 G4bool incidentHasChanged =
false;
101 G4bool targetHasChanged =
false;
102 G4bool quasiElastic =
false;
109 Cascade( vec, vecLen,
110 originalIncident, currentParticle, targetParticle,
111 incidentHasChanged, targetHasChanged, quasiElastic );
114 originalIncident, originalTarget, modifiedOriginal,
115 targetNucleus, currentParticle, targetParticle,
116 incidentHasChanged, targetHasChanged, quasiElastic );
119 currentParticle, targetParticle,
120 incidentHasChanged );
122 delete originalTarget;
126 void G4RPGSigmaPlusInelastic::Cascade(
132 G4bool &incidentHasChanged,
149 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
150 targetMass*targetMass +
151 2.0*targetMass*etOriginal );
152 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
159 const G4int numMul = 1200;
160 const G4int numSec = 60;
164 G4int counter, nt=0, np=0, nneg=0, nz=0;
172 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
173 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
175 for( np=0; np<(numSec/3); ++np )
177 for( nneg=np; nneg<=(np+2); ++nneg )
179 for( nz=0; nz<numSec/3; ++nz )
181 if( ++counter < numMul )
184 if( nt>0 && nt<=numSec )
186 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
187 protnorm[nt-1] += protmul[counter];
193 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
194 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
196 for( np=0; np<numSec/3; ++np )
198 for( nneg=
std::max(0,np-1); nneg<=(np+1); ++nneg )
200 for( nz=0; nz<numSec/3; ++nz )
202 if( ++counter < numMul )
205 if( nt>0 && nt<=numSec )
207 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
208 neutnorm[nt-1] += neutmul[counter];
214 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];
237 for( np=0; np<numSec/3 && ran>=excs; ++np )
239 for( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg )
241 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
243 if( ++counter < numMul )
246 if( nt>0 && nt<=numSec )
249 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
250 if( std::fabs(dum) < 1.0 )
252 if( test >= 1.0e-10 )excs += dum*
test;
274 incidentHasChanged =
true;
276 targetHasChanged =
true;
282 targetHasChanged =
true;
290 incidentHasChanged =
true;
300 for( np=0; np<numSec/3 && ran>=excs; ++np )
302 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
304 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
306 if( ++counter < numMul )
309 if( nt>0 && nt<=numSec )
312 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
313 if( std::fabs(dum) < 1.0 )
315 if( test >= 1.0e-10 )excs += dum*
test;
334 targetHasChanged =
true;
342 incidentHasChanged =
true;
344 targetHasChanged =
true;
349 targetHasChanged =
true;
357 incidentHasChanged =
true;
359 targetHasChanged =
true;
368 incidentHasChanged =
true;
G4double EvaporationEffects(G4double kineticEnergy)
void SetUpChange(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
void SetKineticEnergy(const G4double en)
void SetMomentum(const G4double x, const G4double y, const G4double z)
const G4String & GetName() const
void SetSide(const G4int sid)
void CalculateMomenta(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, const G4DynamicParticle *originalTarget, G4ReactionProduct &modifiedOriginal, G4Nucleus &targetNucleus, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool quasiElastic)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
G4ParticleDefinition * GetDefinition() const
void Initialize(G4int items)
G4DynamicParticle * ReturnTargetParticle() const
const G4String & GetParticleName() const
static G4SigmaZero * SigmaZero()
void SetStatusChange(G4HadFinalStateStatus aS)
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
const G4ParticleDefinition * GetDefinition() const
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Proton * Proton()
static G4PionPlus * PionPlus()
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
static G4Neutron * Neutron()
const G4LorentzVector & Get4Momentum() const
G4double GetKineticEnergy() const
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
void SetEnergyChange(G4double anEnergy)
G4double GetPDGMass() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double Cinema(G4double kineticEnergy)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4ThreeVector GetMomentum() const
G4HadFinalState theParticleChange
static constexpr double MeV
const G4Material * GetMaterial() const
static constexpr double pi
void GetNormalizationConstant(const G4double availableEnergy, G4double &n, G4double &anpn)
static G4Lambda * Lambda()
void SetUpPions(const G4int np, const G4int nm, const G4int nz, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)
void SetMomentumChange(const G4ThreeVector &aV)
G4double GetTotalEnergy() const