18#include "BDSImportanceVolumeStore.hh"
21#include "G4VPhysicalVolume.hh"
28BDSImportanceVolumeStore::BDSImportanceVolumeStore(){;}
30BDSImportanceVolumeStore::~BDSImportanceVolumeStore(){;}
37 G4cout <<
"BDSImportanceVolumeStore::AddPVolume: cell already stored" << G4endl;
46 const G4GeometryCell& cell = *std::next(
geometryCells.begin(), index);
47 const G4VPhysicalVolume* pvol = &cell.GetPhysicalVolume();
49 {G4cout <<
"BDSImportanceVolumeStore::GetPVolume: no physical volume for cell: " << index <<
", found" << G4endl;}
55 auto flagsCache(out.flags());
56 out <<
"BDSImportanceVolumeStore: " << &ivs << G4endl;
57 out <<
"PV pointer / name / replica #" << G4endl;
58 for (
const auto& cell : ivs)
60 const G4VPhysicalVolume* pv = &cell.GetPhysicalVolume();
61 auto rn = cell.GetReplicaNumber();
63 << std::left << std::setw(20) << pv->GetName() <<
" "
64 << rn <<
" " << G4endl;
66 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.