55 G4cout <<
"G4RPGXiMinusInelastic::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;
133 G4bool& incidentHasChanged,
150 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
151 targetMass*targetMass +
152 2.0*targetMass*etOriginal );
153 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
159 const G4int numMul = 1200;
160 const G4int numSec = 60;
165 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) {
176 for (nneg =
std::max(0,np-1); nneg <= (np+1); ++nneg) {
177 for (nz = 0; nz < numSec/3; ++nz) {
178 if (++counter < numMul) {
180 if (nt > 0 && nt <= numSec) {
181 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
182 protnorm[nt-1] += protmul[counter];
189 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
190 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
192 for( np=0; np<numSec/3; ++np )
194 for( nneg=np; nneg<=(np+2); ++nneg )
196 for( nz=0; nz<numSec/3; ++nz )
198 if( ++counter < numMul )
201 if( nt>0 && nt<=numSec )
203 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
204 neutnorm[nt-1] += neutmul[counter];
210 for( i=0; i<numSec; ++i )
212 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
213 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
234 for( np=0; np<numSec/3 && ran>=excs; ++np )
236 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
238 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
240 if( ++counter < numMul )
243 if( nt>0 && nt<=numSec )
246 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
247 if( std::fabs(dum) < 1.0 )
249 if( test >= 1.0e-10 )excs += dum*
test;
275 incidentHasChanged =
true;
280 incidentHasChanged =
true;
292 else if( np == nneg )
297 incidentHasChanged =
true;
299 targetHasChanged =
true;
305 targetHasChanged =
true;
311 for( np=0; np<numSec/3 && ran>=excs; ++np )
313 for( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg )
315 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
317 if( ++counter < numMul )
320 if( nt>0 && nt<=numSec )
323 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
324 if( std::fabs(dum) < 1.0 )
326 if( test >= 1.0e-10 )excs += dum*
test;
346 incidentHasChanged =
true;
348 targetHasChanged =
true;
353 incidentHasChanged =
true;
355 targetHasChanged =
true;
367 else if( np+1 == nneg )
372 incidentHasChanged =
true;
377 targetHasChanged =
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)
static G4XiZero * XiZero()
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
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
G4ThreeVector GetMomentum() const
G4HadFinalState theParticleChange
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