12 #include <Geant4/G4LogicalVolume.hh>
13 #include <Geant4/G4NistManager.hh>
14 #include <Geant4/G4Box.hh>
15 #include <Geant4/G4SubtractionSolid.hh>
16 #include <Geant4/G4SystemOfUnits.hh>
17 #include <Geant4/G4PVPlacement.hh>
18 #include <Geant4/G4VisAttributes.hh>
35 G4String nam =
"Collimator";
36 G4Box *outer =
new G4Box(nam, siz/2, siz/2, len/2);
37 G4Box *inner =
new G4Box(nam, dx/2, dy/2, len/2);
38 G4SubtractionSolid *shape =
new G4SubtractionSolid(nam, outer, inner);
41 G4Material *mat = G4NistManager::Instance()->FindOrBuildMaterial(
"G4_STAINLESS-STEEL");
42 G4LogicalVolume *vol =
new G4LogicalVolume(shape, mat, nam);
44 G4VisAttributes *vis =
new G4VisAttributes();
45 vis->SetColor(1, 1, 0);
47 vol->SetVisAttributes(vis);
50 new G4PVPlacement(0, G4ThreeVector(0, 0, zpos-len/2), vol, nam, top,
false, 0);