Import Geant4 3.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:10:37 +02:00
parent 137e303ecc
commit 36c080dca6
3464 changed files with 119310 additions and 52696 deletions
@@ -1,12 +1,28 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4HEPionPlusInelastic.cc,v 1.3 1999/12/15 14:52:57 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4HEPionPlusInelastic.cc,v 1.5.2.1 2001/06/28 19:13:58 gunter Exp $
// GEANT4 tag $Name: $
//
//
@@ -167,6 +183,7 @@ ApplyYourself( const G4Track &aTrack, G4Nucleus &targetNucleus )
{
G4cout << "GHEInelasticInteraction::ApplyYourself fails to produce final state particles" << G4endl;
}
FillParticleChange(pv, vecLength);
delete [] pv;
theParticleChange.SetStatusChange(fStopAndKill);
@@ -227,7 +244,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
counter = -1;
for( np=0; np<(numSec/3); np++ )
{
for( nm=G4std::max(0,np-2); nm<=np; nm++ )
for( nm=Imax(0,np-2); nm<=np; nm++ )
{
for( nz=0; nz<numSec/3; nz++ )
{
@@ -249,7 +266,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
counter = -1;
for( np=0; np<numSec/3; np++ )
{
for( nm=G4std::max(0,np-1); nm<=(np+1); nm++ )
for( nm=Imax(0,np-1); nm<=(np+1); nm++ )
{
for( nz=0; nz<numSec/3; nz++ )
{
@@ -285,7 +302,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
if( targetCode == neutronCode )
{
G4double cech[] = {0.33,0.27,0.29,0.31,0.27,0.18,0.13,0.10,0.09,0.07};
G4int iplab = G4int( G4std::min( 9.0, incidentTotalMomentum*5. ) );
G4int iplab = G4int( Amin( 9.0, incidentTotalMomentum*5. ) );
if( G4UniformRand() < cech[iplab]/pow(atomicWeight,0.42) )
{ // charge exchange pi+ n -> pi0 p
pv[0] = PionZero;
@@ -349,7 +366,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
for( nt=1; nt<=numSec; nt++ )
{
test = exp( G4std::min( expxu, G4std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
dum = M_PI*nt/(2.0*n*n);
if( fabs(dum) < 1.0 )
if( test >= 1.0e-10 )anpn += dum*test;
@@ -364,7 +381,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
counter = -1;
for( np=0; np<numSec/3; np++ )
{
for( nm=G4std::max(0,np-2); nm<=np; nm++ )
for( nm=Imax(0,np-2); nm<=np; nm++ )
{
for( nz=0; nz<numSec/3; nz++ )
{
@@ -373,7 +390,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
nt = np+nm+nz;
if( (nt>0) && (nt<=numSec) )
{
test = exp( G4std::min( expxu, G4std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
dum = (M_PI/anpn)*nt*protmul[counter]*protnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
if( test >= 1.0e-10 )excs += dum*test;
@@ -395,7 +412,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
counter = -1;
for( np=0; np<numSec/3; np++ )
{
for( nm=G4std::max(0,np-1); nm<=(np+1); nm++ )
for( nm=Imax(0,np-1); nm<=(np+1); nm++ )
{
for( nz=0; nz<numSec/3; nz++ )
{
@@ -404,7 +421,7 @@ G4HEPionPlusInelastic::FirstIntInCasPionPlus( G4bool &inElastic,
nt = np+nm+nz;
if( (nt>=1) && (nt<=numSec) )
{
test = exp( G4std::min( expxu, G4std::max( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
test = exp( Amin( expxu, Amax( expxl, -(M_PI/4.0)*(nt*nt)/(n*n) ) ) );
dum = (M_PI/anpn)*nt*neutmul[counter]*neutnorm[nt-1]/(2.0*n*n);
if( fabs(dum) < 1.0 )
if( test >= 1.0e-10 )excs += dum*test;