Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions u4/U4SolidMaker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t>(sstr::ExtractLong(name, 1));

LOG(info)
<< " name " << ( name ? name : "-" )
Expand All @@ -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<num_column;i++) tlate[i] = G4ThreeVector(164.*cos(i*pi/4)*mm, 164.*sin(i*pi/4)*mm,-65.0*mm);
std::vector<G4ThreeVector> 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] ) ;
Expand Down