I have developed a neutron collimator, and now I aim to shield it using lead material, similar to the illustration I’ve provided. I attempted to implement this by adopting code snippets from various forum threads, but encountered errors, and the resulting geometry doesn’t resemble my desired configuration. Could someone assist me in rectifying these issues? Below is the code I utilized.
"LeadSize = 23cm;
Lead_Box2 = new G4Box(“Lead2”, //its name
30cm/2,LeadSize/2,3*cm/2); //its dimensions
Lead_LV2 = new G4LogicalVolume(Lead_Box2)
//its shape
leadMaterial, //its material
“Lead_2”); //its name
G4RotationMatrix* rot180 = new G4RotationMatrix(G4ThreeVector(1,0,0), 180deg);
Lead_PV2 = new G4PVPlacement(0, // no rotation around x-axis
G4ThreeVector(0cm,26.5cm,5cm), // at (0,26.5,5)
Lead_LV2, // its logical volume
“Lead1”, // its name
fLBox, // its mother volume
false, // no boolean operation
0, // copy number
true); // check for overlaps
G4VisAttributes* yellow= new G4VisAttributes(G4Colour::Yellow());
yellow->SetVisibility(true);
yellow->SetForceAuxEdgeVisible(true);
Lead_LV2->SetVisAttributes(yellow);
"
Geant4 Version: geant4-v11.1.3
_Operating System: Ubuntu 20.04.6 LTS
_Compiler/Version: c++
_CMake Version: VERSION 2.6 FATAL_ERROR