Loading src/modules/GeometryBuilderGeant4/passive_models/GDMLModel.hpp +4 −3 Original line number Diff line number Diff line Loading @@ -99,7 +99,8 @@ namespace allpix { G4ThreeVector position_vector = toG4Vector(position_); auto* daughter_rotation = gdml_daughter->GetRotation(); // It seems that in the case of a trivial rotation the daughter_rotation can be a nullptr auto* rotation_matrix = (daughter_rotation ? new G4RotationMatrix(*daughter_rotation * *rotation_) auto* rotation_matrix = ((daughter_rotation != nullptr) ? new G4RotationMatrix(*daughter_rotation * *rotation_) : new G4RotationMatrix(*rotation_)); LOG(TRACE) << "Rotation matrix: " << *rotation_matrix; gdml_daughter->SetTranslation(gdml_daughter->GetTranslation() + position_vector); Loading Loading
src/modules/GeometryBuilderGeant4/passive_models/GDMLModel.hpp +4 −3 Original line number Diff line number Diff line Loading @@ -99,7 +99,8 @@ namespace allpix { G4ThreeVector position_vector = toG4Vector(position_); auto* daughter_rotation = gdml_daughter->GetRotation(); // It seems that in the case of a trivial rotation the daughter_rotation can be a nullptr auto* rotation_matrix = (daughter_rotation ? new G4RotationMatrix(*daughter_rotation * *rotation_) auto* rotation_matrix = ((daughter_rotation != nullptr) ? new G4RotationMatrix(*daughter_rotation * *rotation_) : new G4RotationMatrix(*rotation_)); LOG(TRACE) << "Rotation matrix: " << *rotation_matrix; gdml_daughter->SetTranslation(gdml_daughter->GetTranslation() + position_vector); Loading