80G4GlobalFastSimulationManager::G4GlobalFastSimulationManager()
90 delete fTheFastSimulationMessenger;
98 ManagedManagers.push_back(fsmanager);
103 ManagedManagers.
remove(fsmanager);
108 fFSMPVector.push_back(fp);
119 for (
auto& ManagedManager : ManagedManagers)
120 result = result || ManagedManager->ActivateFastSimulationModel(aName);
122 G4cout <<
"Model " << aName << (result ?
" activated." :
" not found.") <<
G4endl;
128 for (
auto& ManagedManager : ManagedManagers)
129 result = result || ManagedManager->InActivateFastSimulationModel(aName);
131 G4cout <<
"Model " << aName << (result ?
" inactivated." :
" not found.") <<
G4endl;
137 for (
auto& ManagedManager : ManagedManagers)
138 ManagedManager->FlushModels();
146 std::vector<G4VPhysicalVolume*> worldDone;
153 for (
auto& region : *regions) {
154 world = region->GetWorldPhysical();
155 if (world ==
nullptr)
160 for (
auto& ii : worldDone)
166 worldDone.push_back(world);
171 ->GetNavigatorForTracking()
173 G4cout <<
"\n * Mass Geometry with ";
175 G4cout <<
"\n * Parallel Geometry with ";
181 std::vector<G4ParticleDefinition*> particlesKnown;
182 for (
auto& ip : fFSMPVector)
183 if (ip->GetWorldVolume() == world) {
184 G4cout <<
" o G4FastSimulationProcess: '" << ip->GetProcessName() <<
"'" <<
G4endl;
185 G4cout <<
" Attached to:";
187 for (
G4int iParticle = 0; iParticle < particles->
entries(); iParticle++) {
193 particlesKnown.push_back(particle);
198 if (!findG4FSMP)
G4cout <<
" o G4FastSimulationProcess: (none)" <<
G4endl;
202 DisplayRegion(worldRegion, 1, particlesKnown);
207void G4GlobalFastSimulationManager::DisplayRegion(
208 G4Region* region,
G4int depth, std::vector<G4ParticleDefinition*>& particlesKnown)
const
211 for (
G4int I = 0; I < depth; I++)
215 if (fastSimManager !=
nullptr) {
220 G4cout << indent <<
"`" << im->GetName() <<
"'";
221 G4cout <<
" ; applicable to:";
223 for (
G4int iParticle = 0; iParticle < particles->
entries(); iParticle++) {
224 if (im->IsApplicable(*(particles->
GetParticle(iParticle)))) {
227 for (
auto& l : particlesKnown)
232 if (!known)
G4cout <<
"[!!]";
241 for (
auto physVol : *physVolStore) {
242 if (physVol->GetLogicalVolume()->IsRootRegion())
243 if (physVol->GetMotherLogical() !=
nullptr) {
244 G4Region* thisVolMotherRegion = physVol->GetMotherLogical()->GetRegion();
245 if (thisVolMotherRegion == region)
246 DisplayRegion(physVol->GetLogicalVolume()->GetRegion(), depth + 1, particlesKnown);
258 for (
auto& ManagedManager : ManagedManagers)
259 ManagedManager->ListModels(aName);
263 if (aName ==
"all") {
265 for (
auto& ManagedManager : ManagedManagers) {
267 if ((titled++) == 0)
G4cout <<
"Current Envelopes for Fast Simulation:\n";
269 ManagedManager->ListTitle();
273 ManagedManager->ListModels();
277 for (
auto& ManagedManager : ManagedManagers)
278 if (aName == ManagedManager->GetEnvelope()->GetName()) {
279 ManagedManager->ListModels();
287 for (
auto& ManagedManager : ManagedManagers)
288 ManagedManager->ListModels(aPD);
296 bool foundPrevious(
false);
297 for (
auto ManagedManager : ManagedManagers) {
298 model = ManagedManager->GetFastSimulationModel(modelName, previousFound, foundPrevious);
299 if (model !=
nullptr)
break;
G4GLOB_DLL std::ostream G4cout
const std::vector< G4VFastSimulationModel * > & GetFastSimulationModelList() const
void RemoveFSMP(G4FastSimulationManagerProcess *)
void ListEnvelopes(const G4String &aName="all", listType aListType=NAMES_ONLY)
void InActivateFastSimulationModel(const G4String &)
~G4GlobalFastSimulationManager()
G4VFastSimulationModel * GetFastSimulationModel(const G4String &modelName, const G4VFastSimulationModel *previousFound=nullptr) const
void ActivateFastSimulationModel(const G4String &)
void AddFSMP(G4FastSimulationManagerProcess *)
void RemoveFastSimulationManager(G4FastSimulationManager *)
static G4GlobalFastSimulationManager * GetGlobalFastSimulationManager()
static G4GlobalFastSimulationManager * GetInstance()
void AddFastSimulationManager(G4FastSimulationManager *)
G4Region * GetRegion() const
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4ParticleDefinition * GetParticle(G4int index) const
static G4ParticleTable * GetParticleTable()
static G4PhysicalVolumeStore * GetInstance()
G4ProcessVector * GetProcessList() const
G4bool contains(G4VProcess *aProcess) const
static G4RegionStore * GetInstance()
G4FastSimulationManager * GetFastSimulationManager() const
const G4String & GetName() const
static G4TransportationManager * GetTransportationManager()
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const