55 G4cout <<
"G4RPGSigmaMinusInelastic::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;
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);
160 const G4int numMul = 1200;
161 const G4int numSec = 60;
165 G4int counter, nt=0, np=0, nneg=0, nz=0;
168 const G4double b[] = { 0.70, 0.70 };
173 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
174 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
176 for( np=0; np<(numSec/3); ++np )
178 for( nneg=
std::max(0,np-1); nneg<=(np+1); ++nneg )
180 for( nz=0; nz<numSec/3; ++nz )
182 if( ++counter < numMul )
185 if( nt>0 && nt<=numSec )
187 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
188 protnorm[nt-1] += protmul[counter];
194 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
195 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
197 for( np=0; np<numSec/3; ++np )
199 for( nneg=np; nneg<=(np+2); ++nneg )
201 for( nz=0; nz<numSec/3; ++nz )
203 if( ++counter < numMul )
206 if( nt>0 && nt<=numSec )
208 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
209 neutnorm[nt-1] += neutmul[counter];
215 for( i=0; i<numSec; ++i )
217 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
218 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
238 for( np=0; np<numSec/3 && ran>=excs; ++np )
240 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
242 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
244 if( ++counter < numMul )
247 if( nt>0 && nt<=numSec )
250 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
251 if( std::fabs(dum) < 1.0 )
253 if( test >= 1.0
e-10 )excs += dum*test;
276 incidentHasChanged =
true;
285 incidentHasChanged =
true;
287 targetHasChanged =
true;
292 targetHasChanged =
true;
299 for( np=0; np<numSec/3 && ran>=excs; ++np )
301 for( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg )
303 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
305 if( ++counter < numMul )
308 if( nt>0 && nt<=numSec )
311 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
312 if( std::fabs(dum) < 1.0 )
314 if( test >= 1.0
e-10 )excs += dum*test;
337 incidentHasChanged =
true;
339 targetHasChanged =
true;
348 incidentHasChanged =
true;
353 targetHasChanged =
true;
void Initialize(G4int items)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
static G4Lambda * Lambda()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
void SetUpChange(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
static constexpr double MeV
G4double Cinema(G4double kineticEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
const G4String & GetParticleName() const
static G4PionPlus * PionPlus()
void GetNormalizationConstant(const G4double availableEnergy, G4double &n, G4double &anpn)
const G4ParticleDefinition * GetDefinition() const
static G4SigmaZero * SigmaZero()
static G4Proton * Proton()
G4double GetTotalEnergy() const
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)
G4double GetPDGMass() const
G4DynamicParticle * ReturnTargetParticle() const
const G4String & GetName() const
void SetEnergyChange(G4double anEnergy)
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
void SetKineticEnergy(const G4double en)
G4ParticleDefinition * GetDefinition() const
const G4Material * GetMaterial() const
void SetUpPions(const G4int np, const G4int nm, const G4int nz, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)
G4ThreeVector GetMomentum() const
void SetSide(const G4int sid)
const G4LorentzVector & Get4Momentum() const
G4double GetKineticEnergy() const
const G4ParticleDefinition * GetDefinition() const
static G4Neutron * Neutron()
G4GLOB_DLL std::ostream G4cout
static constexpr double pi
G4double EvaporationEffects(G4double kineticEnergy)
void Cascade(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool &quasiElastic)
G4HadFinalState theParticleChange
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
void SetStatusChange(G4HadFinalStateStatus aS)