52 G4cout <<
"G4RPGAntiXiZeroInelastic::ApplyYourself called" <<
G4endl;
54 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
65 modifiedOriginal = *originalIncident;
71 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
85 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
94 targetParticle = *originalTarget;
97 G4bool incidentHasChanged =
false;
98 G4bool targetHasChanged =
false;
99 G4bool quasiElastic =
false;
108 originalIncident, currentParticle, targetParticle,
109 incidentHasChanged, targetHasChanged, quasiElastic );
112 originalIncident, originalTarget, modifiedOriginal,
113 targetNucleus, currentParticle, targetParticle,
114 incidentHasChanged, targetHasChanged, quasiElastic );
117 currentParticle, targetParticle,
118 incidentHasChanged );
120 delete originalTarget;
131 G4bool &incidentHasChanged,
148 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
149 targetMass*targetMass +
150 2.0*targetMass*etOriginal );
151 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
157 const G4int numMul = 1200;
158 const G4int numSec = 60;
163 G4int counter, nt=0, np=0, nneg=0, nz=0;
170 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
171 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
173 for (np = 0; np < (numSec/3); ++np) {
174 for( nneg=
std::max(0,np-2); nneg<=(np+1); ++nneg )
176 for( nz=0; nz<numSec/3; ++nz )
178 if( ++counter < numMul )
181 if( nt>0 && nt<=numSec )
183 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
184 protnorm[nt-1] += protmul[counter];
190 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
191 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
193 for( np=0; np<numSec/3; ++np )
195 for( nneg=
std::max(0,np-1); nneg<=(np+2); ++nneg )
197 for( nz=0; nz<numSec/3; ++nz )
199 if( ++counter < numMul )
202 if( nt>0 && nt<=numSec )
204 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
205 neutnorm[nt-1] += neutmul[counter];
211 for( i=0; i<numSec; ++i )
213 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
214 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
235 for( np=0; np<numSec/3 && ran>=excs; ++np )
237 for( nneg=
std::max(0,np-2); nneg<=(np+1) && ran>=excs; ++nneg )
239 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
241 if( ++counter < numMul )
244 if( nt>0 && nt<=numSec )
247 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
248 if( std::fabs(dum) < 1.0 )
250 if( test >= 1.0
e-10 )excs += dum*test;
276 incidentHasChanged =
true;
288 else if( np == nneg+1 )
293 targetHasChanged =
true;
298 incidentHasChanged =
true;
304 incidentHasChanged =
true;
306 targetHasChanged =
true;
312 for( np=0; np<numSec/3 && ran>=excs; ++np )
314 for( nneg=
std::max(0,np-1); nneg<=(np+2) && ran>=excs; ++nneg )
316 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
318 if( ++counter < numMul )
321 if( nt>0 && nt<=numSec )
324 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
325 if( std::fabs(dum) < 1.0 )
327 if( test >= 1.0
e-10 )excs += dum*test;
347 targetHasChanged =
true;
352 incidentHasChanged =
true;
354 targetHasChanged =
true;
366 else if( np == nneg )
371 incidentHasChanged =
true;
373 targetHasChanged =
true;
379 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
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
void SetUpChange(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
static constexpr double MeV
G4double Cinema(G4double kineticEnergy)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
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()
static G4XiMinus * XiMinus()
G4double GetTotalEnergy() const
static G4KaonMinus * KaonMinus()
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
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 Cascade(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool &quasiElastic)
G4double GetTotalMomentum() 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)
G4double GetKineticEnergy() const
void SetElement(G4int anIndex, Type *anElement)
const G4ParticleDefinition * GetDefinition() const
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