changed to be serialisable for multiprocessing

This commit is contained in:
Jan Kieseler
2024-07-23 14:01:20 +02:00
parent da97ad4613
commit e849d0bac5
6 changed files with 257 additions and 167 deletions
-24
View File
@@ -4,14 +4,6 @@
#include "G4VPhysicalVolume.hh"
#include "G4System.hh"
Layer::Layer(){
thickness = 0;
material = "";
nx = 1;
ny = 1;
isActive = false;
physicalVolume = nullptr;
}
void Layer::setThickness(double thickness){
this->thickness = thickness;
@@ -37,10 +29,6 @@ void Layer::assignPhysicalVolume(G4VPhysicalVolume* physicalVolume){
this->physicalVolume = physicalVolume;
}
GeometryDescriptor::GeometryDescriptor(double xy_width){
xywidth = xy_width;
}
GeometryDescriptor::~GeometryDescriptor() {
if(g4system != nullptr){
if(this == g4system->assigned_cw){ //unassign
@@ -68,18 +56,6 @@ void GeometryDescriptor::addLayer(double thickness, std::string material, bool i
layers.push_back(layer);
}
const std::vector<Layer> & GeometryDescriptor::getLayers() const{
return layers;
}
std::vector<Layer> & GeometryDescriptor::getLayers(){
return layers;
}
double GeometryDescriptor::getXYWidth() const{
return xywidth;
}
void GeometryDescriptor::resetSensorEnergies()const {
for(const auto & layer : layers){