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: G4EnergyRangeManager.cc,v 1.3 1999/12/15 14:52:07 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4EnergyRangeManager.cc,v 1.3.8.1 2001/06/28 19:12:57 gunter Exp $
// GEANT4 tag $Name: $
//
// Hadronic Process: Energy Range Manager
// original by H.P. Wellisch
@@ -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 Inelastic Process Class
@@ -43,20 +59,15 @@
const G4double *theAtomicNumDensityVector =
aMaterial->GetAtomicNumDensityVector();
G4double aTemp = aMaterial->GetTemperature();
G4Element *anElement = (*theElementVector)[0];
G4int j = anElement->GetIndex();
// This apparently should not be here (not useful and dumps core)
// FWJ 17-JUN-1998
// G4bool isOutRange;
// G4double xSection = (*((*thePhysicsTable)(j))).GetValue(
// aParticle->GetTotalMomentum()/GeV, isOutRange );
G4double sigma = 0.0;
for( G4int i=0; i<nElements; ++i )
{
G4double xSection =
GetMicroscopicCrossSection( aParticle, (*theElementVector)[i] );
GetMicroscopicCrossSection( aParticle, (*theElementVector)[i], aTemp);
sigma += theAtomicNumDensityVector[i] * xSection;
}
sigma *= aScaleFactor;
@@ -91,7 +102,8 @@
G4double G4HadronInelasticProcess::GetMicroscopicCrossSection(
const G4DynamicParticle *aParticle,
const G4Element *anElement)
const G4Element *anElement,
G4double aTemp)
{
// returns the microscopic cross section in GEANT4 internal units
@@ -100,7 +112,7 @@
"no CrossSectionDataStore");
return DBL_MIN;
}
return theCrossSectionDataStore->GetCrossSection(aParticle, anElement);
return theCrossSectionDataStore->GetCrossSection(aParticle, anElement, aTemp);
// G4bool isOutRange;
// G4int j = anElement->GetIndex();
@@ -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: G4HadronicInteraction.cc,v 1.2 1999/12/15 14:52:08 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// $Id: G4HadronicInteraction.cc,v 1.2.8.1 2001/06/28 19:12:57 gunter Exp $
// GEANT4 tag $Name: $
//
// Hadronic Interaction base class
// original by H.P. Wellisch
@@ -1,3 +1,25 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
//
#include "G4HadronicInteractionRegistry.hh"
#include "G4HadronicInteraction.hh"
@@ -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: G4HadronicProcess.cc,v 1.8 1999/12/15 14:52:08 gunter Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
// HPW to implement the choosing of an element for scattering.
#include "g4std/fstream"
@@ -38,19 +52,21 @@
}
const G4double *theAtomicNumberDensity = aMaterial->GetAtomicNumDensityVector();
G4double aTemp = aMaterial->GetTemperature();
G4double crossSectionTotal = 0;
G4int i;
G4std::vector<G4double> runningSum;
for( i=0; i < numberOfElements; ++i )
crossSectionTotal += theAtomicNumberDensity[i] *
dispatch->GetMicroscopicCrossSection( aParticle, (*theElementVector)(i) );
{
runningSum.push_back(theAtomicNumberDensity[i] *
dispatch->GetMicroscopicCrossSection( aParticle, (*theElementVector)(i), aTemp));
crossSectionTotal+=runningSum[i];
}
G4double crossSectionSum= 0.;
G4double random = G4UniformRand()*crossSectionTotal;
G4double random = G4UniformRand();
for( i=0; i < numberOfElements; ++i )
{
crossSectionSum += theAtomicNumberDensity[i] *
dispatch->GetMicroscopicCrossSection( aParticle, (*theElementVector)(i) );
if( random<=crossSectionSum )
if( random<=runningSum[i]/crossSectionTotal )
{
currentZ = G4double((*theElementVector)(i)->GetZ());
currentN = (*theElementVector)(i)->GetN();
@@ -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: Inelastic Interaction
@@ -238,7 +254,11 @@
leadingStrangeParticle );
if( finishedGenXPt )return;
G4bool finishedTwoClu = false;
if( modifiedOriginal.GetTotalMomentum()/MeV < 1.0 )vecLen = 0;
if( modifiedOriginal.GetTotalMomentum()/MeV < 1.0 )
{
for(G4int i=0; i<vecLen; i++) delete vec[i];
vecLen = 0;
}
else
{
theReactionDynamics.SuppressChargedPions( vec, vecLen,