BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSTunnelFactoryBase.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef BDSTUNNELFACTORYBASE_H
19#define BDSTUNNELFACTORYBASE_H
20
21#include "BDSFactoryBase.hh"
22#include "BDSTunnelSection.hh"
23
24#include "globals.hh" // geant4 globals / types
25#include "G4ThreeVector.hh"
26
27#include <set>
28
29class G4LogicalVolume;
30class G4Material;
31class G4VisAttributes;
32class G4VSolid;
33
35class BDSTunnelInfo;
36
59{
60public:
62 virtual BDSTunnelSection* CreateTunnelSection(G4String name,
63 G4double length,
64 G4double tunnelThickness,
65 G4double tunnelSoilThickness,
66 G4Material* tunnelMaterial,
67 G4Material* tunnelSoilMaterial,
68 G4bool tunnelFloor,
69 G4double tunnelFloorOffset,
70 G4double tunnel1,
71 G4double tunnel2,
72 G4bool visible) = 0;
73
76 virtual BDSTunnelSection* CreateTunnelSectionAngledIn(G4String name,
77 G4double length,
78 G4double angleIn,
79 G4double tunnelThickness,
80 G4double tunnelSoilThickness,
81 G4Material* tunnelMaterial,
82 G4Material* tunnelSoilMaterial,
83 G4bool tunnelFloor,
84 G4double tunnelFloorOffset,
85 G4double tunnel1,
86 G4double tunnel2,
87 G4bool visible);
88
92 G4double length,
93 G4double angleOut,
94 G4double tunnelThickness,
95 G4double tunnelSoilThickness,
96 G4Material* tunnelMaterial,
97 G4Material* tunnelSoilMaterial,
98 G4bool tunnelFloor,
99 G4double tunnelFloorOffset,
100 G4double tunnel1,
101 G4double tunnel2,
102 G4bool visible);
103
109 G4double length,
110 G4double angleIn,
111 G4double angleOut,
112 G4double tunnelThickness,
113 G4double tunnelSoilThickness,
114 G4Material* tunnelMaterial,
115 G4Material* tunnelSoilMaterial,
116 G4bool tunnelFloor,
117 G4double tunnelFloorOffset,
118 G4double tunnel1,
119 G4double tunnel2,
120 G4bool visible);
121
124 G4double length,
125 G4ThreeVector inputFaceIn,
126 G4ThreeVector outputFaceIn,
127 G4double tunnelThickness,
128 G4double tunnelSoilThickness,
129 G4Material* tunnelMaterial,
130 G4Material* tunnelSoilMaterial,
131 G4bool tunnelFloor,
132 G4double tunnelFloorOffset,
133 G4double tunnel1,
134 G4double tunnel2,
135 G4bool visible) = 0;
136
139
140protected:
143
147 void CommontTestInputParameters(G4double& length,
148 G4double& tunnelThickness,
149 G4double& tunnelSoilThickness,
150 G4Material*& tunnelMaterial,
151 G4Material*& tunnelSoilMaterial);
152
153 virtual void CommonConstruction(G4String name,
154 G4Material* tunnelMaterial,
155 G4Material* tunnelSoilMaterial,
156 G4double length,
157 G4double containerXRadius,
158 G4double contianerYRadius,
159 G4bool visible);
160
162 virtual void BuildLogicalVolumes(G4String name,
163 G4Material* tunnelMaterial,
164 G4Material* tunnelSoilMaterial);
165
167 virtual void SetVisAttributes(G4bool visible);
168
170 virtual void SetUserLimits();
171
173 virtual void PrepareGeometryComponent(G4double containerXRadius,
174 G4double containerYRadius,
175 G4double containerZRadius);
176
178 virtual void PrepareTunnelSection(G4String name,
179 G4double chordLength);
180
182 virtual void SetSensitiveVolumes();
183
185 virtual void PlaceComponents(G4String name);
186
189 virtual void CleanUp();
190
191 BDSGeometryComponent* tunnelComponent;
192 BDSTunnelSection* tunnelSection;
193
194 G4VSolid* containerSolid;
195 G4VSolid* tunnelSolid;
196 G4VSolid* soilSolid;
197 G4VSolid* floorSolid;
198 G4VSolid* intersectionSolid;
199 G4LogicalVolume* containerLV;
200 G4LogicalVolume* tunnelLV;
201 G4LogicalVolume* soilLV;
202 G4LogicalVolume* floorLV;
203 G4ThreeVector floorDisplacement;
204 BDSTunnelInfo* defaultModel;
205
210};
211
212#endif
Common temporary storage for all factories no matter what geometry.
A generic geometry component for a bdsim model.
Abstract base class for tunnel factory classes.
BDSTunnelFactoryBase()
protected default constructor so only derived classes can use it
virtual BDSTunnelSection * CreateTunnelSectionAngledInOut(G4String name, G4double length, G4double angleIn, G4double angleOut, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible)
virtual void PrepareGeometryComponent(G4double containerXRadius, G4double containerYRadius, G4double containerZRadius)
Prepare the assembled geometry component.
virtual void SetSensitiveVolumes()
Set the sensitive volumes.
void CommontTestInputParameters(G4double &length, G4double &tunnelThickness, G4double &tunnelSoilThickness, G4Material *&tunnelMaterial, G4Material *&tunnelSoilMaterial)
virtual void SetUserLimits()
Set user limits for all logical volumes in the tunnel section.
virtual BDSTunnelSection * CreateTunnelSectionAngled(G4String name, G4double length, G4ThreeVector inputFaceIn, G4ThreeVector outputFaceIn, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible)=0
Create a tunnel section with an angled input and output face. Pure virtual.
virtual BDSTunnelSection * CreateTunnelSectionAngledIn(G4String name, G4double length, G4double angleIn, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible)
virtual void SetVisAttributes(G4bool visible)
Set the visual attributes for each logical volume.
virtual BDSTunnelSection * CreateTunnelSectionAngledOut(G4String name, G4double length, G4double angleOut, G4double tunnelThickness, G4double tunnelSoilThickness, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial, G4bool tunnelFloor, G4double tunnelFloorOffset, G4double tunnel1, G4double tunnel2, G4bool visible)
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)=0
Create a tunnel section with flat input and output faces. Pure virtual.
virtual void PlaceComponents(G4String name)
Place components in container volume.
virtual void PrepareTunnelSection(G4String name, G4double chordLength)
Prepare the output BDSTunnelSection instance.
virtual ~BDSTunnelFactoryBase()
Virtual base destructor.
virtual void BuildLogicalVolumes(G4String name, G4Material *tunnelMaterial, G4Material *tunnelSoilMaterial)
Build logical volumes from solids + materials.
Holder struct of all information required to create a section of tunnel.
Class that represents a section of tunnel.