Import Geant4 10.7.0.beta source tree
This commit is contained in:
@@ -16,6 +16,15 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
April 21, 2020, A. Zaborowska (param-V10-06-01)
|
||||
- Sanity check for root logical volumes for regions in G4GlobalFastSimulationManager.
|
||||
UI command /param/showSetup works also if no parallel world is present.
|
||||
|
||||
March 26, 2020, I. Semeniouk (param-V10-06-00)
|
||||
- G4FastSimulationHelper : merge ActivateFastSimulation calls for mass and parallel geometries cases
|
||||
- G4FastSimulationManager.hh, G4VFastSimulationModel.hh : remove
|
||||
redefinition of G4Envelope type
|
||||
|
||||
October 30, 2019, A. Zaborowska (param-v10-05-00)
|
||||
- Register G4FastSimulationManagerProcess with highest ordering in
|
||||
G4FastSimulationManagerHelper to ensure it is the only process
|
||||
|
||||
@@ -52,10 +52,9 @@ class G4FastSmulationManagerProcess;
|
||||
class G4FastSimulationHelper
|
||||
{
|
||||
public:
|
||||
// -- Activate fast simulation for particle with pmanager in the mass geometry:
|
||||
static void ActivateFastSimulation(G4ProcessManager* pmanager);
|
||||
// -- Activate fast simulation for particle with pmanager in the parallel geometry:
|
||||
static void ActivateFastSimulation(G4ProcessManager* pmanager, G4String parallelGeometryName );
|
||||
// Activate fast simulation for particle with pmanager in the mass geometry: (without geometry name) or
|
||||
// activate fast simulation for particle with pmanager in the parallel geometry:
|
||||
static void ActivateFastSimulation(G4ProcessManager* pmanager, G4String parallelGeometryName = "");
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -60,11 +60,6 @@
|
||||
|
||||
#include "G4ios.hh"
|
||||
|
||||
//---------------------------
|
||||
// For possible future needs:
|
||||
//---------------------------
|
||||
typedef G4Region G4Envelope;
|
||||
|
||||
//-------------------------------------------
|
||||
//
|
||||
// G4FastSimulationManager class
|
||||
|
||||
@@ -45,11 +45,6 @@
|
||||
#include "G4FastTrack.hh"
|
||||
#include "G4FastStep.hh"
|
||||
|
||||
//---------------------------
|
||||
// For possible future needs:
|
||||
//---------------------------
|
||||
typedef G4Region G4Envelope;
|
||||
|
||||
//-------------------------------------------
|
||||
//
|
||||
// G4VFastSimulationModel class
|
||||
|
||||
@@ -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