57     G4cout << 
"G4RPGKPlusInelastic::ApplyYourself called" << 
G4endl;
 
   59     G4cout << 
"target material = " << targetMaterial->
GetName() << 
", ";
 
   76   currentParticle.SetKineticEnergy( ek );
 
   78   G4double p = std::sqrt( std::abs((et-amas)*(et+amas)) );
 
   79   G4double pp = currentParticle.GetMomentum().mag();
 
   83     currentParticle.SetMomentum( momentum * (p/pp) );
 
   90   currentParticle.SetKineticEnergy( ek );
 
   92   p = std::sqrt( std::abs((et-amas)*(et+amas)) );
 
   93   pp = currentParticle.GetMomentum().mag();
 
   97     currentParticle.SetMomentum( momentum * (p/pp) );
 
  103   targetParticle.SetSide( -1 );  
 
  104   G4bool incidentHasChanged = 
false;
 
  105   G4bool targetHasChanged = 
false;
 
  106   G4bool quasiElastic = 
false;
 
  112   if( currentParticle.GetKineticEnergy() > cutOff )
 
  113     Cascade( vec, vecLen,
 
  114              originalIncident, currentParticle, targetParticle,
 
  115              incidentHasChanged, targetHasChanged, quasiElastic );
 
  118                     originalIncident, originalTarget, modifiedOriginal,
 
  119                     targetNucleus, currentParticle, targetParticle,
 
  120                     incidentHasChanged, targetHasChanged, quasiElastic );
 
  123                currentParticle, targetParticle,
 
  124                incidentHasChanged );
 
  126   delete originalTarget;
 
  132 void G4RPGKPlusInelastic::Cascade(
 
  138    G4bool &incidentHasChanged,
 
  155   G4double centerofmassEnergy = std::sqrt( mOriginal*mOriginal +
 
  156                                         targetMass*targetMass +
 
  157                                         2.0*targetMass*etOriginal );
 
  158   G4double availableEnergy = centerofmassEnergy-(targetMass+mOriginal);
 
  165   const G4int numMul = 1200;
 
  166   const G4int numSec = 60;
 
  172   G4int nt=0, np=0, nneg=0, nz=0;
 
  179       for( i=0; i<numMul; ++i )protmul[i] = 0.0;
 
  180       for( i=0; i<numSec; ++i )protnorm[i] = 0.0;
 
  182       for( np=0; np<(numSec/3); ++np )
 
  184         for( nneg=
std::max(0,np-2); nneg<=np; ++nneg )
 
  186           for( nz=0; nz<numSec/3; ++nz )
 
  188             if( ++counter < numMul )
 
  193                 protmul[counter] = 
Pmltpc(np,nneg,nz,nt,b[0],c);
 
  194                 protnorm[nt-1] += protmul[counter];
 
  200       for( i=0; i<numMul; ++i )neutmul[i] = 0.0;
 
  201       for( i=0; i<numSec; ++i )neutnorm[i] = 0.0;
 
  203       for( np=0; np<numSec/3; ++np )
 
  205         for( nneg=
std::max(0,np-1); nneg<=(np+1); ++nneg )
 
  207           for( nz=0; nz<numSec/3; ++nz )
 
  209             if( ++counter < numMul )
 
  212               if( (nt>0) && (nt<=numSec) )
 
  214                 neutmul[counter] = 
Pmltpc(np,nneg,nz,nt,b[1],c);
 
  215                 neutnorm[nt-1] += neutmul[counter];
 
  221       for( i=0; i<numSec; ++i )
 
  223         if( protnorm[i] > 0.0 )protnorm[i] = 1.0/protnorm[i];
 
  224         if( neutnorm[i] > 0.0 )neutnorm[i] = 1.0/neutnorm[i];
 
  235   const G4double supp[] = {0.,0.4,0.55,0.65,0.75,0.82,0.86,0.90,0.94,0.98};
 
  265       else if( ran < wp/wt )
 
  280         for( np=0; (np<numSec/3) && (ran>=excs); ++np )
 
  282           for( nneg=
std::max(0,np-2); (nneg<=np) && (ran>=excs); ++nneg )
 
  284             for( nz=0; (nz<numSec/3) && (ran>=excs); ++nz )
 
  286               if( ++counter < numMul )
 
  292                   dum = (
pi/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
 
  293                   if( std::fabs(dum) < 1.0 )
 
  295                     if( test >= 1.0e-10 )excs += dum*
test;
 
  304         if( ran >= excs )
return;  
 
  310         for( np=0; (np<numSec/3) && (ran>=excs); ++np )
 
  312           for( nneg=
std::max(0,np-1); (nneg<=(np+1)) && (ran>=excs); ++nneg )
 
  314             for( nz=0; (nz<numSec/3) && (ran>=excs); ++nz )
 
  316               if( ++counter < numMul )
 
  319                 if( (nt>=1) && (nt<=numSec) )
 
  322                   dum = (
pi/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
 
  323                   if( std::fabs(dum) < 1.0 )
 
  325                     if( test >= 1.0e-10 )excs += dum*
test;
 
  334         if( ran >= excs )
return;  
 
  350          incidentHasChanged = 
true;
 
  355          targetHasChanged = 
true;
 
  363        incidentHasChanged = 
true;
 
  365        incidentHasChanged = 
true;
 
  366        targetHasChanged = 
true;
 
  384          incidentHasChanged = 
true;
 
  385          targetHasChanged = 
true;
 
  393        incidentHasChanged = 
true;
 
  397        targetHasChanged = 
true;
 
G4double EvaporationEffects(G4double kineticEnergy)
 
void SetUpChange(G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct ¤tParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
 
void SetMomentum(const G4double x, const G4double y, const G4double z)
 
const G4String & GetName() const 
 
static G4KaonZeroLong * KaonZeroLong()
 
void SetSide(const G4int sid)
 
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
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 SetStatusChange(G4HadFinalStateStatus aS)
 
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 
 
static G4KaonZeroShort * KaonZeroShort()
 
G4double GetKineticEnergy() const 
 
static G4Proton * Proton()
 
static G4PionPlus * PionPlus()
 
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
 
static G4Neutron * Neutron()
 
const G4LorentzVector & Get4Momentum() const 
 
G4double G4Exp(G4double initial_x)
Exponential Function double precision. 
 
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)
 
T min(const T t1, const T t2)
brief Return the smallest of the two arguments 
 
static constexpr double GeV
 
G4HadFinalState theParticleChange
 
static constexpr double MeV
 
const G4Material * GetMaterial() const 
 
static constexpr double pi
 
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)
 
void SetMomentumChange(const G4ThreeVector &aV)
 
G4double GetTotalEnergy() const