Import Geant4 10.4.1 source tree

This commit is contained in:
Gabriele Cosmo
2018-03-02 09:34:30 +01:00
parent fc6af9e721
commit fe04dcb406
341 changed files with 18389 additions and 24522 deletions
+17 -1
View File
@@ -1,4 +1,4 @@
$Id: History 107529 2017-11-21 07:38:24Z gcosmo $
$Id: History 108682 2018-02-27 07:54:34Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,22 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
February 27, 2018, G. Cosmo (run-V10-03-18)
- G4RunManagerKernel: updated also MT banner.
February 26, 2018, M. Asai
- G4RunManagerKernel: two general papers are added to the banner.
February 9, 2018, M. Asai (run-V10-03-17)
- G4RunManagerKernel.cc :
Application state is set to G4State_Init while application is in
RunInitialization().
December 26, 2017, M. Asai
- G4UserPhysicsListMessenger :
UI command returns an error message if a command is refused due
to incorrect parameter(s).
November 21, 2017, G. Cosmo (run-V10-03-16)
- Fixed compilation warning on clang compiler.
+19 -13
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4RunManagerKernel.cc 107524 2017-11-21 07:15:27Z gcosmo $
// $Id: G4RunManagerKernel.cc 108682 2018-02-27 07:54:34Z gcosmo $
//
//
@@ -137,12 +137,14 @@ G4RunManagerKernel::G4RunManagerKernel()
versionString += " ";
versionString += G4Date;
G4cout << G4endl
<< "*************************************************************" << G4endl
<< "**************************************************************" << G4endl
<< versionString << G4endl
<< " Copyright : Geant4 Collaboration" << G4endl
<< " Reference : NIM A 506 (2003), 250-303" << G4endl
<< " WWW : http://cern.ch/geant4" << G4endl
<< "*************************************************************" << G4endl
<< " Copyright : Geant4 Collaboration" << G4endl
<< " References : NIM A 506 (2003), 250-303" << G4endl
<< " : IEEE-TNS 53 (2006), 270-278" << G4endl
<< " : NIM A 835 (2016), 186-225" << G4endl
<< " WWW : http://geant4.org/" << G4endl
<< "**************************************************************" << G4endl
<< G4endl;
}
@@ -218,13 +220,15 @@ numberOfParallelWorld(0),geometryNeedsToBeClosed(true),
versionString += " ";
versionString += G4Date;
G4cout << G4endl
<< "*************************************************************" << G4endl
<< "**************************************************************" << G4endl
<< versionString << G4endl
<< " << in Multi-threaded mode >> " << G4endl
<< " Copyright : Geant4 Collaboration" << G4endl
<< " Reference : NIM A 506 (2003), 250-303" << G4endl
<< " WWW : http://cern.ch/geant4" << G4endl
<< "*************************************************************" << G4endl
<< " Copyright : Geant4 Collaboration" << G4endl
<< " References : NIM A 506 (2003), 250-303" << G4endl
<< " : IEEE-TNS 53 (2006), 270-278" << G4endl
<< " : NIM A 835 (2016), 186-225" << G4endl
<< " WWW : http://geant4.org/" << G4endl
<< "**************************************************************" << G4endl
<< G4endl;
break;
default:
@@ -684,6 +688,7 @@ G4bool G4RunManagerKernel::RunInitialization(G4bool fakeRun)
if(geometryNeedsToBeClosed) CheckRegularGeometry();
stateManager->SetNewState(G4State_Init);
PropagateGenericIonID();
SetupShadowProcess();
UpdateRegion();
@@ -706,6 +711,7 @@ G4bool G4RunManagerKernel::RunInitialization(G4bool fakeRun)
#ifdef G4MULTITHREADED
G4UnitDefinition::GetUnitsTable().Synchronize();
#endif
stateManager->SetNewState(G4State_Idle);
stateManager->SetNewState(G4State_GeomClosed);
return true;
}
@@ -757,12 +763,12 @@ void G4RunManagerKernel::UpdateRegion()
{
G4StateManager* stateManager = G4StateManager::GetStateManager();
G4ApplicationState currentState = stateManager->GetCurrentState();
if( currentState != G4State_Idle )
if( currentState != G4State_Init )
{
G4Exception("G4RunManagerKernel::UpdateRegion",
"Run0024",
JustWarning,
"Geant4 kernel not in Idle state : method ignored.");
"Geant4 kernel not in Init state : method ignored.");
return;
}
+23 -6
View File
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4UserPhysicsListMessenger.cc 71799 2013-06-24 14:45:59Z gcosmo $
// $Id: G4UserPhysicsListMessenger.cc 108540 2018-02-16 09:30:43Z gcosmo $
//
//
//---------------------------------------------------------------
@@ -227,6 +227,7 @@ G4UserPhysicsListMessenger::~G4UserPhysicsListMessenger()
void G4UserPhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
{
G4ExceptionDescription ed;
if( command==setCutCmd ){
G4double newCut = setCutCmd->GetNewDoubleValue(newValue);
thePhysicsList->SetDefaultCutValue(newCut);
@@ -238,7 +239,7 @@ void G4UserPhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newV
str >> particleName >> cut >> unit ;
thePhysicsList->SetCutValue(cut*G4UIcommand::ValueOf(unit), particleName) ;
} else if( command==getCutForAGivenParticleCmd ){
} else if( command==getCutForAGivenParticleCmd ){
G4cout << thePhysicsList->GetCutValue(newValue)/mm <<"[mm]" << G4endl ;
} else if( command==setCutRCmd ){
@@ -248,7 +249,8 @@ void G4UserPhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newV
G4double cVal = -1.0;
is >> regName >> cVal >> uniName;
if (is.fail()) {
G4cout << "illegal arguments : try again " << G4endl;
ed << "illegal arguments : " << newValue;
command->CommandFailed(ed);
return;
}
thePhysicsList->SetCutsForRegion(cVal*(setCutRCmd->ValueOf(uniName)),regName);
@@ -265,13 +267,28 @@ void G4UserPhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newV
} else if( command == addProcManCmd ){
G4ParticleDefinition* particle = (G4ParticleTable::GetParticleTable())->FindParticle(newValue);
if (particle == 0) return;
if (particle->GetProcessManager() != 0) return;
if (particle == 0)
{
ed << " Particle is not found : " << newValue;
command->CommandFailed(ed);
return;
}
else if (particle->GetProcessManager() != 0)
{
ed << " Particle is not initialized : " << newValue;
command->CommandFailed(ed);
return;
}
thePhysicsList->AddProcessManager(particle);
} else if( command == buildPTCmd ){
G4ParticleDefinition* particle = (G4ParticleTable::GetParticleTable())->FindParticle(newValue);
if (particle == 0) return;
if (particle == 0)
{
ed << " Particle is not found : " << newValue;
command->CommandFailed(ed);
return;
}
thePhysicsList->PreparePhysicsTable(particle);
thePhysicsList->BuildPhysicsTable(particle);