Import Geant4 7.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 11:11:55 +02:00
parent e083ffb441
commit 516dbf1a58
5914 changed files with 202605 additions and 71141 deletions
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4ExceptionHandler.cc,v 1.3 2003/05/21 21:06:01 asaim Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4Run.cc,v 1.7 2004/06/11 14:27:45 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-02 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "G4Run.hh"
+4 -4
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4RunManager.cc,v 1.83 2003/08/01 19:30:14 asaim Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4RunManager.cc,v 1.85 2004/11/25 19:01:13 asaim Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
@@ -64,7 +64,7 @@ G4RunManager::G4RunManager()
userRunAction(0),userPrimaryGeneratorAction(0),userEventAction(0),
userStackingAction(0),userTrackingAction(0),userSteppingAction(0),
geometryInitialized(false),physicsInitialized(false),
geometryNeedsToBeClosed(true),runAborted(false),initializedAtLeastOnce(false),
runAborted(false),initializedAtLeastOnce(false),
geometryToBeOptimized(true),runIDCounter(0),verboseLevel(0),DCtable(0),
currentRun(0),currentEvent(0),n_perviousEventsToBeStored(0),
numberOfEventToBeProcessed(0),storeRandomNumberStatus(false),currentWorld(0)
@@ -327,7 +327,7 @@ void G4RunManager::InitializePhysics()
if(physicsList)
{
if(verboseLevel>1) G4cout << "physicsList->Construct() start." << G4endl;
kernel->InitializePhysics(physicsList);
kernel->InitializePhysics();
}
else
{
+19 -7
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4RunManagerKernel.cc,v 1.15 2004/06/07 13:56:42 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-02 $
// $Id: G4RunManagerKernel.cc,v 1.20 2004/12/07 09:12:31 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00 $
//
//
@@ -31,13 +31,13 @@
#include "G4StateManager.hh"
#include "G4ApplicationState.hh"
#include "G4ExceptionHandler.hh"
//#include "G4EventManager.hh"
#include "G4PrimaryTransformer.hh"
#include "G4GeometryManager.hh"
#include "G4TransportationManager.hh"
//#include "G4Navigator.hh"
#include "G4VPhysicalVolume.hh"
#include "G4LogicalVolume.hh"
#include "G4VUserPhysicsList.hh"
#include "G4ParticleTable.hh"
#include "G4Region.hh"
#include "G4RegionStore.hh"
#include "G4ProductionCuts.hh"
@@ -74,12 +74,14 @@ G4RunManagerKernel::G4RunManagerKernel()
defaultRegion->SetProductionCuts(
G4ProductionCutsTable::GetProductionCutsTable()->GetDefaultProductionCuts());
// Following line is tentatively moved from SetPhysics method
G4ParticleTable::GetParticleTable()->SetReadiness();
// set the initial application state
G4StateManager::GetStateManager()->SetNewState(G4State_PreInit);
// version banner
versionString
= " Geant4 version $Name: geant4-06-02 $ (25-June-2004)";
= " Geant4 version $Name: geant4-07-00 $ (17-December-2004)";
G4cout << G4endl
<< "*************************************************************" << G4endl
<< versionString << G4endl
@@ -193,7 +195,16 @@ void G4RunManagerKernel::DefineWorldVolume(G4VPhysicalVolume* worldVol,
{ stateManager->SetNewState(G4State_Idle); }
}
void G4RunManagerKernel::InitializePhysics(G4VUserPhysicsList* uPhys)
void G4RunManagerKernel::SetPhysics(G4VUserPhysicsList* uPhys)
{
physicsList = uPhys;
// Following line is tentatively moved to the constructor
// G4ParticleTable::GetParticleTable()->SetReadiness();
if(verboseLevel>1) G4cout << "physicsList->ConstructParticle() start." << G4endl;
physicsList->ConstructParticle();
}
void G4RunManagerKernel::InitializePhysics()
{
G4StateManager* stateManager = G4StateManager::GetStateManager();
G4ApplicationState currentState = stateManager->GetCurrentState();
@@ -206,7 +217,6 @@ void G4RunManagerKernel::InitializePhysics(G4VUserPhysicsList* uPhys)
return;
}
physicsList = uPhys;
if(!physicsList)
{
G4Exception("G4RunManagerKernel::InitializePhysics",
@@ -263,6 +273,8 @@ G4bool G4RunManagerKernel::RunInitialization()
if(geometryNeedsToBeClosed) ResetNavigator();
GetPrimaryTransformer()->CheckUnknown();
stateManager->SetNewState(G4State_GeomClosed);
return true;
}
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4RunMessenger.cc,v 1.20 2003/11/04 01:58:29 asaim Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "G4RunMessenger.hh"
+3 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UserPhysicsListMessenger.cc,v 1.23 2003/06/16 17:12:53 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// $Id: G4UserPhysicsListMessenger.cc,v 1.24 2004/11/01 16:47:56 kurasige Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
//---------------------------------------------------------------
@@ -233,6 +233,7 @@ void G4UserPhysicsListMessenger::SetNewValue(G4UIcommand * command,G4String newV
} else if( command == buildPTCmd ){
G4ParticleDefinition* particle = (G4ParticleTable::GetParticleTable())->FindParticle(newValue);
if (particle == 0) return;
thePhysicsList->PreparePhysicsTable(particle);
thePhysicsList->BuildPhysicsTable(particle);
} else if ( command == storeCmd ){
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UserRunAction.cc,v 1.6 2003/05/21 21:06:01 asaim Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "G4UserRunAction.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VModularPhysicsList.cc,v 1.2 2002/05/29 12:11:08 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4VPersistencyManager.cc,v 1.4 2001/07/13 15:57:06 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "G4VPersistencyManager.hh"
@@ -22,7 +22,7 @@
//
//
// $Id: G4VUserDetectorConstruction.cc,v 1.3 2001/07/11 10:08:34 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "G4VUserDetectorConstruction.hh"
+54 -5
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VUserPhysicsList.cc,v 1.48 2003/11/10 15:49:39 kurasige Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
// $Id: G4VUserPhysicsList.cc,v 1.51 2004/11/01 16:47:56 kurasige Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// ------------------------------------------------------------
@@ -169,7 +169,10 @@ void G4VUserPhysicsList::AddProcessManager(G4ParticleDefinition* newParticle,
newManager->DumpInfo();
}
#endif
if (newParticle->GetParticleType() == "nucleus") BuildPhysicsTable(newParticle);
if (newParticle->GetParticleType() == "nucleus") {
PreparePhysicsTable(newParticle);
BuildPhysicsTable(newParticle);
}
}
@@ -347,8 +350,16 @@ void G4VUserPhysicsList::SetParticleCuts( G4double cut, G4ParticleDefinition* pa
///////////////////////////////////////////////////////////////
void G4VUserPhysicsList::BuildPhysicsTable()
{
//Prepare Physics table for all particles
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
PreparePhysicsTable(particle);
}
// ask processes to prepare physics table
if (fRetrievePhysicsTable) {
if (!fIsRestoredCutValues) fIsRestoredCutValues = fCutsTable->RetrieveCutsTable(directoryPhysicsTable, fStoredInAscii);
fIsRestoredCutValues = fCutsTable->RetrieveCutsTable(directoryPhysicsTable, fStoredInAscii);
// check if retrieve Cut Table successfully
if (!fIsRestoredCutValues) {
#ifdef G4VERBOSE
@@ -367,7 +378,13 @@ void G4VUserPhysicsList::BuildPhysicsTable()
}
#endif
}
} else {
#ifdef G4VERBOSE
G4cout << "G4VUserPhysicsList::BuildPhysicsTable";
G4cout << " does not retrieve Cut Table but calculate " << G4endl;
#endif
}
// Sets a value to particle
// set cut values for gamma at first and for e- and e+
G4String particleName;
@@ -416,7 +433,6 @@ void G4VUserPhysicsList::BuildPhysicsTable(G4ParticleDefinition* particle)
#endif
// Retrieve PhysicsTable from files for proccesses
RetrievePhysicsTable(particle, directoryPhysicsTable, fStoredInAscii);
return;
}
}
@@ -436,6 +452,19 @@ void G4VUserPhysicsList::BuildPhysicsTable(G4ParticleDefinition* particle)
}
}
///////////////////////////////////////////////////////////////
void G4VUserPhysicsList::PreparePhysicsTable(G4ParticleDefinition* particle)
{
// Prepare the physics tables for every process for this particle type
// if particle is not ShortLived
if(!particle->IsShortLived()) {
G4ProcessVector* pVector = particle->GetProcessManager()->GetProcessList();
for (G4int j=0; j < pVector->size(); ++j) {
(*pVector)[j]->PreparePhysicsTable(*particle);
}
}
}
///////////////////////////////////////////////////////////////
void G4VUserPhysicsList::BuildIntegralPhysicsTable(G4VProcess* process,
G4ParticleDefinition* particle)
@@ -623,5 +652,25 @@ G4bool G4VUserPhysicsList::GetApplyCuts(const G4String& name) const
/// obsolete methods
void G4VUserPhysicsList::DumpCutValues(const G4String &particle_name)
{
G4cerr << "WARNING !" << G4endl;
G4cerr << " Obsolete DumpCutValues() method is invoked for " << particle_name << G4endl;
G4cerr << " Please use DumpCutValuesTable() instead." << G4endl;
G4cerr << " This dummy method implementation will be removed soon." << G4endl;
DumpCutValuesTable();
}
void G4VUserPhysicsList::DumpCutValues(G4ParticleDefinition* )
{
G4cerr << "WARNING !" << G4endl;
G4cerr << " DumpCutValues() became obsolete." << G4endl;
G4cerr << " Please use DumpCutValuesTable() instead." << G4endl;
G4cerr << " This dummy method implementation will be removed soon." << G4endl;
DumpCutValuesTable();
}
@@ -22,7 +22,7 @@
//
//
// $Id: G4VUserPrimaryGeneratorAction.cc,v 1.3 2001/07/11 10:08:34 gunter Exp $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
#include "G4VUserPrimaryGeneratorAction.hh"