Import Geant4 10.7.0.beta source tree
This commit is contained in:
@@ -28,29 +28,29 @@
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "G4FastSimulationManagerProcess.hh"
|
||||
|
||||
void G4FastSimulationHelper::ActivateFastSimulation(G4ProcessManager* pmanager)
|
||||
void G4FastSimulationHelper::ActivateFastSimulation(G4ProcessManager* pmanager, G4String parallelGeometryName )
|
||||
{
|
||||
G4FastSimulationManagerProcess* fastSimProcess = new G4FastSimulationManagerProcess("fastSimProcess_massGeom");
|
||||
// -- For the parametrisation envelope belonging to the mass geometry case, the G4FastSimulationManagerProcess
|
||||
// -- is a PostStep process, and ordering does not matter:
|
||||
pmanager-> AddDiscreteProcess(fastSimProcess);
|
||||
// It is, however, possible that parametrisation happens in the mass geometry, but the parallel world
|
||||
G4FastSimulationManagerProcess* fastSimProcess;
|
||||
if ( parallelGeometryName.empty() ) {
|
||||
fastSimProcess = new G4FastSimulationManagerProcess("fastSimProcess_massGeom");
|
||||
// -- For the parametrisation envelope belonging to the mass geometry case, the G4FastSimulationManagerProcess
|
||||
// -- is a PostStep process, and ordering does not matter:
|
||||
pmanager-> AddDiscreteProcess(fastSimProcess);
|
||||
}
|
||||
else {
|
||||
fastSimProcess = new G4FastSimulationManagerProcess("fastSimProcess_parallelGeom",parallelGeometryName);
|
||||
// -- For the parallel geometry case, the G4FastSimulationManagerProcessz
|
||||
// -- is an Along+PostStep process, and ordering matters:
|
||||
pmanager->AddProcess(fastSimProcess);
|
||||
pmanager->SetProcessOrdering(fastSimProcess, idxAlongStep, 1);
|
||||
}
|
||||
// If the parallel world
|
||||
// exists (with parallel world physics), e.g. for the sensitive detector.
|
||||
// In that case make sure fast simulation is the first process to be checked by the steppping manager
|
||||
// (highest ordering) so that user can kill the particle and/or deposit energy, ignoring other processes.
|
||||
// Otherwise the parallel world physics (which is a StronglyFroced process) will invoke a PostStepDoIt
|
||||
// on the same step, leading to e.g. duplicated energy deposits.
|
||||
pmanager->SetProcessOrderingToLast(fastSimProcess, idxPostStep);
|
||||
}
|
||||
|
||||
void G4FastSimulationHelper::ActivateFastSimulation(G4ProcessManager* pmanager, G4String parallelGeometryName )
|
||||
{
|
||||
G4FastSimulationManagerProcess* fastSimProcess = new G4FastSimulationManagerProcess("fastSimProcess_parallelGeom",
|
||||
parallelGeometryName);
|
||||
// -- For the parallel geometry case, the G4FastSimulationManagerProcessz
|
||||
// -- is an Along+PostStep process, and ordering matters:
|
||||
pmanager->AddProcess(fastSimProcess);
|
||||
pmanager->SetProcessOrdering(fastSimProcess, idxAlongStep, 1);
|
||||
// Register as the process with highest ordering so it is checked as the first one,
|
||||
// and since it is exclusively forced no other process will be considered (to be invoked).
|
||||
pmanager->SetProcessOrderingToLast(fastSimProcess, idxPostStep);
|
||||
|
||||
@@ -163,6 +163,10 @@ void G4GlobalFastSimulationManager::ShowSetup()
|
||||
for (size_t i=0; i<regions->size(); i++)
|
||||
{
|
||||
world = (*regions)[i]->GetWorldPhysical();
|
||||
if (world == nullptr) // region does not belong to any (existing) world
|
||||
{
|
||||
continue;
|
||||
}
|
||||
G4bool newWorld = true;
|
||||
for (size_t ii=0; ii<worldDone.size(); ii++) if (worldDone[ii] == world) {newWorld = false; break;}
|
||||
if (newWorld)
|
||||
|
||||
Reference in New Issue
Block a user