34 #include "G4Material.hh" 36 #include "G4LogicalVolume.hh" 37 #include "G4PVPlacement.hh" 38 #include "G4VisAttributes.hh" 39 #include "G4SystemOfUnits.hh" 71 G4Box* areaSolid=
new G4Box(
"area", 25.*cm, 25.*cm, 1.1*m);
72 G4Material* vacuum= G4Material::GetMaterial(
"Vacuum");
73 G4LogicalVolume* areaLV=
new G4LogicalVolume(areaSolid, vacuum,
"area");
74 G4PVPlacement* area=
new G4PVPlacement(0, G4ThreeVector(),
"area",
77 va=
new G4VisAttributes(G4Color(1.,1.,1.));
78 va-> SetVisibility(
false);
79 areaLV-> SetVisAttributes(va);
85 const double dxyphantom= 40.*cm;
86 const double dzphantom= 50.*cm;
88 G4Box* sphantom=
new G4Box(
"phantom",
89 dxyphantom/2., dxyphantom/2., dzphantom/2.);
90 G4Material* water= G4Material::GetMaterial(
"Water");
91 G4LogicalVolume* lphantom=
new G4LogicalVolume(sphantom,
93 G4PVPlacement* phantom=
new G4PVPlacement(0,
94 G4ThreeVector(0.,0., dzphantom/2.),
98 va=
new G4VisAttributes(G4Color(0.,0.1,0.8));
99 lphantom-> SetVisAttributes(va);
102 const G4double dvoxel= 2.*mm;
103 const G4double dvoxel_y= 20.*mm;
105 G4Box* svoxel=
new G4Box(
"voxel", dvoxel/2., dvoxel_y/2., dvoxel/2.);
106 scoreVoxel=
new G4LogicalVolume(svoxel, water,
"voxel");
107 va=
new G4VisAttributes(G4Color(0.,0.8,0.8));
108 va-> SetVisibility(
false);
113 for (iz=0; iz<200; iz++) {
114 for (ix=-40; ix<=40; ix++) {
115 G4double x0= ix*dvoxel;
116 G4double z0= -dzphantom/2.+(iz+0.5)*dvoxel;
117 G4PVPlacement* pvoxel=
new 118 G4PVPlacement(0, G4ThreeVector(x0, 0., z0),
void SetSDtoScoreVoxel(G4VSensitiveDetector *asd)
~MyDetectorConstruction()
G4LogicalVolume * scoreVoxel
virtual G4VPhysicalVolume * Construct()