3 #include <phparameter/PHParameters.h>
7 #include <Geant4/G4Box.hh>
8 #include <Geant4/G4Color.hh>
9 #include <Geant4/G4LogicalVolume.hh>
10 #include <Geant4/G4Material.hh>
11 #include <Geant4/G4PVPlacement.hh>
12 #include <Geant4/G4SubtractionSolid.hh>
13 #include <Geant4/G4SystemOfUnits.hh>
14 #include <Geant4/G4Tubs.hh>
15 #include <Geant4/G4VisAttributes.hh>
28 const std::string &dnam)
30 , m_Params(parameters)
52 G4VSolid *solidbox =
new G4Box(
"Example02BoxSolid", xdim / 2., ydim / 2., zdim / 2.);
53 G4VSolid *cylcut =
new G4Tubs(
"CylinderCutSolid", 0., xdim / 4., zdim, 0.,
M_PI *
rad);
54 G4VSolid *subtract =
new G4SubtractionSolid(
"HoleInBox", solidbox, cylcut);
55 G4LogicalVolume *logical =
new G4LogicalVolume(subtract, G4Material::GetMaterial(
"G4_Al"),
"BoxWithHoleLogical");
57 G4VisAttributes *vis =
new G4VisAttributes(G4Color(G4Colour::Grey()));
58 vis->SetForceSolid(
true);
59 logical->SetVisAttributes(vis);
60 G4RotationMatrix *rotm =
new G4RotationMatrix();
65 G4VPhysicalVolume *phy =
new G4PVPlacement(
70 logical,
"BoxWithHole", logicWorld, 0,
false,
OverlapCheck());
79 cout <<
"Example02 Detector:" << endl;
80 if (what ==
"ALL" || what ==
"VOLUME")
82 cout <<
"Version 0.1" << endl;
83 cout <<
"Parameters:" << endl;