5 #include <phparameter/PHParameters.h>
13 #include <Geant4/G4LogicalVolume.hh>
14 #include <Geant4/G4Material.hh>
15 #include <Geant4/G4NistManager.hh>
16 #include <Geant4/G4PVPlacement.hh>
17 #include <Geant4/G4Polyhedra.hh>
18 #include <Geant4/G4RotationMatrix.hh>
19 #include <Geant4/G4String.hh>
20 #include <Geant4/G4SystemOfUnits.hh>
21 #include <Geant4/G4ThreeVector.hh>
22 #include <Geant4/G4Tubs.hh>
23 #include <Geant4/G4Box.hh>
24 #include <Geant4/G4SubtractionSolid.hh>
25 #include <Geant4/G4Trap.hh>
27 #include <Geant4/G4Types.hh>
28 #include <Geant4/G4VPhysicalVolume.hh>
41 , m_ActiveFlag(m_Params->get_int_param(
"active"))
42 , m_SupportActiveFlag(m_Params->get_int_param(
"supportactive"))
51 G4LogicalVolume *mylogvol = volume->GetLogicalVolume();
82 G4double z_bbcd[] = {-6.15 *
cm, 6.15 *
cm};
83 G4double len_bbcd = z_bbcd[1] - z_bbcd[0];
84 G4double rin_bbcd[] = {0 *
cm, 0 *
cm};
85 G4double rout_bbcd[] = {1.4 *
cm, 1.4 *
cm};
86 G4Polyhedra *bbcd =
new G4Polyhedra(
"bbcd", 0., 2 * M_PI, 6, 2, z_bbcd, rin_bbcd, rout_bbcd);
87 G4LogicalVolume *bbcd_lv =
new G4LogicalVolume(bbcd, WorldMaterial, G4String(
"Bbc_tube"));
94 const G4double z_bbca[] = {-0.5 *
cm, -0.201 *
cm, -0.2 *
cm, 0.5 *
cm};
95 const G4double rInner_bbca[] = {0.2 *
cm, 0.2 *
cm, 0.2 *
cm, 0.2 *
cm};
96 const G4double rOuter_bbca[] = {1.4 *
cm, 1.4 *
cm, 1.375 *
cm, 1.375 *
cm};
97 G4Polyhedra *bbca =
new G4Polyhedra(
"bbca", 0., 2 * M_PI, 6, 4, z_bbca, rInner_bbca, rOuter_bbca);
101 G4LogicalVolume *bbca_lv =
new G4LogicalVolume(bbca, Aluminum, G4String(
"Bbc_attach_plate"));
106 G4double ypos = 0. *
cm;
107 G4double len_bbca = z_bbca[3] - z_bbca[0];
108 G4double zpos = z_bbcd[0] + len_bbca * 0.5;
110 G4VPhysicalVolume *bbca_phys =
new G4PVPlacement(
nullptr, G4ThreeVector(xpos, ypos, zpos), bbca_lv,
"BBCA", bbcd_lv,
false, 0);
113 std::cout <<
"placement of BBCA failed" << std::endl;
119 const G4double z_bbcq[] = {-1.5 *
cm, 1.5 *
cm};
120 const G4double rInner_bbcq[] = {0., 0.};
121 const G4double rOuter_bbcq[] = {1.27 *
cm, 1.27 *
cm};
122 G4Polyhedra *bbcq =
new G4Polyhedra(
"bbcq", 0., 2 * M_PI, 6, 2, z_bbcq, rInner_bbcq, rOuter_bbcq);
124 G4LogicalVolume *bbcq_lv =
new G4LogicalVolume(bbcq, Quartz, G4String(
"Bbc_quartz"));
129 G4double len_bbcq = z_bbcq[1] - z_bbcq[0];
130 zpos += len_bbca * 0.5 + len_bbcq * 0.5;
132 G4VPhysicalVolume *bbcq_phys =
new G4PVPlacement(
nullptr, G4ThreeVector(xpos, ypos, zpos), bbcq_lv,
"BBCQ", bbcd_lv,
false, 0);
135 std::cout <<
"placement of BBCQ failed" << std::endl;
139 const G4double len_bbcp = 4.4 *
cm;
140 const G4double rInner_bbcp = 1.09 *
cm;
141 const G4double rOuter_bbcp = 1.29 *
cm;
142 G4Tubs *bbcp =
new G4Tubs(
"bbcp", rInner_bbcp, rOuter_bbcp, len_bbcp * 0.5, 0 *
deg, 360 *
deg);
144 G4LogicalVolume *bbcp_lv =
new G4LogicalVolume(bbcp, Quartz, G4String(
"Bbc_PMT"));
149 zpos += len_bbcq * 0.5 + len_bbcp * 0.5;
151 G4VPhysicalVolume *bbcp_phys =
new G4PVPlacement(
nullptr, G4ThreeVector(xpos, ypos, zpos), bbcp_lv,
"BBCP", bbcd_lv,
false, 0);
154 std::cout <<
"placement of BBCP failed" << std::endl;
158 const G4double len_bbcr = 3.9 *
cm;
159 const G4double rInner_bbcr = 0.0 *
cm;
160 const G4double rOuter_bbcr = 1.2 *
cm;
161 G4Tubs *bbcr =
new G4Tubs(
"bbcr", rInner_bbcr, rOuter_bbcr, len_bbcr * 0.5, 0 *
deg, 360 *
deg);
166 G4Material *G10 =
new G4Material(
"BBC_G10", density = 1.700 *
g /
cm3, ncomponents = 4);
167 G4NistManager *manager = G4NistManager::Instance();
168 G10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), natoms = 1);
169 G10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), natoms = 2);
170 G10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), natoms = 3);
171 G10->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), natoms = 3);
173 G4LogicalVolume *bbcr_lv =
new G4LogicalVolume(bbcr, G10,
"Bbc_Breeder_Module");
178 zpos += len_bbcp * 0.5 + len_bbcr * 0.5;
180 G4PVPlacement *plcmt =
new G4PVPlacement(
nullptr, G4ThreeVector(xpos, ypos, zpos), bbcr_lv,
"BBCR", bbcd_lv,
false, 0);
183 std::cout <<
"placement of BBCR failed" << std::endl;
187 const G4double z_bbch[] = {-5.65 *
cm, 5.65 *
cm};
188 const G4double rInner_bbch[] = {1.375 *
cm, 1.375 *
cm};
189 const G4double rOuter_bbch[] = {1.4 *
cm, 1.4 *
cm};
190 G4Polyhedra *bbch =
new G4Polyhedra(
"bbch", 0., 2 * M_PI, 6, 2, z_bbch, rInner_bbch, rOuter_bbch);
192 G4Material *MuMetal = manager->FindOrBuildMaterial(
"G4_STAINLESS-STEEL");
194 G4LogicalVolume *bbch_lv =
new G4LogicalVolume(bbch, MuMetal, G4String(
"Bbc_Shield"));
198 G4double len_bbch = z_bbch[1] - z_bbch[0];
199 zpos = z_bbcd[0] + 0.3 *
cm + len_bbch * 0.5;
201 G4VPhysicalVolume *bbch_phys =
new G4PVPlacement(
nullptr, G4ThreeVector(xpos, ypos, zpos), bbch_lv,
"BBCH", bbcd_lv,
false, 0);
204 std::cout <<
"placement of BBCH failed" << std::endl;
280 const float tube_zpos =
m_bbcz + len_bbcd / 2.0 - len_bbca;
283 G4RotationMatrix *arm_rot[2];
284 for (
int iarm = 0; iarm < 2; iarm++)
286 arm_rot[iarm] =
new G4RotationMatrix;
293 arm_rot[iarm]->rotateY(180 *
deg);
302 for (
int itube = 0; itube < NPMT; itube++)
305 float tube_xpos = xside * TubeLoc[itube][0] *
cm;
306 float tube_ypos = TubeLoc[itube][1] *
cm;
307 new G4PVPlacement(arm_rot[iarm], G4ThreeVector(tube_xpos, tube_ypos, zside * tube_zpos),
308 bbcd_lv,
"BBCD", logicWorld,
false, iarm * NPMT + itube,
OverlapCheck());
315 G4Tubs *bbc_outer_shell =
new G4Tubs(
"bbc_outer_shell", 14.9 *
cm, 15 *
cm, 11.5 *
cm, 0, 2 * M_PI);
316 G4LogicalVolume *bbc_outer_shell_lv =
new G4LogicalVolume(bbc_outer_shell, Aluminum, G4String(
"Bbc_Outer_Shell"));
319 G4Tubs *bbc_inner_shell =
new G4Tubs(
"bbc_inner_shell", 5.0 *
cm, 5.5 *
cm, 11.5 *
cm, 0, 2 * M_PI);
320 G4LogicalVolume *bbc_inner_shell_lv =
new G4LogicalVolume(bbc_inner_shell, Aluminum, G4String(
"Bbc_Inner_Shell"));
327 outer_shell_vol[0] =
new G4PVPlacement(
nullptr, G4ThreeVector(0, 0, (-250 + 1.0 - 11.5) *
cm),
328 bbc_outer_shell_lv,
"BBC_OUTER_SHELL", logicWorld,
false, 0,
OverlapCheck());
329 inner_shell_vol[0] =
new G4PVPlacement(
nullptr, G4ThreeVector(0, 0, (-250 + 1.0 - 11.5) *
cm),
330 bbc_inner_shell_lv,
"BBC_INNER_SHELL", logicWorld,
false, 0,
OverlapCheck());
333 outer_shell_vol[1] =
new G4PVPlacement(
nullptr, G4ThreeVector(0, 0, (250 - 1.0 + 11.5) *
cm),
334 bbc_outer_shell_lv,
"BBC_OUTER_SHELL", logicWorld,
false, 1,
OverlapCheck());
335 inner_shell_vol[1] =
new G4PVPlacement(
nullptr, G4ThreeVector(0, 0, (250 - 1.0 + 11.5) *
cm),
336 bbc_inner_shell_lv,
"BBC_INNER_SHELL", logicWorld,
false, 0,
OverlapCheck());
338 if (!outer_shell_vol[0] || !outer_shell_vol[1] || !inner_shell_vol[0] || !inner_shell_vol[1])
340 std::cout <<
"problem placing BBC Sheels" << std::endl;
344 G4Tubs *bbc_plate =
new G4Tubs(
"bbc_fplate", 5 *
cm, 15 *
cm, 0.5 *
cm, 0, 2 * M_PI);
345 G4LogicalVolume *bbc_plate_lv =
new G4LogicalVolume(bbc_plate, Aluminum, G4String(
"Bbc_Cover_Plates"));
352 fplate_vol[0] =
new G4PVPlacement(
nullptr, G4ThreeVector(0, 0, (-250 + 1.0 + 0.5) *
cm),
353 bbc_plate_lv,
"BBC_FPLATE", logicWorld,
false, 0,
OverlapCheck());
354 bplate_vol[0] =
new G4PVPlacement(
nullptr, G4ThreeVector(0, 0, (-250 + 1.0 + 0.5 - 24.0) *
cm),
355 bbc_plate_lv,
"BBC_BPLATE", logicWorld,
false, 0,
OverlapCheck());
358 fplate_vol[1] =
new G4PVPlacement(
nullptr, G4ThreeVector(0, 0, (250 - 1.0 - 0.5) *
cm),
359 bbc_plate_lv,
"BBC_FPLATE", logicWorld,
false, 1,
OverlapCheck());
360 bplate_vol[1] =
new G4PVPlacement(
nullptr, G4ThreeVector(0, 0, (250 - 1.0 - 0.5 + 24.0) *
cm),
361 bbc_plate_lv,
"BBC_BPLATE", logicWorld,
false, 0,
OverlapCheck());
364 G4Material *Cu = manager->FindOrBuildMaterial(
"G4_Cu");
365 const G4double len_cable = 120 *
cm;
366 const G4double r_CableConductor = 0.09525 *
cm;
367 G4Tubs *bbc_cablecond =
new G4Tubs(
"bbc_cablecond", 0., r_CableConductor, len_cable * 0.5, 0 *
deg, 360 *
deg);
369 G4LogicalVolume *bbc_cablecond_lv =
new G4LogicalVolume(bbc_cablecond, Cu, G4String(
"Bbc_CableCond"));
372 const G4double rIn_CableShield = 0.302876 *
cm;
373 const G4double rOut_CableShield = 0.3175 *
cm;
374 G4Tubs *bbc_cableshield =
new G4Tubs(
"bbc_cableshield", rIn_CableShield, rOut_CableShield, len_cable * 0.5, 0 *
deg, 360 *
deg);
376 G4LogicalVolume *bbc_cableshield_lv =
new G4LogicalVolume(bbc_cableshield, Cu, G4String(
"Bbc_CableShield"));
379 ypos = len_cable / 2 + 5 *
cm;
382 G4RotationMatrix *rot_cable =
new G4RotationMatrix();
383 rot_cable->rotateX(90 *
deg);
387 for (
int iarm = 0; iarm < 2; iarm++)
395 for (
int iring = 1; iring < 5; iring++)
397 float ring_radius = iring * 0.67 *
cm;
398 int ncables = 2 * M_PI * ring_radius / (0.635 *
cm);
399 double dphi = 2 * M_PI / ncables;
404 for (
int ic = 0; ic < ncables; ic++)
406 xpos = cos(dphi * ic) * ring_radius;
407 zpos = sin(dphi * ic) * ring_radius + zsign * (
m_bbcz + 30 *
cm);
409 new G4PVPlacement(rot_cable, G4ThreeVector(xpos, ypos, zpos), bbc_cablecond_lv,
"BBC_Cable_Cond", logicWorld,
false, icable,
OverlapCheck());
411 new G4PVPlacement(rot_cable, G4ThreeVector(xpos, ypos, zpos), bbc_cableshield_lv,
"BBC_Cable_Shield", logicWorld,
false, icable++,
OverlapCheck());
420 if (!fplate_vol[0] || !fplate_vol[1] || !bplate_vol[0] || !bplate_vol[1])
422 std::cout <<
"problem placing BBC Sheets" << std::endl;
432 std::cout <<
"INSIDE BBC" << std::endl;
441 G4double fractionmass;
451 G4Material *Fiberglass =
new G4Material(
"BBC_Fiberglass", density = 1.800 *
g /
cm3, ncomponents = 9);
452 Fiberglass->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"B"), fractionmass = 0.018640);
453 Fiberglass->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Mg"), fractionmass = 0.010842);
454 Fiberglass->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"O"), fractionmass = 0.044453);
455 Fiberglass->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Al"), fractionmass = 0.151423);
456 Fiberglass->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"H"), fractionmass = 0.081496);
457 Fiberglass->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Ca"), fractionmass = 0.385764);
458 Fiberglass->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"C"), fractionmass = 0.275853);
459 Fiberglass->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"N"), fractionmass = 0.003583);
460 Fiberglass->AddElement(G4NistManager::Instance()->FindOrBuildElement(
"Si"), fractionmass = 0.027945);
463 G4double basep_width = 35.56 *
cm;
464 G4double basep_height = 1.91 *
cm;
465 G4double basep_len = 46.99 *
cm;
466 G4double basep_zpos = 228.6 *
cm;
467 G4Box *bbc_base_plate =
new G4Box(
"bbc_base_plate", basep_width/2, basep_height/2, basep_len/2);
468 G4LogicalVolume *bbc_base_plate_lv =
new G4LogicalVolume(bbc_base_plate, Delrin, G4String(
"Bbc_Base_Plates"));
472 new G4PVPlacement(
nullptr, G4ThreeVector( 0 *
cm, -15.*
cm - basep_height/2, (-basep_zpos - basep_len/2 ) ),
473 bbc_base_plate_lv,
"BBC_BASE_PLATE", logicWorld,
false, 0,
OverlapCheck());
476 new G4PVPlacement(
nullptr, G4ThreeVector( 0 *
cm, -15.*
cm - basep_height/2, (basep_zpos + basep_len/2 ) ),
477 bbc_base_plate_lv,
"BBC_BASE_PLATE", logicWorld,
false, 1,
OverlapCheck());
481 G4double sidesupportp_width = 1.27 *
cm;
482 G4double sidesupportp_height = 14.57 *
cm;
483 G4double sidesupportp_len = 25.00 *
cm;
485 G4Box *bbc_sidesupport_plate =
new G4Box(
"bbc_sidesupport_plate", sidesupportp_width/2, sidesupportp_height/2, sidesupportp_len/2);
486 G4LogicalVolume *bbc_sidesupport_plate_lv =
new G4LogicalVolume(bbc_sidesupport_plate, Delrin, G4String(
"Bbc_Sidesupport_Plates"));
490 G4Tubs *bbc_sidesupport_hole =
new G4Tubs(
"bbc_sidesupport_hole", 0., (7.62/2)*
cm, sidesupportp_width/2, 0, 2.0*M_PI);
491 G4LogicalVolume *bbc_sidesupport_hole_lv =
new G4LogicalVolume(bbc_sidesupport_hole, WorldMaterial, G4String(
"Bbc_Sidesupport_Holes"));
493 G4RotationMatrix *rot_sideholes =
new G4RotationMatrix;
494 rot_sideholes->rotateY(90.*
deg);
495 new G4PVPlacement(rot_sideholes, G4ThreeVector(0,-0.935*
cm,11.43*
cm/2), bbc_sidesupport_hole_lv,
"BBC_SIDESUPPORT_HOLE", bbc_sidesupport_plate_lv,
false, 0,
OverlapCheck());
496 new G4PVPlacement(rot_sideholes, G4ThreeVector(0,-0.935*
cm,-11.43*
cm/2), bbc_sidesupport_hole_lv,
"BBC_SIDESUPPORT_HOLE", bbc_sidesupport_plate_lv,
false, 1,
OverlapCheck());
499 new G4PVPlacement(
nullptr, G4ThreeVector(-15*
cm-sidesupportp_width/2, -15*
cm+sidesupportp_height/2, -
front_bbcz-sidesupportp_len/2),
500 bbc_sidesupport_plate_lv,
"BBC_SIDESUPPORT_PLATE", logicWorld,
false, 0,
OverlapCheck());
501 new G4PVPlacement(
nullptr, G4ThreeVector(15*
cm+sidesupportp_width/2, -15*
cm+sidesupportp_height/2, -
front_bbcz-sidesupportp_len/2),
502 bbc_sidesupport_plate_lv,
"BBC_SIDESUPPORT_PLATE", logicWorld,
false, 1,
OverlapCheck());
505 new G4PVPlacement(
nullptr, G4ThreeVector(-15*
cm-sidesupportp_width/2, -15*
cm+sidesupportp_height/2,
front_bbcz+sidesupportp_len/2),
506 bbc_sidesupport_plate_lv,
"BBC_SIDESUPPORT_PLATE", logicWorld,
false, 2,
OverlapCheck());
507 new G4PVPlacement(
nullptr, G4ThreeVector(15*
cm+sidesupportp_width/2, -15*
cm+sidesupportp_height/2,
front_bbcz+sidesupportp_len/2),
508 bbc_sidesupport_plate_lv,
"BBC_SIDESUPPORT_PLATE", logicWorld,
false, 3,
OverlapCheck());
511 G4double supportp_width = 10.16 *
cm;
512 G4double supportp_height = 97.16 *
cm;
513 G4double supportp_len = 10.16 *
cm;
514 G4double supportp_thick = 0.64 *
cm;
516 G4Box *bbc_support_post_outside =
new G4Box(
"bbc_support_post_outside", supportp_width/2, supportp_height/2, supportp_len/2);
517 G4Box *bbc_support_post_inside =
new G4Box(
"bbc_support_post_inside", supportp_width/2-supportp_thick, supportp_height/2-supportp_thick, supportp_len/2-supportp_thick);
518 G4SubtractionSolid* bbc_support_post =
new G4SubtractionSolid(
"support_post", bbc_support_post_outside, bbc_support_post_inside);
520 G4LogicalVolume *bbc_support_post_lv =
new G4LogicalVolume(bbc_support_post, Fiberglass, G4String(
"Bbc_Support_Post"));
525 new G4PVPlacement(
nullptr, G4ThreeVector(0, -15.*
cm-basep_height-supportp_height/2, -228.*
cm - supportp_len/2),
526 bbc_support_post_lv,
"BBC_SUPPORT_POST", logicWorld,
false, 0,
OverlapCheck());
529 new G4PVPlacement(
nullptr, G4ThreeVector(0, -15.*
cm-basep_height-supportp_height/2, 228.*
cm + supportp_len/2),
530 bbc_support_post_lv,
"BBC_SUPPORT_POST", logicWorld,
false, 1,
OverlapCheck());
534 G4double supporta_width = 148.59 *
cm;
535 G4double supporta_height = 10.16 *
cm;
536 G4double supporta_len = 10.16 *
cm;
537 G4double supporta_thick = 0.64 *
cm;
539 G4Box *bbc_support_arm_outside =
new G4Box(
"bbc_support_arm_outside", supporta_width/2, supporta_height/2, supporta_len/2);
540 G4Box *bbc_support_arm_inside =
new G4Box(
"bbc_support_arm_inside", supporta_width/2-supporta_thick, supporta_height/2-supporta_thick, supporta_len/2-supporta_thick);
541 G4SubtractionSolid* bbc_support_arm =
new G4SubtractionSolid(
"support_arm", bbc_support_arm_outside, bbc_support_arm_inside);
543 G4LogicalVolume *bbc_support_arm_lv =
new G4LogicalVolume(bbc_support_arm, Fiberglass, G4String(
"Bbc_Support_Arm"));
548 new G4PVPlacement(
nullptr, G4ThreeVector( -supporta_width/2 - supportp_width/2, -15.*
cm-basep_height-20.48*
cm - supporta_height/2, -228.6*
cm - supporta_len/2),
549 bbc_support_arm_lv,
"BBC_SUPPORT_ARM", logicWorld,
false, 0,
OverlapCheck());
550 new G4PVPlacement(
nullptr, G4ThreeVector( supporta_width/2 + supportp_width/2, -15.*
cm-basep_height-20.48*
cm - supporta_height/2, -228.6*
cm - supporta_len/2),
551 bbc_support_arm_lv,
"BBC_SUPPORT_ARM", logicWorld,
false, 1,
OverlapCheck());
554 new G4PVPlacement(
nullptr, G4ThreeVector( -supporta_width/2 - supportp_width/2, -15.*
cm-basep_height-20.48*
cm - supporta_height/2, 228.6*
cm + supporta_len/2),
555 bbc_support_arm_lv,
"BBC_SUPPORT_ARM", logicWorld,
false, 2,
OverlapCheck());
556 new G4PVPlacement(
nullptr, G4ThreeVector( supporta_width/2 + supportp_width/2, -15.*
cm-basep_height-20.48*
cm - supporta_height/2, 228.6*
cm + supporta_len/2),
557 bbc_support_arm_lv,
"BBC_SUPPORT_ARM", logicWorld,
false, 3,
OverlapCheck());
561 G4double gussetp0_pz = 1.27 *
cm;
562 G4double gussetp0_py = (45.72 - 11.11) *
cm;
563 G4double gussetp0_px = 44.62 *
cm;
564 G4double gussetp0_pltx = 5.08 *
cm;
565 G4Trap *bbc_gusset_plate0 =
new G4Trap(
"bbc_gusset_plate0", gussetp0_pz, gussetp0_py, gussetp0_px, gussetp0_pltx);
566 G4LogicalVolume *bbc_gusset0_plate_lv =
new G4LogicalVolume(bbc_gusset_plate0, Delrin, G4String(
"Bbc_Gusset0_Plates"));
570 G4RotationMatrix *rot_sgusset =
new G4RotationMatrix;
571 rot_sgusset->rotateY(90.*
deg);
572 rot_sgusset->rotateZ(180.*
deg);
574 G4double
xpos = supportp_width/2 + gussetp0_pz/2;
575 G4double ypos = -gussetp0_py/2 - 15*
cm - basep_height;
576 G4double zpos = 0.25*(gussetp0_px + gussetp0_pltx) + 228.6*
cm + 11.11*
cm;
577 new G4PVPlacement(rot_sgusset, G4ThreeVector(-xpos, ypos, -zpos), bbc_gusset0_plate_lv,
"BBC_GUSSET_PLATE0", logicWorld,
false, 0,
OverlapCheck());
578 new G4PVPlacement(rot_sgusset, G4ThreeVector(xpos, ypos, -zpos), bbc_gusset0_plate_lv,
"BBC_GUSSET_PLATE0", logicWorld,
false, 1,
OverlapCheck());
581 G4RotationMatrix *rot_ngusset =
new G4RotationMatrix;
582 rot_ngusset->rotateY(-90.*
deg);
583 rot_ngusset->rotateZ(180.*
deg);
585 new G4PVPlacement(rot_ngusset, G4ThreeVector(-xpos, ypos, zpos), bbc_gusset0_plate_lv,
"BBC_GUSSET_PLATE0", logicWorld,
false, 2,
OverlapCheck());
586 new G4PVPlacement(rot_ngusset, G4ThreeVector(xpos, ypos, zpos), bbc_gusset0_plate_lv,
"BBC_GUSSET_PLATE0", logicWorld,
false, 3,
OverlapCheck());
589 G4double gussetp1_x = 1.27 *
cm;
590 G4double gussetp1_y = 20.48 *
cm;
591 G4double gussetp1_z = 11.11 *
cm;
593 G4Box *bbc_gusset_plate1 =
new G4Box(
"bbc_gusset_plate1", gussetp1_x/2, gussetp1_y/2, gussetp1_z/2);
594 G4LogicalVolume *bbc_gusset1_plate_lv =
new G4LogicalVolume(bbc_gusset_plate1, Delrin, G4String(
"Bbc_Gusset1_Plates"));
598 ypos = -15*
cm - basep_height - gussetp1_y/2;
599 zpos = 228.6*
cm + gussetp1_z/2;
600 new G4PVPlacement(
nullptr, G4ThreeVector(-xpos, ypos, -zpos), bbc_gusset1_plate_lv,
"BBC_GUSSET_PLATE1", logicWorld,
false, 0,
OverlapCheck());
601 new G4PVPlacement(
nullptr, G4ThreeVector(xpos, ypos, -zpos), bbc_gusset1_plate_lv,
"BBC_GUSSET_PLATE1", logicWorld,
false, 1,
OverlapCheck());
604 new G4PVPlacement(
nullptr, G4ThreeVector(-xpos, ypos, zpos), bbc_gusset1_plate_lv,
"BBC_GUSSET_PLATE1", logicWorld,
false, 2,
OverlapCheck());
605 new G4PVPlacement(
nullptr, G4ThreeVector(xpos, ypos, zpos), bbc_gusset1_plate_lv,
"BBC_GUSSET_PLATE1", logicWorld,
false, 3,
OverlapCheck());
608 G4double gussetp2_x = 1.27 *
cm;
609 G4double gussetp2_y = (45.72 - 10.80 - 20.48) *
cm;
610 G4double gussetp2_z = 11.11 *
cm;
612 G4Box *bbc_gusset_plate2 =
new G4Box(
"bbc_gusset_plate2", gussetp2_x/2, gussetp2_y/2, gussetp2_z/2);
613 G4LogicalVolume *bbc_gusset2_plate_lv =
new G4LogicalVolume(bbc_gusset_plate2, Delrin, G4String(
"Bbc_Gusset2_Plates"));
617 ypos = -15*
cm - basep_height - 20.48*
cm - 10.80*
cm - gussetp2_y/2;
618 zpos = 228.6*
cm + gussetp2_z/2;
619 new G4PVPlacement(
nullptr, G4ThreeVector(-xpos, ypos, -zpos), bbc_gusset2_plate_lv,
"BBC_GUSSET_PLATE2", logicWorld,
false, 0,
OverlapCheck());
620 new G4PVPlacement(
nullptr, G4ThreeVector(xpos, ypos, -zpos), bbc_gusset2_plate_lv,
"BBC_GUSSET_PLATE2", logicWorld,
false, 1,
OverlapCheck());
623 new G4PVPlacement(
nullptr, G4ThreeVector(-xpos, ypos, zpos), bbc_gusset2_plate_lv,
"BBC_GUSSET_PLATE2", logicWorld,
false, 2,
OverlapCheck());
624 new G4PVPlacement(
nullptr, G4ThreeVector(xpos, ypos, zpos), bbc_gusset2_plate_lv,
"BBC_GUSSET_PLATE2", logicWorld,
false, 3,
OverlapCheck());
627 G4double splicep_x = 35.56 *
cm;
628 G4double splicep_y = 10.16 *
cm;
629 G4double splicep_z = 0.64 *
cm;
631 G4Box *bbc_splice_plate =
new G4Box(
"bbc_splice_plate", splicep_x/2, splicep_y/2, splicep_z/2);
632 G4LogicalVolume *bbc_splice_plate_lv =
new G4LogicalVolume(bbc_splice_plate, Delrin, G4String(
"Bbc_Splice_Plates"));
636 G4Tubs *bbc_splice_hole =
new G4Tubs(
"bbc_splice_hole", 0., (6.35/2)*
cm, splicep_z/2, 0, 2.0*M_PI);
637 G4LogicalVolume *bbc_splice_hole_lv =
new G4LogicalVolume(bbc_splice_hole, WorldMaterial, G4String(
"Bbc_Splice_Holes"));
639 new G4PVPlacement(
nullptr, G4ThreeVector(-12.7*
cm,0,0), bbc_splice_hole_lv,
"BBC_SPLICE_HOLE", bbc_splice_plate_lv,
false, 0,
OverlapCheck());
640 new G4PVPlacement(
nullptr, G4ThreeVector(0,0,0), bbc_splice_hole_lv,
"BBC_SPLICE_HOLE", bbc_splice_plate_lv,
false, 1,
OverlapCheck());
641 new G4PVPlacement(
nullptr, G4ThreeVector(12.7*
cm,0,0), bbc_splice_hole_lv,
"BBC_SPLICE_HOLE", bbc_splice_plate_lv,
false, 2,
OverlapCheck());
644 ypos = -15*
cm - basep_height - 20.48*
cm - splicep_y/2;
645 zpos = 228.6*
cm + supportp_len + splicep_z/2;
646 new G4PVPlacement(
nullptr, G4ThreeVector(0,ypos,-zpos), bbc_splice_plate_lv,
"BBC_SPLICE_PLATE", logicWorld,
false, 0,
OverlapCheck());
649 new G4PVPlacement(
nullptr, G4ThreeVector(0,ypos,zpos), bbc_splice_plate_lv,
"BBC_SPLICE_PLATE", logicWorld,
false, 1,
OverlapCheck());
656 std::cout <<
"Bbc Detector:" << std::endl;
657 if (what ==
"ALL" || what ==
"VOLUME")
659 std::cout <<
"Version 0.1" << std::endl;