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: G4LightMedia.cc,v 1.2 1999/12/15 14:53:40 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4LightMedia.cc,v 1.2.8.1 2001/06/28 19:15:03 gunter Exp $
// GEANT4 tag $Name: $
//
// Hadronic Process: Light Media Charge and/or Strangeness Exchange
// J.L. Chuma, TRIUMF, 21-Feb-1997
+49 -11
View File
@@ -1,12 +1,26 @@
// 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: G4Nucleus.cc,v 1.5 2000/08/03 08:50:48 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// original by H.P. Wellisch
// modified by J.L. Chuma, TRIUMF, 19-Nov-1996
@@ -24,14 +38,38 @@
#include "G4Nucleus.hh"
#include "Randomize.hh"
G4ReactionProduct G4Nucleus::GetThermalNucleus(G4double targetMass) const
G4ReactionProduct G4Nucleus::
GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp) const
{
G4double velMag = aVelocity.mag();
G4ReactionProduct result;
G4double value = 0;
G4double random = 1;
G4double norm = 3.*sqrt(k_Boltzmann*temp*aMass*G4Neutron::Neutron()->GetPDGMass());
norm /= G4Neutron::Neutron()->GetPDGMass();
norm *= 5.;
norm += velMag;
norm /= velMag;
while(value/norm<random)
{
result = GetThermalNucleus(aMass, temp);
G4ThreeVector targetVelocity = 1./result.GetMass()*result.GetMomentum();
value = (targetVelocity+aVelocity).mag()/velMag;
random = G4UniformRand();
}
return result;
}
G4ReactionProduct G4Nucleus::GetThermalNucleus(G4double targetMass, G4double temp) const
{
G4double currentTemp = temp;
if(currentTemp < 0) currentTemp = theTemp;
G4ReactionProduct theTarget;
theTarget.SetMass(targetMass*G4Neutron::Neutron()->GetPDGMass());
G4double px, py, pz;
px = GetThermalPz(theTarget.GetMass(), theTemp);
py = GetThermalPz(theTarget.GetMass(), theTemp);
pz = GetThermalPz(theTarget.GetMass(), theTemp);
px = GetThermalPz(theTarget.GetMass(), currentTemp);
py = GetThermalPz(theTarget.GetMass(), currentTemp);
pz = GetThermalPz(theTarget.GetMass(), currentTemp);
theTarget.SetMomentum(px, py, pz);
G4double tMom = sqrt(px*px+py*py+pz*pz);
G4double tEtot = sqrt((tMom+theTarget.GetMass())*
@@ -1,9 +1,25 @@
// 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. *
// ********************************************************************
//
//
//
// Hadronic Process: Reaction Dynamics
@@ -98,6 +114,10 @@
currentParticle = *vec[0];
targetParticle = *vec[1];
for( i=0; i<(vecLen-2); ++i )*vec[i] = *vec[i+2];
G4ReactionProduct *temp = vec[vecLen-1];
delete temp;
temp = vec[vecLen-2];
delete temp;
vecLen -= 2;
currentMass = currentParticle.GetMass()/GeV;
incidentHasChanged = true;
@@ -233,9 +253,9 @@
forwardEnergy += vec[i]->GetMass()/GeV;
for( G4int j=i; j<(vecLen-1); j++ )*vec[j] = *vec[j+1]; // shift up
--forwardCount;
forwardParticlesLeft = 1;
//G4ReactionProduct *temp = vec[vecLen];
//delete temp;
forwardParticlesLeft = 1;
G4ReactionProduct *temp = vec[vecLen-1];
delete temp;
if( --vecLen == 0 )return false; // all the secondaries have been eliminated
break; // --+
} // |
@@ -250,8 +270,8 @@
// above two lines modified 20-oct-97: were just simple equalities
--forwardCount;
for( G4int j=0; j<(vecLen-1); ++j )*vec[j] = *vec[j+1];
//G4ReactionProduct *temp = vec[vecLen];
//delete temp;
G4ReactionProduct *temp = vec[vecLen-1];
delete temp;
if( --vecLen == 0 )return false; // all the secondaries have been eliminated
break;
}
@@ -278,8 +298,8 @@
for( G4int j=i; j<(vecLen-1); ++j )*vec[j] = *vec[j+1]; // shift up
--backwardCount;
backwardParticlesLeft = 1;
//G4ReactionProduct *temp = vec[vecLen];
//delete temp;
G4ReactionProduct *temp = vec[vecLen-1];
delete temp;
if( --vecLen == 0 )return false; // all the secondaries have been eliminated
break;
}
@@ -292,8 +312,8 @@
targetParticle = *vec[0];
--backwardCount;
for( G4int j=0; j<(vecLen-1); ++j )*vec[j] = *vec[j+1];
//G4ReactionProduct *temp = vec[vecLen];
//delete temp;
G4ReactionProduct *temp = vec[vecLen-1];
delete temp;
if( --vecLen == 0 )return false; // all the secondaries have been eliminated
break;
}
@@ -345,6 +365,7 @@
1.43,1.67,2.0,2.5,3.33,5.00,10.00};
G4int backwardNucleonCount = 0; // number of nucleons in backward hemisphere
G4double totalEnergy, kineticEnergy, vecMass;
for( i=(vecLen-1); i>=0; --i )
{
if( vec[i]->GetNewlyAdded() ) // added from intranuclear cascade
@@ -581,8 +602,8 @@
backwardEnergy += vecMass;
}
for( G4int j=i; j<(vecLen-1); ++j )*vec[j] = *vec[j+1]; // shift up
//G4ReactionProduct *temp = vec[vecLen];
//delete temp;
G4ReactionProduct *temp = vec[vecLen-1];
delete temp;
// DEBUGGING --> DumpFrames::DumpFrame(vec, vecLen);
if( --vecLen == 0 )return false; // all the secondaries have been eliminated
pseudoParticle[6] = pseudoParticle[4] + pseudoParticle[5];
@@ -594,6 +615,7 @@
if( phi < 0.0 )phi = twopi - phi;
}
} // closes main for loop
//
// for the incident particle: it was placed in the forward hemisphere
// set pt and phi values, they are changed somewhat in the iteration loop
@@ -1197,7 +1219,7 @@
G4double spall = numberofFinalStateNucleons;
// DEBUGGING --> DumpFrames::DumpFrame(vec, vecLen);
AddBlackTrackParticles( epnb, npnb, edta, ndta, sprob, kineticMinimum, kineticFactor,
modifiedOriginal, spall, targetNucleus,
modifiedOriginal, spall, targetNucleus,
vec, vecLen );
// DEBUGGING --> DumpFrames::DumpFrame(vec, vecLen);
}
@@ -1469,6 +1491,8 @@
} // breaks go down to here
if( secondaryDeleted )
{
G4ReactionProduct *temp = vec[vecLen-1];
delete temp;
--vecLen;
// DEBUGGING --> DumpFrames::DumpFrame(vec, vecLen);
}
@@ -1500,6 +1524,8 @@
}
if( secondaryDeleted )
{
G4ReactionProduct *temp = vec[vecLen-1];
delete temp;
--vecLen;
// DEBUGGING --> DumpFrames::DumpFrame(vec, vecLen);
}
@@ -1527,6 +1553,8 @@
}
if( secondaryDeleted )
{
G4ReactionProduct *temp = vec[vecLen-1];
delete temp;
--vecLen;
// DEBUGGING --> DumpFrames::DumpFrame(vec, vecLen);
}
@@ -3075,7 +3103,11 @@
else
p2->SetDefinition( anAlpha );
spall += p2->GetMass()/GeV * sp1;
if( spall > atomicWeight )break;
if( spall > atomicWeight )
{
delete p2;
break;
}
vec.SetElement( vecLen, p2 );
vec[vecLen]->SetNewlyAdded( true );
vec[vecLen]->SetKineticEnergy( kinetic*GeV );
@@ -3484,6 +3516,8 @@
if( energyCheck < 0.0 ) // chop off the secondary List
{
vecLen = G4std::max( 0, --i ); // looks like a memory leak @@@@@@@@@@@@
G4int j;
for(j=i; j<vecLen; j++) delete vec[j];
break;
}
}
@@ -3761,6 +3795,8 @@
else
v[2]->SetMomentum( v[2]->GetMomentum() * (p/pp) );
}
G4int del;
for(del=0; del<vecLen; del++) delete vec[del];
vecLen = 0;
if( particleIsDefined )
{
@@ -1,17 +1,31 @@
// 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: G4ReactionKinematics.cc,v 1.2 1999/12/15 14:53:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4ReactionKinematics.cc,v 1.2.8.2 2001/06/28 20:20:10 gunter Exp $
// GEANT4 tag $Name: $
//
// CERN Geneva Switzerland
//
// For information related to this code contact:
// CERN, IT Division, ASD group
// ------------ G4ReactionDynamics::TwoBody ------
// new method TwoBodyScattering
// by Christian V"olcker (CERN-Munich), September 1997
@@ -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: G4ReactionProduct.cc,v 1.2 1999/12/15 14:53:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4ReactionProduct.cc,v 1.2.8.1 2001/06/28 19:15:04 gunter Exp $
// GEANT4 tag $Name: $
//
// J.L. Chuma, TRIUMF, 31-Oct-1996
// last modified: 19-Dec-1996
@@ -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: G4StableIsotopes.cc,v 1.2 1999/12/15 14:53:41 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4StableIsotopes.cc,v 1.2.8.1 2001/06/28 19:15:04 gunter Exp $
// GEANT4 tag $Name: $
//
#include "G4StableIsotopes.hh"