82 G4double cryst_dX = 6*cm, cryst_dY = 6*cm, cryst_dZ = 3*cm;
86 G4double dPhi = twopi/nb_cryst, half_dPhi = 0.5*dPhi;
87 G4double cosdPhi = std::cos(half_dPhi);
88 G4double tandPhi = std::tan(half_dPhi);
90 G4double ring_R1 = 0.5*cryst_dY/tandPhi;
91 G4double ring_R2 = (ring_R1+cryst_dZ)/cosdPhi;
93 G4double detector_dZ = nb_rings*cryst_dX;
96 G4Material* default_mat = nist->FindOrBuildMaterial(
"G4_AIR");
97 G4Material* cryst_mat = nist->FindOrBuildMaterial(
"Lu2SiO5");
102 G4double world_sizeXY = 2.4*ring_R2;
103 G4double world_sizeZ = 1.2*detector_dZ;
105 auto solidWorld =
new G4Box(
"World",
106 0.5 * world_sizeXY, 0.5 * world_sizeXY, 0.5 * world_sizeZ);
124 auto solidRing =
new G4Tubs(
"Ring", ring_R1, ring_R2, 0.5 * cryst_dX, 0., twopi);
133 G4double gap = 0.5*mm;
134 G4double dX = cryst_dX - gap, dY = cryst_dY - gap;
135 auto solidCryst =
new G4Box(
"crystal", dX / 2, dY / 2, cryst_dZ / 2);
143 for (G4int icrys = 0; icrys < nb_cryst ; icrys++) {
144 G4double phi = icrys*dPhi;
145 G4RotationMatrix rotm = G4RotationMatrix();
146 rotm.rotateY(90*deg);
148 G4ThreeVector uz = G4ThreeVector(std::cos(phi), std::sin(phi),0.);
149 G4ThreeVector
position = (ring_R1+0.5*cryst_dZ)*uz;
150 G4Transform3D transform = G4Transform3D(rotm,
position);
164 auto solidDetector =
new G4Tubs(
"Detector", ring_R1, ring_R2, 0.5 * detector_dZ, 0., twopi);
173 G4double OG = -0.5*(detector_dZ + cryst_dX);
174 for (G4int iring = 0; iring < nb_rings ; iring++) {
177 G4ThreeVector(0, 0, OG),
201 G4double patient_radius = 8*cm;
202 G4double patient_dZ = 10*cm;
203 G4Material* patient_mat = nist->FindOrBuildMaterial(
"G4_BRAIN_ICRP");
205 auto solidPatient =
new G4Tubs(
"Patient", 0., patient_radius, 0.5 * patient_dZ, 0., twopi);
225 logicRing->SetVisAttributes (G4VisAttributes::GetInvisible());
226 logicDetector->SetVisAttributes (G4VisAttributes::GetInvisible());
229 G4cout << *(G4Material::GetMaterialTable()) << G4endl;