diff --git a/u4/U4SolidMaker.cc b/u4/U4SolidMaker.cc index cf7393570..2d7a9b4f5 100644 --- a/u4/U4SolidMaker.cc +++ b/u4/U4SolidMaker.cc @@ -2143,7 +2143,7 @@ const G4VSolid* U4SolidMaker::BltLocalFastenerAcrylicConstruction(const char* na { [[maybe_unused]] const char* PREFIX = "BltLocalFastenerAcrylicConstruction" ; assert( sstr::StartsWith(name,PREFIX )); - long num_column = sstr::ExtractLong(name, 1) ; + const size_t num_column = static_cast(sstr::ExtractLong(name, 1)); LOG(info) << " name " << ( name ? name : "-" ) @@ -2156,8 +2156,10 @@ const G4VSolid* U4SolidMaker::BltLocalFastenerAcrylicConstruction(const char* na G4Tubs* screw = new G4Tubs("screw",0,13*mm,50.*mm,0.0*deg,360.0*deg); - G4ThreeVector tlate[num_column] = {} ; - for(long i=0;i tlate(num_column, G4ThreeVector(0, 0, 0)); + + for (long i = 0; i < num_column; i++) + tlate[i] = G4ThreeVector(164. * cos(i * pi / 4) * mm, 164. * sin(i * pi / 4) * mm, -65.0 * mm); G4VSolid* muni = screw ; for(long i=1 ; i < num_column ; i++) muni = new G4UnionSolid( name, muni, screw, 0, tlate[i] ) ;