19#include "BDSTunnelFactoryBase.hh"
20#include "BDSTunnelFactoryCircular.hh"
21#include "BDSTunnelInfo.hh"
22#include "BDSTunnelSection.hh"
26#include "G4CutTubs.hh"
27#include "G4IntersectionSolid.hh"
28#include "G4LogicalVolume.hh"
29#include "G4SubtractionSolid.hh"
30#include "G4ThreeVector.hh"
32#include "G4UnionSolid.hh"
39BDSTunnelFactoryCircular::BDSTunnelFactoryCircular()
44 G4double tunnelThickness,
45 G4double tunnelSoilThickness,
46 G4Material* tunnelMaterial,
47 G4Material* tunnelSoilMaterial,
49 G4double tunnelFloorOffset,
59 tunnelSoilMaterial, tunnelFloorOffset, tunnel1);
62 tunnelSolid =
new G4Tubs(name +
"_tunnel_solid",
64 tunnel1 + tunnelThickness,
69 G4double soilInnerR = tunnel1 + tunnelThickness +
lengthSafety;
70 G4double soilOuterR = soilInnerR + tunnelSoilThickness;
71 soilSolid =
new G4Tubs(name +
"_soil_solid",
83 G4double floorBoxRadius = 1.5*tunnel1;
85 G4double floorBoxDisplacement = tunnelFloorOffset + floorBoxRadius +
lengthSafety;
87 G4VSolid* floorCylinder =
new G4Tubs(name +
"_floor_cylinder_solid",
94 G4VSolid* floorBox =
new G4Box(name +
"_floor_box_solid",
100 floorSolid =
new G4IntersectionSolid(name +
"_floor_solid",
104 G4ThreeVector(0,-floorBoxDisplacement,0));
112 G4VSolid* floorContainerCylinder =
new G4Tubs(name +
"_floor_cont_cyl_solid",
119 G4VSolid* floorContainerBox =
new G4Box(name +
"_floor_cont_box_solid",
127 G4double floorBoxContDisp = floorBoxDisplacement -
lengthSafety;
128 G4VSolid* floorContainerSolid =
new G4IntersectionSolid(name +
"_floor_cont_solid",
129 floorContainerCylinder,
132 G4ThreeVector(0,-floorBoxContDisp,0));
134 G4VSolid* tunnelContainerSolid =
new G4Tubs(name +
"_tunnel_solid",
141 containerSolid =
new G4UnionSolid(name +
"_container_solid",
142 tunnelContainerSolid,
143 floorContainerSolid);
147 containerSolid =
new G4Tubs(name +
"_tunnel_container_solid",
155 CommonConstruction(name, tunnelMaterial, tunnelSoilMaterial, length, containerRadius, containerRadius, visible);
157 return tunnelSection;
163 G4ThreeVector inputFace,
164 G4ThreeVector outputFace,
165 G4double tunnelThickness,
166 G4double tunnelSoilThickness,
167 G4Material* tunnelMaterial,
168 G4Material* tunnelSoilMaterial,
170 G4double tunnelFloorOffset,
180 tunnelSoilMaterial, tunnelFloorOffset, tunnel1);
183 tunnelSolid =
new G4CutTubs(name +
"_tunnel_solid",
185 tunnel1 + tunnelThickness,
192 G4double soilInnerR = tunnel1 + tunnelThickness +
lengthSafety;
193 G4double soilOuterR = soilInnerR + tunnelSoilThickness;
194 soilSolid =
new G4CutTubs(name +
"_soil_solid",
209 G4double floorBoxRadius = 1.5*tunnel1;
211 G4double floorBoxDisplacement = tunnelFloorOffset + floorBoxRadius +
lengthSafety;
213 G4VSolid* floorCylinder =
new G4CutTubs(name +
"_floor_cylinder_solid",
222 G4VSolid* floorBox =
new G4Box(name +
"_floor_box_solid",
229 allSolids.insert(floorCylinder);
230 allSolids.insert(floorBox);
232 floorSolid =
new G4IntersectionSolid(name +
"_floor_solid",
236 G4ThreeVector(0,-floorBoxDisplacement,0));
239 G4VSolid* floorContainerCylinder =
new G4CutTubs(name +
"_floor_cont_cyl_solid",
248 G4VSolid* floorContainerBox =
new G4Box(name +
"_floor_cont_box_solid",
255 allSolids.insert(floorContainerCylinder);
256 allSolids.insert(floorContainerBox);
260 G4double floorBoxContDisp = floorBoxDisplacement -
lengthSafety;
261 G4VSolid* floorContainerSolid =
new G4IntersectionSolid(name +
"_floor_cont_solid",
262 floorContainerCylinder,
265 G4ThreeVector(0,-floorBoxContDisp,0));
267 G4VSolid* tunnelContainerSolid =
new G4CutTubs(name +
"_tunnel_solid",
277 allSolids.insert(floorContainerSolid);
278 allSolids.insert(tunnelContainerSolid);
280 containerSolid =
new G4UnionSolid(name +
"_container_solid",
281 tunnelContainerSolid,
282 floorContainerSolid);
284 G4VSolid* intersectionSolidCylinder =
new G4CutTubs(name +
"_int_cyl_solid",
292 allSolids.insert(intersectionSolidCylinder);
294 intersectionSolid =
new G4SubtractionSolid(name +
"_intersection_solid",
295 intersectionSolidCylinder,
302 containerSolid =
new G4CutTubs(name +
"_tunnel_container_solid",
311 intersectionSolid =
new G4CutTubs(name +
"_tunnel_intersection_solid",
321 CommonConstruction(name, tunnelMaterial, tunnelSoilMaterial, length, containerRadius,
322 containerRadius, visible);
324 return tunnelSection;
329 G4double& tunnelThickness,
330 G4double& tunnelSoilThickness,
331 G4Material*& tunnelMaterial,
332 G4Material*& tunnelSoilMaterial,
333 G4double& tunnelFloorOffset,
338 if (tunnelFloorOffset < 1e-10)
339 {tunnelFloorOffset = defaultModel->floorOffset;}
342 {tunnel1 = defaultModel->
aper1;}
G4double lengthSafety
Cache of global constants variable.
void CommontTestInputParameters(G4double &length, G4double &tunnelThickness, G4double &tunnelSoilThickness, G4Material *&tunnelMaterial, G4Material *&tunnelSoilMaterial)
virtual BDSTunnelSection * CreateTunnelSection(G4String name, G4double length, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible)
Create a tunnel section with flat input and output faces.
virtual BDSTunnelSection * CreateTunnelSectionAngled(G4String name, G4double length, G4ThreeVector inputFace, G4ThreeVector outputFace, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible)
Create a tunnel section with an angled input and output face.
void TestInputParameters(G4double &length, G4double &tunnelThickness, G4double &tunnelSoilThickness, G4Material *&tunnelMaterial, G4Material *&tunnelSoildMaterial, G4double &tunnelFloorOffset, G4double &tunnel1)
functions below here are private to this particular factory
G4double aper1
Tunnel aperture / shape parameter 1.
Class that represents a section of tunnel.