52 G4cout <<
"G4RPGXiZeroInelastic::ApplyYourself called" <<
G4endl;
54 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
64 modifiedOriginal = *originalIncident;
70 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
84 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
93 targetParticle = *originalTarget;
96 G4bool incidentHasChanged =
false;
97 G4bool targetHasChanged =
false;
98 G4bool quasiElastic =
false;
105 Cascade(vec, vecLen, originalIncident, currentParticle, targetParticle,
106 incidentHasChanged, targetHasChanged, quasiElastic);
109 modifiedOriginal, targetNucleus, currentParticle,
110 targetParticle, incidentHasChanged, targetHasChanged,
113 SetUpChange(vec, vecLen, currentParticle, targetParticle, incidentHasChanged);
115 delete originalTarget;
126 G4bool& incidentHasChanged,
143 G4double centerofmassEnergy = std::sqrt(mOriginal*mOriginal +
144 targetMass*targetMass +
145 2.0*targetMass*etOriginal);
146 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
152 const G4int numMul = 1200;
153 const G4int numSec = 60;
158 G4int counter, nt=0, np=0, nneg=0, nz=0;
165 for (i = 0; i < numMul; ++i) protmul[i] = 0.0;
166 for (i = 0; i < numSec; ++i) protnorm[i] = 0.0;
168 for( np=0; np<(numSec/3); ++np )
170 for( nneg=
std::max(0,np-2); nneg<=(np+1); ++nneg )
172 for( nz=0; nz<numSec/3; ++nz )
174 if( ++counter < numMul )
177 if( nt>0 && nt<=numSec )
179 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
180 protnorm[nt-1] += protmul[counter];
186 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
187 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
189 for( np=0; np<numSec/3; ++np )
191 for( nneg=
std::max(0,np-1); nneg<=(np+2); ++nneg )
193 for( nz=0; nz<numSec/3; ++nz )
195 if( ++counter < numMul )
198 if( nt>0 && nt<=numSec )
200 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
201 neutnorm[nt-1] += neutmul[counter];
207 for( i=0; i<numSec; ++i )
209 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
210 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
231 for( np=0; np<numSec/3 && ran>=excs; ++np )
233 for( nneg=
std::max(0,np-2); nneg<=(np+1) && ran>=excs; ++nneg )
235 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
237 if( ++counter < numMul )
240 if( nt>0 && nt<=numSec )
243 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
244 if( std::fabs(dum) < 1.0 )
246 if( test >= 1.0e-10 )excs += dum*
test;
272 incidentHasChanged =
true;
284 else if( np == nneg+1 )
289 targetHasChanged =
true;
294 incidentHasChanged =
true;
300 incidentHasChanged =
true;
302 targetHasChanged =
true;
308 for( np=0; np<numSec/3 && ran>=excs; ++np )
310 for( nneg=
std::max(0,np-1); nneg<=(np+2) && ran>=excs; ++nneg )
312 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
314 if( ++counter < numMul )
317 if( nt>0 && nt<=numSec )
320 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
321 if( std::fabs(dum) < 1.0 )
323 if( test >= 1.0e-10 )excs += dum*
test;
343 targetHasChanged =
true;
348 incidentHasChanged =
true;
350 targetHasChanged =
true;
362 else if( np == nneg )
367 incidentHasChanged =
true;
369 targetHasChanged =
true;
375 incidentHasChanged =
true;
void SetElement(G4int anIndex, Type *anElement)
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)
G4ParticleDefinition * GetDefinition() const
void Initialize(G4int items)
G4DynamicParticle * ReturnTargetParticle() const
const G4String & GetParticleName() const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
static G4KaonMinus * KaonMinus()
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 G4XiMinus * XiMinus()
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
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
static constexpr double MeV
const G4Material * GetMaterial() const
static constexpr double pi
static G4SigmaPlus * SigmaPlus()
void GetNormalizationConstant(const G4double availableEnergy, G4double &n, G4double &anpn)
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