48 G4cout <<
"G4RPGLambdaInelastic::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)) );
91 targetParticle = *originalTarget;
94 G4bool incidentHasChanged =
false;
95 G4bool targetHasChanged =
false;
96 G4bool quasiElastic =
false;
104 originalIncident, currentParticle, targetParticle,
105 incidentHasChanged, targetHasChanged, quasiElastic );
108 originalIncident, originalTarget, modifiedOriginal,
109 targetNucleus, currentParticle, targetParticle,
110 incidentHasChanged, targetHasChanged, quasiElastic );
113 currentParticle, targetParticle,
114 incidentHasChanged );
116 delete originalTarget;
127 G4bool &incidentHasChanged,
144 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
145 targetMass*targetMass +
146 2.0*targetMass*etOriginal );
147 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
154 const G4int numMul = 1200;
155 const G4int numSec = 60;
161 G4int counter, nt=0, np=0, nneg=0, nz=0;
164 const G4double b[] = { 0.70, 0.35 };
168 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
169 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
171 for( np=0; np<(numSec/3); ++np ) {
172 for( nneg=
std::max(0,np-2); nneg<=(np+1); ++nneg ) {
173 for( nz=0; nz<numSec/3; ++nz ) {
174 if( ++counter < numMul ) {
176 if( nt>0 && nt<=numSec ) {
177 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
178 protnorm[nt-1] += protmul[counter];
184 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
185 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
187 for( np=0; np<numSec/3; ++np ) {
188 for( nneg=
std::max(0,np-1); nneg<=(np+2); ++nneg ) {
189 for( nz=0; nz<numSec/3; ++nz ) {
190 if( ++counter < numMul ) {
192 if( nt>0 && nt<=numSec ) {
193 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
194 neutnorm[nt-1] += neutmul[counter];
200 for( i=0; i<numSec; ++i ) {
201 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
202 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
223 for( np=0; np<numSec/3 && ran>=excs; ++np ) {
224 for( nneg=
std::max(0,np-2); nneg<=(np+1) && ran>=excs; ++nneg ) {
225 for( nz=0; nz<numSec/3 && ran>=excs; ++nz ) {
226 if( ++counter < numMul ) {
228 if( nt>0 && nt<=numSec ) {
230 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
231 if( std::fabs(dum) < 1.0 ) {
232 if( test >= 1.0
e-10 )excs += dum*test;
251 incidentHasChanged =
true;
257 incidentHasChanged =
true;
261 incidentHasChanged =
true;
263 targetHasChanged =
true;
270 incidentHasChanged =
true;
273 targetHasChanged =
true;
276 incidentHasChanged =
true;
281 incidentHasChanged =
true;
283 targetHasChanged =
true;
290 for( np=0; np<numSec/3 && ran>=excs; ++np ) {
291 for( nneg=
std::max(0,np-1); nneg<=(np+2) && ran>=excs; ++nneg ) {
292 for( nz=0; nz<numSec/3 && ran>=excs; ++nz ) {
293 if( ++counter < numMul ) {
295 if( nt>0 && nt<=numSec ) {
297 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
298 if( std::fabs(dum) < 1.0 ) {
299 if( test >= 1.0
e-10 )excs += dum*test;
318 incidentHasChanged =
true;
320 targetHasChanged =
true;
326 incidentHasChanged =
true;
329 targetHasChanged =
true;
332 incidentHasChanged =
true;
339 incidentHasChanged =
true;
343 incidentHasChanged =
true;
345 targetHasChanged =
true;
350 incidentHasChanged =
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 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
static G4SigmaMinus * SigmaMinus()
G4DynamicParticle * ReturnTargetParticle() const
const G4String & GetName() const
static G4SigmaPlus * SigmaPlus()
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
void SetKineticEnergy(const G4double en)
G4double GetKineticEnergy() const
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)
void Cascade(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool &quasiElastic)
G4double GetKineticEnergy() const
const G4ParticleDefinition * GetDefinition() const
static G4Neutron * Neutron()
G4GLOB_DLL std::ostream G4cout
static constexpr double pi
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
G4double EvaporationEffects(G4double kineticEnergy)
G4HadFinalState theParticleChange
T min(const T t1, const T t2)
brief Return the smallest of the two arguments