48 G4cout <<
"G4RPGKZeroInelastic::ApplyYourself called" <<
G4endl;
50 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
61 modifiedOriginal = *originalIncident;
67 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
81 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
90 targetParticle = *originalTarget;
93 G4bool incidentHasChanged =
false;
94 G4bool targetHasChanged =
false;
95 G4bool quasiElastic =
false;
103 originalIncident, currentParticle, targetParticle,
104 incidentHasChanged, targetHasChanged, quasiElastic );
107 originalIncident, originalTarget, modifiedOriginal,
108 targetNucleus, currentParticle, targetParticle,
109 incidentHasChanged, targetHasChanged, quasiElastic );
112 currentParticle, targetParticle,
113 incidentHasChanged );
115 delete originalTarget;
125 G4bool &incidentHasChanged,
142 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
143 targetMass*targetMass +
144 2.0*targetMass*etOriginal );
145 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
152 const G4int numMul = 1200;
153 const G4int numSec = 60;
157 G4int counter, nt=0, np=0, nneg=0, nz=0;
164 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
165 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
167 for( np=0; np<(numSec/3); ++np )
169 for( nneg=
std::max(0,np-1); nneg<=(np+1); ++nneg )
171 for( nz=0; nz<numSec/3; ++nz )
173 if( ++counter < numMul )
176 if( nt>0 && nt<=numSec )
178 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
179 protnorm[nt-1] += protmul[counter];
185 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
186 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
188 for( np=0; np<numSec/3; ++np )
190 for( nneg=
std::max(0,np-2); nneg<=np; ++nneg )
192 for( nz=0; nz<numSec/3; ++nz )
194 if( ++counter < numMul )
197 if( nt>0 && nt<=numSec )
199 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
200 neutnorm[nt-1] += neutmul[counter];
206 for( i=0; i<numSec; ++i )
208 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
209 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
221 const G4double supp[] = {0.,0.4,0.55,0.65,0.75,0.82,0.86,0.90,0.94,0.98};
253 else if( ran < wp/wt )
268 for( np=0; np<numSec/3 && ran>=excs; ++np )
270 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
272 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
274 if( ++counter < numMul )
277 if( nt>0 && nt<=numSec )
280 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
281 if( std::fabs(dum) < 1.0 )
283 if( test >= 1.0
e-10 )excs += dum*test;
302 for( np=0; np<numSec/3 && ran>=excs; ++np )
304 for( nneg=
std::max(0,np-2); nneg<=np && ran>=excs; ++nneg )
306 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
308 if( ++counter < numMul )
311 if( nt>0 && nt<=numSec )
314 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
315 if( std::fabs(dum) < 1.0 )
317 if( test >= 1.0
e-10 )excs += dum*test;
343 incidentHasChanged =
true;
344 targetHasChanged =
true;
349 targetHasChanged =
true;
353 targetHasChanged =
true;
365 incidentHasChanged =
true;
370 targetHasChanged =
true;
375 incidentHasChanged =
true;
377 targetHasChanged =
true;
387 incidentHasChanged =
true;
394 targetHasChanged =
true;
void Initialize(G4int items)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
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)
static constexpr double MeV
G4double Cinema(G4double kineticEnergy)
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 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
static G4KaonPlus * KaonPlus()
G4DynamicParticle * ReturnTargetParticle() const
const G4String & GetName() const
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
static G4KaonZeroLong * KaonZeroLong()
void SetKineticEnergy(const G4double en)
G4double GetKineticEnergy() const
G4ParticleDefinition * GetDefinition() const
const G4Material * GetMaterial() const
void Cascade(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool &quasiElastic)
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)
G4double GetKineticEnergy() const
static G4KaonZeroShort * KaonZeroShort()
const G4ParticleDefinition * GetDefinition() const
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
static G4Neutron * Neutron()
G4GLOB_DLL std::ostream G4cout
static constexpr double pi
G4double EvaporationEffects(G4double kineticEnergy)
static constexpr double GeV
G4HadFinalState theParticleChange
T min(const T t1, const T t2)
brief Return the smallest of the two arguments