53 ->GetNavigatorForTracking()->GetWorldVolume())
57G4IStore::G4IStore(
const G4String& ParallelWorldName)
59 ->GetParallelWorld(ParallelWorldName))
62 G4cout <<
" G4IStore:: ParallelWorldName = "
63 << ParallelWorldName <<
G4endl;
64 G4cout <<
" G4IStore:: fParallelWorldVolume = "
65 << fWorldVolume->GetName() <<
G4endl;
71 fGeometryCelli.clear();
79 G4cout <<
" World volume is: " << fWorldVolume->GetName() <<
G4endl;
85 G4cout <<
" G4IStore:: SetParallelWorldVolume " <<
G4endl;
88 G4cout <<
" ParallelWorld volume is: " << fWorldVolume->GetName() <<
G4endl;
102void G4IStore::SetInternalIterator(
const G4GeometryCell& gCell)
const
104 fCurrentIterator = fGeometryCelli.find(gCell);
112 Error(
"AddImportanceGeometryCell() - Invalid importance value given.");
116 Error(
"AddImportanceGeometryCell() - Physical volume not found!");
118 SetInternalIterator(gCell);
119 if (fCurrentIterator != fGeometryCelli.cend())
121 Error(
"AddImportanceGeometryCell() - Region already existing!");
123 fGeometryCelli[gCell] = importance;
138 Error(
"ChangeImportance() - Invalid importance value given.");
142 Error(
"ChangeImportance() - Physical volume not found!");
144 SetInternalIterator(gCell);
145 if (fCurrentIterator == fGeometryCelli.cend())
147 Error(
"ChangeImportance() - Region does not exist!");
149 fGeometryCelli[gCell] = importance;
165 auto gCellIterator = fCurrentIterator;
166 if (gCellIterator == fGeometryCelli.cend())
168 Error(
"GetImportance() - Region does not exist!");
171 G4double importance_value = (*fCurrentIterator).second;
174 return importance_value;
180 SetInternalIterator(gCell);
181 auto gCellIterator = fCurrentIterator;
182 if (gCellIterator == fGeometryCelli.cend())
184 std::ostringstream err_mess;
185 err_mess <<
"GetImportance() - Region does not exist!" <<
G4endl
186 <<
"Geometry cell, " << gCell
187 <<
", not found in: " << fGeometryCelli <<
".";
188 Error(err_mess.str());
191 G4double importance_value = (*fCurrentIterator).second;
194 return importance_value;
204 SetInternalIterator(gCell);
205 inWorldKnown = (fCurrentIterator != fGeometryCelli.cend());
215 if (!(aVolume == *fWorldVolume))
222void G4IStore::Error(
const G4String& msg)
const
234 if (fInstance ==
nullptr)
237 G4cout <<
"G4IStore:: Creating new MASS IStore " <<
G4endl;
239 fInstance =
new G4IStore();
251 if (fInstance ==
nullptr)
254 G4cout <<
"G4IStore:: Creating new Parallel IStore "
255 << ParallelWorldName <<
G4endl;
257 fInstance =
new G4IStore(ParallelWorldName);
G4TemplateAutoLock< G4Mutex > G4AutoLock
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define G4MUTEX_INITIALIZER
G4GLOB_DLL std::ostream G4cout
G4GeometryCell is used for scoring and importance sampling. It defines a "cell", which,...
const G4VPhysicalVolume & GetPhysicalVolume() const
G4IStore is a concrete implementation of an "importance store", as derived from G4VIStore....
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)
const G4VPhysicalVolume * GetParallelWorldVolumePointer() const
G4bool IsAncestor(const G4VPhysicalVolume *p) const
G4VPhysicalVolume * GetWorldVolume() const
G4TransportationManager is a singleton class which stores the navigator used by the transportation pr...
G4VPhysicalVolume * GetParallelWorld(const G4String &worldName)
static G4TransportationManager * GetTransportationManager()
G4Navigator * GetNavigatorForTracking() const
G4VPhysicalVolume is an abstract base class for the representation of a positioned volume....
G4LogicalVolume * GetLogicalVolume() const