48 G4cout <<
"G4RPGAntiKZeroInelastic::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 );
109 originalIncident, originalTarget, modifiedOriginal,
110 targetNucleus, currentParticle, targetParticle,
111 incidentHasChanged, targetHasChanged, quasiElastic );
119 currentParticle, targetParticle,
120 incidentHasChanged );
122 delete originalTarget;
132 G4bool &incidentHasChanged,
150 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
151 targetMass*targetMass +
152 2.0*targetMass*etOriginal );
153 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
156 const G4int numMul = 1200;
157 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 )
175 for( nneg=
std::max(0,np-2); nneg<=np; ++nneg )
177 for( nz=0; nz<numSec/3; ++nz )
179 if( ++counter < numMul )
182 if( nt>0 && nt<=numSec )
184 protmul[counter] =
Pmltpc(np,nneg,nz,nt,b[0],c);
185 protnorm[nt-1] += protmul[counter];
191 for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
192 for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
194 for( np=0; np<(numSec/3); ++np )
196 for( nneg=
std::max(0,np-1); nneg<=(np+1); ++nneg )
198 for( nz=0; nz<numSec/3; ++nz )
200 if( ++counter < numMul )
203 if( nt>0 && nt<=numSec )
205 neutmul[counter] =
Pmltpc(np,nneg,nz,nt,b[1],c);
206 neutnorm[nt-1] += neutmul[counter];
212 for( i=0; i<numSec; ++i )
214 if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
215 if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
233 const G4double cech[] = {1.,1.,1.,0.70,0.60,0.55,0.35,0.25,0.18,0.15};
237 np = nneg = nz = nt = 0;
239 const G4double cnk0[] = {0.17,0.18,0.17,0.24,0.26,0.20,0.22,0.21,0.34,0.45,
240 0.58,0.55,0.36,0.29,0.29,0.32,0.32,0.33,0.33,0.33};
247 incidentHasChanged =
true;
248 targetHasChanged =
true;
250 }
else if( ran < 0.50 ) {
256 incidentHasChanged =
true;
257 targetHasChanged =
true;
258 }
else if( ran < 0.75 ) {
263 incidentHasChanged =
true;
264 targetHasChanged =
true;
272 incidentHasChanged =
true;
273 targetHasChanged =
true;
280 incidentHasChanged =
true;
281 targetHasChanged =
true;
285 if (availableEnergy < aPiPlus->GetPDGMass()/
MeV) {
295 for( np=0; (np<numSec/3) && (ran>=excs); ++np )
297 for( nneg=
std::max(0,np-2); nneg<=np && ran>=excs; ++nneg )
299 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
301 if( ++counter < numMul )
304 if( nt>0 && nt<=numSec )
307 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
308 if( std::fabs(dum) < 1.0 )
310 if( test >= 1.0
e-10 )excs += dum*test;
331 incidentHasChanged =
true;
336 targetHasChanged =
true;
343 incidentHasChanged =
true;
344 targetHasChanged =
true;
351 for( np=0; np<numSec/3 && ran>=excs; ++np )
353 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
355 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
357 if( ++counter < numMul )
360 if( nt>0 && nt<=numSec )
363 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
364 if( std::fabs(dum) < 1.0 )
366 if( test >= 1.0
e-10 )excs += dum*test;
386 incidentHasChanged =
true;
387 targetHasChanged =
true;
391 incidentHasChanged =
true;
395 targetHasChanged =
true;
410 else if( ran < 0.84 )
431 else if( ran < 0.84 )
450 else if( ran < 0.78 )
455 else if( ran < 0.89 )
466 incidentHasChanged =
true;
467 targetHasChanged =
true;
475 incidentHasChanged =
true;
483 targetHasChanged =
true;
static G4PionMinus * PionMinus()
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)
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 Cascade(G4FastVector< G4ReactionProduct, GHADLISTSIZE > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool &quasiElastic)
void GetNormalizationConstant(const G4double availableEnergy, G4double &n, G4double &anpn)
const G4ParticleDefinition * GetDefinition() const
static G4SigmaZero * SigmaZero()
static G4Proton * Proton()
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
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
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)
static G4KaonZeroLong * KaonZeroLong()
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)
const G4LorentzVector & Get4Momentum() const
void Report(std::ostream &aS)
G4double GetKineticEnergy() const
static G4KaonZeroShort * KaonZeroShort()
const G4ParticleDefinition * GetDefinition() const
static G4Neutron * Neutron()
G4GLOB_DLL std::ostream G4cout
static G4PionZero * PionZero()
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