BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSBeamPipeFactoryLHCDetailed.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2023.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef BDSBEAMPIPEFACTORYLHCDETAILED_H
20#define BDSBEAMPIPEFACTORYLHCDETAILED_H
21
22#include "BDSBeamPipeFactoryBase.hh"
23#include "BDSBeamPipe.hh"
24
25class G4Material;
26
34{
35public:
38
41
43 virtual void CleanUp();
44
45 virtual BDSBeamPipe* CreateBeamPipe(const G4String& nameIn,
46 G4double lengthIn,
47 G4double aper1 = 0,
48 G4double aper2 = 0,
49 G4double aper3 = 0,
50 G4double aper4 = 0,
51 G4Material* vacuumMaterialIn = nullptr,
52 G4double beamPipeThicknessIn = 0,
53 G4Material* beamPipeMaterialIn = nullptr,
54 const G4String& pointsFileIn = "",
55 const G4String& pointsUnitIn = "");
56
57 virtual BDSBeamPipe* CreateBeamPipe(const G4String& nameIn,
58 G4double lengthIn,
59 const G4ThreeVector& inputFaceNormalIn,
60 const G4ThreeVector& outputFaceNormalIn,
61 G4double aper1 = 0,
62 G4double aper2 = 0,
63 G4double aper3 = 0,
64 G4double aper4 = 0,
65 G4Material* vacuumMaterialIn = nullptr,
66 G4double beamPipeThicknessIn = 0,
67 G4Material* beamPipeMaterialIn = nullptr,
68 const G4String& pointsFileIn = "",
69 const G4String& pointsUnitIn = "");
70
71private:
74 void CleanUpLHCDetailed();
75
78 BDSBeamPipe* CommonFinalConstruction(const G4String& name,
79 G4Material* vacuumMaterial,
80 G4Material* beamPipeMaterial,
81 G4double length,
82 G4double containerRadius);
83 G4double CreateGeneralAngledSolids(const G4String& name,
84 G4double length,
85 const G4ThreeVector& inputface,
86 const G4ThreeVector& outputface);
87
88 virtual void BuildLogicalVolumes(const G4String& nameIn,
89 G4Material* vacuumMaterialIn,
90 G4Material* beamPipeMaterialIn);
91 virtual void SetVisAttributes(G4Material* beamPipeMaterialIn,
92 G4Material* vacuumMaterialIn);
93 virtual void SetUserLimits(G4double length);
94 virtual void PlaceComponents(const G4String& nameIn);
95
98
101 void CalculateGeometricalParameters(G4double aper1,
102 G4double aper2,
103 G4double aper3,
104 G4double beamPipeThickness,
105 G4double length);
106
107 G4VSolid* copperSkinSolid;
108 G4VSolid* screenSolid;
109 G4VSolid* coolingPipeSolid;
110 G4LogicalVolume* copperSkinLV;
111 G4LogicalVolume* screenLV;
112 G4LogicalVolume* coolingPipeLV;
113 G4PVPlacement* copperSkinPV;
114 G4PVPlacement* screenPV;
115 G4PVPlacement* coolingPipeTopPV;
116 G4PVPlacement* coolingPipeBottomPV;
117
120 G4double coolingPipeThickness;
121 G4double coolingPipeRadius;
122 G4double copperSkinThickness;
123
126 G4double vacRadius, vacBoxX, vacBoxY;
127
129 G4double cuInnerRadius, cuInnerBoxX, cuInnerBoxY;
130 G4double cuOuterRadius, cuOuterBoxX, cuOuterBoxY;
131
133 G4double bsInnerRadius, bsInnerBoxX, bsInnerBoxY;
134 G4double bsOuterRadius, bsOuterBoxX, bsOuterBoxY;
135
137 G4double cbInnerRadius, cbOuterRadius;
138
141
144 G4double halfLength;
145
148
152
155};
156
157#endif
Abstract base class for beampipe factory classes.
Factory for detailed lhc aperture model beam pipes.
G4double GetFullWidthOfCoolingPipe()
Access cooling pipe information from factory for parameter tests.
void InitialiseGeometricalParameters()
Utility function to initialise the geometry parameters.
BDSBeamPipe * CommonFinalConstruction(const G4String &name, G4Material *vacuumMaterial, G4Material *beamPipeMaterial, G4double length, G4double containerRadius)
G4bool buildCoolingPipe
Whether to build the cooling pipes on either side.
virtual void BuildLogicalVolumes(const G4String &nameIn, G4Material *vacuumMaterialIn, G4Material *beamPipeMaterialIn)
build logical volumes
G4double cbInnerRadius
Cold bore geometrical parameters.
G4double vacHalfLength
General length variable (to avoid mistakes)
G4double coolingPipeOffset
Cooling pipe geometrical parameters.
virtual void PlaceComponents(const G4String &nameIn)
Place volumes.
G4double containerRadius
Container geometrical parameters.
virtual void SetVisAttributes(G4Material *beamPipeMaterialIn, G4Material *vacuumMaterialIn)
Set visual attributes.
G4double coldBoreThickness
Parameters that control the design.
virtual BDSBeamPipe * CreateBeamPipe(const G4String &nameIn, G4double lengthIn, G4double aper1=0, G4double aper2=0, G4double aper3=0, G4double aper4=0, G4Material *vacuumMaterialIn=nullptr, G4double beamPipeThicknessIn=0, G4Material *beamPipeMaterialIn=nullptr, const G4String &pointsFileIn="", const G4String &pointsUnitIn="")
create a flat ended beampipe
G4double cuInnerRadius
Copper skin geometrical parameters.
G4double bsInnerRadius
Beam screen geometrical parameters.
virtual void CleanUp()
Clean up extra pointers particular to this factory before use.
G4double CreateGeneralAngledSolids(const G4String &name, G4double length, const G4ThreeVector &inputface, const G4ThreeVector &outputface)
virtual void SetUserLimits(G4double length)
Set user limits.
void CalculateGeometricalParameters(G4double aper1, G4double aper2, G4double aper3, G4double beamPipeThickness, G4double length)
A holder class for a piece of beam pipe geometry.
Definition: BDSBeamPipe.hh:45