Import Geant4 9.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:46:55 +02:00
parent 89a9605df1
commit b1eb5424d2
10957 changed files with 888481 additions and 160139 deletions
@@ -23,11 +23,12 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4LivermoreRayleighModel.cc,v 1.8 2009/09/23 16:54:06 flongo Exp $
// GEANT4 tag $Name: geant4-09-03 $
// $Id: G4LivermoreRayleighModel.cc,v 1.9 2010-12-27 17:45:12 vnivanch Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
//
// Author: Sebastien Inserti
// Author: Sebastien Incerti
// 30 October 2008
// on base of G4LowEnergyRayleigh developed by A.Forti and M.G.Pia
//
// History:
// --------
@@ -37,6 +38,7 @@
// - remove GetMeanFreePath method and table
// - remove initialisation of element selector
// - use G4ElementSelector
// 26 Dec 2010 V Ivanchenko Load data tables only once to avoid memory leak
#include "G4LivermoreRayleighModel.hh"
@@ -78,8 +80,8 @@ G4LivermoreRayleighModel::G4LivermoreRayleighModel(const G4ParticleDefinition*,
G4LivermoreRayleighModel::~G4LivermoreRayleighModel()
{
if (crossSectionHandler) delete crossSectionHandler;
if (formFactorData) delete formFactorData;
delete crossSectionHandler;
delete formFactorData;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -87,19 +89,21 @@ G4LivermoreRayleighModel::~G4LivermoreRayleighModel()
void G4LivermoreRayleighModel::Initialise(const G4ParticleDefinition* particle,
const G4DataVector& cuts)
{
if (verboseLevel > 3)
if (verboseLevel > 3) {
G4cout << "Calling G4LivermoreRayleighModel::Initialise()" << G4endl;
}
if (crossSectionHandler)
{
crossSectionHandler->Clear();
delete crossSectionHandler;
}
delete formFactorData;
// Data are read for all materials
crossSectionHandler = new G4CrossSectionHandler;
crossSectionHandler->Clear();
// crossSectionHandler->Clear();
G4String crossSectionFile = "rayl/re-cs-";
crossSectionHandler->LoadData(crossSectionFile);
@@ -107,13 +111,13 @@ void G4LivermoreRayleighModel::Initialise(const G4ParticleDefinition* particle,
G4String formFactorFile = "rayl/re-ff-";
formFactorData = new G4CompositeEMDataSet(ffInterpolation,1.,1.);
formFactorData->LoadData(formFactorFile);
InitialiseElementSelectors(particle,cuts);
//
if (verboseLevel > 2)
if (verboseLevel > 2) {
G4cout << "Loaded cross section files for Livermore Rayleigh model" << G4endl;
}
if (verboseLevel > 0) {
G4cout << "Livermore Rayleigh model is initialized " << G4endl
<< "Energy range: "
@@ -122,7 +126,7 @@ void G4LivermoreRayleighModel::Initialise(const G4ParticleDefinition* particle,
<< G4endl;
}
if(isInitialised) return;
if(isInitialised) { return; }
fParticleChange = GetParticleChangeForGamma();
isInitialised = true;
@@ -136,12 +140,12 @@ G4double G4LivermoreRayleighModel::ComputeCrossSectionPerAtom(
G4double Z, G4double,
G4double, G4double)
{
if (verboseLevel > 3)
if (verboseLevel > 3) {
G4cout << "Calling CrossSectionPerAtom() of G4LivermoreRayleighModel" << G4endl;
if (GammaEnergy < lowEnergyLimit || GammaEnergy > highEnergyLimit)
}
if (GammaEnergy < lowEnergyLimit || GammaEnergy > highEnergyLimit) {
return 0.0;
}
G4double cs = crossSectionHandler->FindValue(G4int(Z), GammaEnergy);
return cs;
}
@@ -194,7 +198,7 @@ void G4LivermoreRayleighModel::SampleSecondaries(std::vector<G4DynamicParticle*>
fcostheta = ( 1. + cosTheta*cosTheta)/2.;
} while (fcostheta < G4UniformRand());
if (photonEnergy0 > 5)
if (photonEnergy0 > 5.*MeV)
{
cosTheta = 1.;
}