Import Geant4 9.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 17:01:34 +02:00
parent b1eb5424d2
commit e2d2f9810a
10384 changed files with 698580 additions and 628834 deletions
@@ -23,9 +23,11 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
/// \file electromagnetic/TestEm13/src/PhysicsList.cc
/// \brief Implementation of the PhysicsList class
//
//
// $Id: PhysicsList.cc,v 1.9 2010-04-05 13:45:17 maire Exp $
// GEANT4 tag $Name: not supported by cvs2svn $
// $Id$
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -39,34 +41,40 @@
#include "G4LossTableManager.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsList::PhysicsList()
: G4VModularPhysicsList()
{
//add new units for cross sections
//
new G4UnitDefinition( "mm2/g", "mm2/g","Surface/Mass", mm2/g);
new G4UnitDefinition( "um2/mg", "um2/mg","Surface/Mass", um*um/mg);
G4LossTableManager::Instance();
currentDefaultCut = 1.0*mm;
cutForGamma = currentDefaultCut;
cutForElectron = currentDefaultCut;
cutForPositron = currentDefaultCut;
fCurrentDefaultCut = 1.0*mm;
fCutForGamma = fCurrentDefaultCut;
fCutForElectron = fCurrentDefaultCut;
fCutForPositron = fCurrentDefaultCut;
pMessenger = new PhysicsListMessenger(this);
fMessenger = new PhysicsListMessenger(this);
SetVerboseLevel(1);
// EM physics
emName = G4String("standard");
emPhysicsList = new PhysListEmStandard(emName);
fEmName = G4String("standard");
fEmPhysicsList = new PhysListEmStandard(fEmName);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
PhysicsList::~PhysicsList()
{
delete pMessenger;
delete fMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -177,7 +185,7 @@ void PhysicsList::ConstructProcess()
// Electromagnetic physics list
//
emPhysicsList->ConstructProcess();
fEmPhysicsList->ConstructProcess();
// Em options
//
@@ -193,22 +201,22 @@ void PhysicsList::AddPhysicsList(const G4String& name)
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl;
}
if (name == emName) return;
if (name == fEmName) return;
if (name == "standard") {
emName = name;
delete emPhysicsList;
emPhysicsList = new PhysListEmStandard(name);
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new PhysListEmStandard(name);
} else if (name == "livermore") {
emName = name;
delete emPhysicsList;
emPhysicsList = new PhysListEmLivermore(name);
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new PhysListEmLivermore(name);
} else if (name == "penelope") {
emName = name;
delete emPhysicsList;
emPhysicsList = new PhysListEmPenelope(name);
fEmName = name;
delete fEmPhysicsList;
fEmPhysicsList = new PhysListEmPenelope(name);
} else {
G4cout << "PhysicsList::AddPhysicsList: <" << name << ">"
@@ -230,33 +238,33 @@ void PhysicsList::SetCuts()
// set cut values for gamma at first and for e- second and next for e+,
// because some processes for e+/e- need cut values for gamma
SetCutValue(cutForGamma, "gamma");
SetCutValue(cutForElectron, "e-");
SetCutValue(cutForPositron, "e+");
SetCutValue(fCutForGamma, "gamma");
SetCutValue(fCutForElectron, "e-");
SetCutValue(fCutForPositron, "e+");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCutForGamma(G4double cut)
{
cutForGamma = cut;
SetParticleCuts(cutForGamma, G4Gamma::Gamma());
fCutForGamma = cut;
SetParticleCuts(fCutForGamma, G4Gamma::Gamma());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCutForElectron(G4double cut)
{
cutForElectron = cut;
SetParticleCuts(cutForElectron, G4Electron::Electron());
fCutForElectron = cut;
SetParticleCuts(fCutForElectron, G4Electron::Electron());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void PhysicsList::SetCutForPositron(G4double cut)
{
cutForPositron = cut;
SetParticleCuts(cutForPositron, G4Positron::Positron());
fCutForPositron = cut;
SetParticleCuts(fCutForPositron, G4Positron::Positron());
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......