73 if(!fGlobalFastSimulationManager)
76 return fGlobalFastSimulationManager;
88 G4GlobalFastSimulationManager::G4GlobalFastSimulationManager()
98 delete fTheFastSimulationMessenger;
99 fTheFastSimulationMessenger = 0;
108 ManagedManagers.push_back(fsmanager);
114 ManagedManagers.
remove(fsmanager);
119 fFSMPVector.push_back(fp);
130 for (
size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
131 result = result || ManagedManagers[ifsm]->
134 G4cout <<
"Model " << aName <<
" activated.";
136 G4cout <<
"Model " << aName <<
" not found.";
143 for (
size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
144 result = result || ManagedManagers[ifsm]->
146 if (result)
G4cout <<
"Model " << aName <<
" inactivated.";
147 else G4cout <<
"Model " << aName <<
" not found.";
157 std::vector<G4VPhysicalVolume*> worldDone;
164 for (
size_t i=0; i<regions->size(); i++)
166 world = (*regions)[i]->GetWorldPhysical();
168 for (
size_t ii=0; ii<worldDone.size(); ii++)
if (worldDone[ii] == world) {newWorld =
false;
break;}
171 worldDone.push_back(world);
175 G4cout <<
"\n * Mass Geometry with ";
177 G4cout <<
"\n * Parallel Geometry with ";
182 std::vector<G4ParticleDefinition*> particlesKnown;
183 for (
size_t ip=0; ip<fFSMPVector.size(); ip++)
184 if (fFSMPVector[ip]->GetWorldVolume() == world)
186 G4cout <<
" o G4FastSimulationProcess: '" << fFSMPVector[ip]->GetProcessName() <<
"'" <<
G4endl;
187 G4cout <<
" Attached to:";
189 for (
G4int iParticle=0; iParticle<particles->
entries(); iParticle++)
193 if (processes->
contains(fFSMPVector[ip])) {
G4cout <<
" " << particle->
GetParticleName(); findG4FSMP =
true; particlesKnown.push_back(particle);}
197 if (!findG4FSMP)
G4cout <<
" o G4FastSimulationProcess: (none)" <<
G4endl;
200 DisplayRegion(worldRegion, 1, particlesKnown);
206 void G4GlobalFastSimulationManager::DisplayRegion(
G4Region* region,
G4int depth, std::vector<G4ParticleDefinition*>& particlesKnown)
const
209 for (
G4int I=0; I<depth; I++) indent +=
" ";
220 G4cout <<
" ; applicable to:";
222 for (
G4int iParticle=0; iParticle<particles->
entries(); iParticle++)
228 for (
size_t l=0; l<particlesKnown.size();l++)
if(particlesKnown[l] == particles->
GetParticle(iParticle)) {known =
true;
break;}
229 if (!known)
G4cout <<
"[!!]";
238 for (
size_t ip=0; ip<physVolStore->size(); ip++)
245 if (thisVolMotherRegion == region)
261 for (
size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++) ManagedManagers[ifsm]->ListModels(aName);
268 for (
size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
273 G4cout <<
"Current Envelopes for Fast Simulation:\n";
275 ManagedManagers[ifsm]->ListTitle();
278 else ManagedManagers[ifsm]->ListModels();
283 for (
size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
284 if(aName == ManagedManagers[ifsm]-> GetEnvelope()->GetName())
286 ManagedManagers[ifsm]->ListModels();
294 for (
size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
295 ManagedManagers[ifsm]->ListModels(aPD);
304 bool foundPrevious(
false);
305 for (
size_t ifsm=0; ifsm<ManagedManagers.size(); ifsm++)
307 model = ManagedManagers[ifsm]->
G4double G4ParticleHPJENDLHEData::G4double result
void RemoveFSMP(G4FastSimulationManagerProcess *)
const G4String & GetName() const
void InActivateFastSimulationModel(const G4String &)
G4VFastSimulationModel * GetFastSimulationModel(const G4String &modelName, const G4VFastSimulationModel *previousFound=0) const
void ListEnvelopes(const G4String &aName="all", listType aListType=NAMES_ONLY)
static G4GlobalFastSimulationManager * GetGlobalFastSimulationManager()
void RemoveFastSimulationManager(G4FastSimulationManager *)
G4Region * GetRegion() const
~G4GlobalFastSimulationManager()
const G4String & GetParticleName() const
static G4PhysicalVolumeStore * GetInstance()
static G4RegionStore * GetInstance()
G4ParticleDefinition * GetParticle(G4int index) const
void ActivateFastSimulationModel(const G4String &)
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
G4bool IsRootRegion() const
static G4GlobalFastSimulationManager * GetInstance()
G4LogicalVolume * GetMotherLogical() const
static G4TransportationManager * GetTransportationManager()
G4bool contains(G4VProcess *aProcess) const
G4LogicalVolume * GetLogicalVolume() const
static G4ParticleTable * GetParticleTable()
G4ProcessManager * GetProcessManager() const
const std::vector< G4VFastSimulationModel * > & GetFastSimulationModelList() const
const XML_Char XML_Content * model
void AddFastSimulationManager(G4FastSimulationManager *)
G4FastSimulationManager * GetFastSimulationManager() const
G4ProcessVector * GetProcessList() const
void AddFSMP(G4FastSimulationManagerProcess *)