53 ->GetNavigatorForTracking()->GetWorldVolume())
59 ->GetParallelWorld(ParallelWorldName))
62 G4cout <<
" G4IStore:: ParallelWorldName = "
63 << ParallelWorldName <<
G4endl;
64 G4cout <<
" G4IStore:: fParallelWorldVolume = "
73 fGeometryCelli.clear();
87 G4cout <<
" G4IStore:: SetParallelWorldVolume " <<
G4endl;
104void G4IStore::SetInternalIterator(
const G4GeometryCell& gCell)
const
106 fCurrentIterator = fGeometryCelli.find(gCell);
114 Error(
"AddImportanceGeometryCell() - Invalid importance value given.");
118 Error(
"AddImportanceGeometryCell() - Physical volume not found!");
120 SetInternalIterator(gCell);
121 if (fCurrentIterator != fGeometryCelli.cend())
123 Error(
"AddImportanceGeometryCell() - Region already existing!");
125 fGeometryCelli[gCell] = importance;
140 Error(
"ChangeImportance() - Invalid importance value given.");
144 Error(
"ChangeImportance() - Physical volume not found!");
146 SetInternalIterator(gCell);
147 if (fCurrentIterator == fGeometryCelli.cend())
149 Error(
"ChangeImportance() - Region does not exist!");
151 fGeometryCelli[gCell] = importance;
167 auto gCellIterator = fCurrentIterator;
168 if (gCellIterator == fGeometryCelli.cend())
170 Error(
"GetImportance() - Region does not exist!");
173 G4double importance_value = (*fCurrentIterator).second;
176 return importance_value;
182 SetInternalIterator(gCell);
183 auto gCellIterator = fCurrentIterator;
184 if (gCellIterator == fGeometryCelli.cend())
186 std::ostringstream err_mess;
187 err_mess <<
"GetImportance() - Region does not exist!" <<
G4endl
188 <<
"Geometry cell, " << gCell
189 <<
", not found in: " << fGeometryCelli <<
".";
190 Error(err_mess.str());
193 G4double importance_value = (*fCurrentIterator).second;
196 return importance_value;
206 SetInternalIterator(gCell);
207 inWorldKnown = (fCurrentIterator != fGeometryCelli.cend());
217 if (!(aVolume == *fWorldVolume))
224void G4IStore::Error(
const G4String& msg)
const
236 if (fInstance ==
nullptr)
239 G4cout <<
"G4IStore:: Creating new MASS IStore " <<
G4endl;
253 if (fInstance ==
nullptr)
256 G4cout <<
"G4IStore:: Creating new Parallel IStore "
257 << ParallelWorldName <<
G4endl;
259 fInstance =
new G4IStore(ParallelWorldName);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define G4MUTEX_INITIALIZER
G4GLOB_DLL std::ostream G4cout
const G4VPhysicalVolume & GetPhysicalVolume() const
G4double GetImportance(const G4GeometryCell &gCell) const override
void AddImportanceGeometryCell(G4double importance, const G4GeometryCell &gCell)
const G4VPhysicalVolume & GetWorldVolume() const override
G4bool IsKnown(const G4GeometryCell &gCell) const override
static G4IStore * GetInstance()
void ChangeImportance(G4double importance, const G4GeometryCell &gCell)
void SetParallelWorldVolume(const G4String ¶Name)
virtual const G4VPhysicalVolume * GetParallelWorldVolumePointer() const
G4bool IsAncestor(const G4VPhysicalVolume *p) const
G4VPhysicalVolume * GetWorldVolume() const
G4VPhysicalVolume * GetParallelWorld(const G4String &worldName)
static G4TransportationManager * GetTransportationManager()
G4Navigator * GetNavigatorForTracking() const
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const