55 G4cout <<
"G4RPGKMinusInelastic::ApplyYourself called" <<
G4endl;
57 G4cout <<
"target material = " << targetMaterial->
GetName() <<
", ";
75 G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
89 p = std::sqrt( std::abs((et-amas)*(et+amas)) );
100 targetParticle.SetSide( -1 );
101 G4bool incidentHasChanged =
false;
102 G4bool targetHasChanged =
false;
103 G4bool quasiElastic =
false;
110 Cascade( vec, vecLen,
111 originalIncident, currentParticle, targetParticle,
112 incidentHasChanged, targetHasChanged, quasiElastic );
115 originalIncident, originalTarget, modifiedOriginal,
116 targetNucleus, currentParticle, targetParticle,
117 incidentHasChanged, targetHasChanged, quasiElastic );
120 currentParticle, targetParticle,
121 incidentHasChanged );
123 delete originalTarget;
128 void G4RPGKMinusInelastic::Cascade(
134 G4bool &incidentHasChanged,
152 G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
153 targetMass*targetMass +
154 2.0*targetMass*etOriginal );
155 G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
158 const G4int numMul = 1200;
159 const G4int numSec = 60;
163 G4int 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-1); nneg<=(np+1); ++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=np; nneg<=(np+2); ++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;
249 targetHasChanged =
true;
261 incidentHasChanged =
true;
262 targetHasChanged =
true;
265 else if( ran < 0.50 )
272 incidentHasChanged =
true;
273 targetHasChanged =
true;
275 else if( ran < 0.75 )
282 incidentHasChanged =
true;
283 targetHasChanged =
true;
292 incidentHasChanged =
true;
293 targetHasChanged =
true;
299 if( availableEnergy < aPiPlus->GetPDGMass() )
311 for( np=0; np<numSec/3 && ran>=excs; ++np )
313 for( nneg=
std::max(0,np-1); nneg<=(np+1) && ran>=excs; ++nneg )
315 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
317 if( ++counter < numMul )
323 dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
324 if( std::fabs(dum) < 1.0 )
326 if( test >= 1.0e-10 )excs += dum*
test;
347 incidentHasChanged =
true;
348 targetHasChanged =
true;
351 else if( np == nneg+1 )
354 targetHasChanged =
true;
359 incidentHasChanged =
true;
365 for( np=0; np<numSec/3 && ran>=excs; ++np )
367 for( nneg=np; nneg<=(np+2) && ran>=excs; ++nneg )
369 for( nz=0; nz<numSec/3 && ran>=excs; ++nz )
371 if( ++counter < numMul )
374 if( (
nt>=1) && (
nt<=numSec) )
377 dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
378 if( std::fabs(dum) < 1.0 )
380 if( test >= 1.0e-10 )excs += dum*
test;
400 targetHasChanged =
true;
405 incidentHasChanged =
true;
408 else if( np != nneg )
411 incidentHasChanged =
true;
428 incidentHasChanged =
true;
429 targetHasChanged =
true;
435 incidentHasChanged =
true;
436 targetHasChanged =
true;
439 else if( ran < 0.84 )
445 incidentHasChanged =
true;
446 targetHasChanged =
true;
452 incidentHasChanged =
true;
453 targetHasChanged =
true;
462 incidentHasChanged =
true;
463 targetHasChanged =
true;
469 incidentHasChanged =
true;
470 targetHasChanged =
true;
482 incidentHasChanged =
true;
483 targetHasChanged =
true;
485 else if( ran < 0.78 )
489 incidentHasChanged =
true;
490 targetHasChanged =
true;
492 else if( ran < 0.89 )
496 incidentHasChanged =
true;
497 targetHasChanged =
true;
503 incidentHasChanged =
true;
504 targetHasChanged =
true;
513 incidentHasChanged =
true;
520 targetHasChanged =
true;
G4double EvaporationEffects(G4double kineticEnergy)
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
void SetUpChange(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
void SetKineticEnergy(const G4double en)
void SetMomentum(const G4double x, const G4double y, const G4double z)
const G4String & GetName() const
static G4KaonZeroLong * KaonZeroLong()
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
void SetDefinitionAndUpdateE(G4ParticleDefinition *aParticleDefinition)
const G4String & GetParticleName() const
static G4SigmaZero * SigmaZero()
static G4KaonMinus * KaonMinus()
G4ParticleDefinition * GetDefinition() const
void SetStatusChange(G4HadFinalStateStatus aS)
G4double Pmltpc(G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
G4GLOB_DLL std::ostream G4cout
const G4ParticleDefinition * GetDefinition() const
static G4KaonZeroShort * KaonZeroShort()
G4double GetKineticEnergy() const
static G4Proton * Proton()
static G4PionPlus * PionPlus()
static G4Neutron * Neutron()
const G4LorentzVector & Get4Momentum() const
static G4PionZero * PionZero()
static G4SigmaMinus * SigmaMinus()
G4double GetKineticEnergy() const
void SetEnergyChange(G4double anEnergy)
G4double GetPDGMass() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double Cinema(G4double kineticEnergy)
static G4PionMinus * PionMinus()
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)
static G4Lambda * Lambda()
void SetUpPions(const G4int np, const G4int nm, const G4int nz, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)
void SetMomentumChange(const G4ThreeVector &aV)
G4double GetTotalMomentum() const
G4double GetTotalEnergy() const