6 #include "G4RunManager.hh"
7 #include "G4NistManager.hh"
11 #include "G4Sphere.hh"
13 #include "G4LogicalVolume.hh"
14 #include "G4PVPlacement.hh"
15 #include "G4SystemOfUnits.hh"
20 : G4VUserDetectorConstruction(),
37 G4NistManager* nist = G4NistManager::Instance();
41 G4double env_sizeXY = 20*cm, env_sizeZ = 30*cm;
42 G4Material* env_mat = nist->FindOrBuildMaterial(
"G4_WATER");
45 G4bool checkOverlaps =
true;
54 G4double world_sizeXY = 1.2*env_sizeXY;
55 G4double world_sizeZ = 1.2*env_sizeZ;
56 G4Material* world_mat = nist->FindOrBuildMaterial(
"G4_AIR");
60 0.5*world_sizeXY, 0.5*world_sizeXY, 0.5*world_sizeZ);
62 G4LogicalVolume* logicWorld =
63 new G4LogicalVolume(solidWorld,
67 G4VPhysicalVolume* physWorld =
90 0.5*env_sizeXY, 0.5*env_sizeXY, 0.5*env_sizeZ);
92 G4LogicalVolume* logicEnv =
93 new G4LogicalVolume(solidEnv,
113 G4Material* shape1_mat = nist->FindOrBuildMaterial(
"G4_A-150_TISSUE");
114 G4ThreeVector pos1 = G4ThreeVector(0, 2*cm, -7*cm);
117 G4double shape1_rmina = 0.*cm, shape1_rmaxa = 2.*cm;
118 G4double shape1_rminb = 0.*cm, shape1_rmaxb = 4.*cm;
119 G4double shape1_hz = 3.*cm;
120 G4double shape1_phimin = 0.*deg, shape1_phimax = 360.*deg;
121 G4Cons* solidShape1 =
123 shape1_rmina, shape1_rmaxa, shape1_rminb, shape1_rmaxb, shape1_hz,
124 shape1_phimin, shape1_phimax);
126 G4LogicalVolume* logicShape1 =
127 new G4LogicalVolume(solidShape1,
146 G4Material* shape2_mat = nist->FindOrBuildMaterial(
"G4_BONE_COMPACT_ICRU");
147 G4ThreeVector pos2 = G4ThreeVector(0, -1*cm, 7*cm);
150 G4double shape2_dxa = 12*cm, shape2_dxb = 12*cm;
151 G4double shape2_dya = 10*cm, shape2_dyb = 16*cm;
152 G4double shape2_dz = 6*cm;
155 0.5*shape2_dxa, 0.5*shape2_dxb,
156 0.5*shape2_dya, 0.5*shape2_dyb, 0.5*shape2_dz);
158 G4LogicalVolume* logicShape2 =
159 new G4LogicalVolume(solidShape2,
virtual ~B1DetectorConstruction()
do nothing.
Definition of the B1DetectorConstruction class.
B1DetectorConstruction()
iniitalize fScoringVolume to 0
G4LogicalVolume * fScoringVolume
virtual G4VPhysicalVolume * Construct()
the main place for geometry setting. the scoring volume is set to shape2 (bone)