19#include "BDSImportanceVolumeStore.hh"
22#include "G4VPhysicalVolume.hh"
29BDSImportanceVolumeStore::BDSImportanceVolumeStore(){;}
31BDSImportanceVolumeStore::~BDSImportanceVolumeStore(){;}
38 G4cout <<
"BDSImportanceVolumeStore::AddPVolume: cell already stored" << G4endl;
47 const G4GeometryCell& cell = *std::next(
geometryCells.begin(), index);
48 const G4VPhysicalVolume* pvol = &cell.GetPhysicalVolume();
50 {G4cout <<
"BDSImportanceVolumeStore::GetPVolume: no physical volume for cell: " << index <<
", found" << G4endl;}
56 auto flagsCache(out.flags());
57 out <<
"BDSImportanceVolumeStore: " << &ivs << G4endl;
58 out <<
"PV pointer / name / replica #" << G4endl;
59 for (
const auto& cell : ivs)
61 const G4VPhysicalVolume* pv = &cell.GetPhysicalVolume();
62 auto rn = cell.GetReplicaNumber();
64 << std::left << std::setw(20) << pv->GetName() <<
" "
65 << rn <<
" " << G4endl;
67 out.flags(flagsCache);
Registry of importance values.
const G4VPhysicalVolume * GetPVolume(G4int index) const
Get stores physical volume from index.
void AddPVolume(const G4GeometryCell &cell)
Add geometry cell to the store.
BDSSetGeometryCell geometryCells
std::set<G4GeometryCell, G4GeometryCellComp> from typedef above.