refactor: introduce PhysicalVolume class and update Geant scene hierarchy to use logical and physical volumes

This commit is contained in:
AndreaRigoni
2026-04-16 14:16:09 +00:00
parent 987d783fdb
commit 0b553c0db7
14 changed files with 432 additions and 275 deletions

View File

@@ -76,10 +76,10 @@ public:
void SetFromNist(const char *name);
template <typename Ar>
void serialize(Ar &ar) {
ar & HRP("name", m_G4Data->GetName());
ar & HRP("density", m_G4Data->GetDensity());
ar & serialization::make_hrp_enum("state", m_G4Data->GetState(), {"Undefined", "Solid", "Liquid", "Gas"});
void serialize(Ar &ar, const unsigned int /*version*/) {
ar & HRP("name", std::string(m_G4Data->GetName()));
ar & HRP("density", (double)m_G4Data->GetDensity());
ar & serialization::make_hrp_enum("state", (int)m_G4Data->GetState(), {"Undefined", "Solid", "Liquid", "Gas"});
}
G4Material *GetG4Material() { return m_G4Data; }