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
+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();
}