51 G4cout <<
"G4RPGAntiXiZeroInelastic::ApplyYourself called" <<
G4endl;
53 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
64 modifiedOriginal = *originalIncident;
70 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
84 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
93 targetParticle = *originalTarget;
96 G4bool incidentHasChanged =
false;
97 G4bool targetHasChanged =
false;
98 G4bool quasiElastic =
false;
107 originalIncident, currentParticle, targetParticle,
108 incidentHasChanged, targetHasChanged, quasiElastic );
111 originalIncident, originalTarget, modifiedOriginal,
112 targetNucleus, currentParticle, targetParticle,
113 incidentHasChanged, targetHasChanged, quasiElastic );
116 currentParticle, targetParticle,
117 incidentHasChanged );
119 delete originalTarget;
130 G4bool &incidentHasChanged,
147 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
148 targetMass*targetMass +
149 2.0*targetMass*etOriginal );
150 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
156 const G4int numMul = 1200;
157 const G4int numSec = 60;
162 G4int counter, nt=0, np=0, nneg=0, nz=0;
169 for( i=0; i<numMul; ++i )protmul[i] = 0.0;
170 for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
172 for (np = 0; np < (numSec/3); ++np) {
173 for( nneg=
std::max(0,np-2); nneg<=(np+1); ++nneg )
175 for( nz=0; nz<numSec/3; ++nz )
177 if( ++counter < numMul )
180 if( nt>0 && nt<=numSec )
182 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
183 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=
std::max(0,np-1); 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-2); 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;
287 else if( np == nneg+1 )
292 targetHasChanged =
true;
297 incidentHasChanged =
true;
303 incidentHasChanged =
true;
305 targetHasChanged =
true;
311 for( np=0; np<numSec/3 && ran>=excs; ++np )
313 for( nneg=
std::max(0,np-1); 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 targetHasChanged =
true;
351 incidentHasChanged =
true;
353 targetHasChanged =
true;
365 else if( np == nneg )
370 incidentHasChanged =
true;
372 targetHasChanged =
true;
378 incidentHasChanged =
true;
void SetElement(G4int anIndex, Type *anElement)
G4double EvaporationEffects(G4double kineticEnergy)
G4double GetTotalMomentum() const
CLHEP::Hep3Vector G4ThreeVector
void SetUpChange(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
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()
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
const G4ParticleDefinition * GetDefinition() const
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4XiMinus * XiMinus()
static G4Proton * Proton()
static G4PionPlus * PionPlus()
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
static G4Neutron * Neutron()
G4double GetKineticEnergy() const
void Cascade(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool &quasiElastic)
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
G4ThreeVector GetMomentum() const
G4HadFinalState theParticleChange
const G4Material * GetMaterial() const
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)
G4double GetTotalEnergy() const