BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSBeamPipeInfo.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 BDSBEAMPIPEINFO_H
19#define BDSBEAMPIPEINFO_H
20
21#include "BDSBeamPipeType.hh"
22
23#include "globals.hh" // geant4 types / globals
24#include "G4ThreeVector.hh"
25
26class BDSExtent;
27class G4Material;
28
40{
41public:
43 BDSBeamPipeInfo() = delete;
45 BDSBeamPipeInfo(BDSBeamPipeType beamPipeTypeIn,
46 G4double aper1In,
47 G4double aper2In,
48 G4double aper3In,
49 G4double aper4In,
50 G4Material* vacuumMaterialIn,
51 G4double beamPipeThicknessIn,
52 G4Material* beamPipeMaterialIn,
53 const G4ThreeVector& inputFaceNormalIn = G4ThreeVector(0,0,-1),
54 const G4ThreeVector& outputFaceNormalIn = G4ThreeVector(0,0,1),
55 const G4String& pointsFileNameIn = "",
56 const G4String& pointsUnitIn = "mm");
57
60 BDSBeamPipeInfo(const G4String& beamPipeTypeIn,
61 G4double aper1In,
62 G4double aper2In,
63 G4double aper3In,
64 G4double aper4In,
65 const G4String& vacuumMaterialIn,
66 G4double beamPipeThicknessIn,
67 const G4String& beamPipeMaterialIn,
68 const G4ThreeVector& inputFaceNormalIn = G4ThreeVector(0,0,-1),
69 const G4ThreeVector& outputFaceNormalIn = G4ThreeVector(0,0,1));
70
73 BDSBeamPipeInfo(const BDSBeamPipeInfo* defaultInfo,
74 const G4String& beamPipeTypeIn,
75 G4double aper1In,
76 G4double aper2In,
77 G4double aper3In,
78 G4double aper4In,
79 const G4String& vacuumMaterialIn,
80 G4double beamPipeThicknessIn,
81 const G4String& beamPipeMaterialIn,
82 const G4ThreeVector& inputFaceNormalIn = G4ThreeVector(0,0,-1),
83 const G4ThreeVector& outputFaceNormalIn = G4ThreeVector(0,0,1));
84
87 void CheckApertureInfo();
88
91 BDSExtent Extent() const;
92
94 BDSExtent ExtentInner() const;
95
97 G4double IndicativeRadius() const;
98
100 G4double IndicativeRadiusInner() const;
101
103 BDSBeamPipeInfo ShrinkBy(G4double margin) const;
104
107 G4double aper1;
108 G4double aper2;
109 G4double aper3;
110 G4double aper4;
111 G4double aperOffsetX;
112 G4double aperOffsetY;
113 G4Material* vacuumMaterial;
115 G4Material* beamPipeMaterial;
116 G4ThreeVector inputFaceNormal;
117 G4ThreeVector outputFaceNormal;
119 G4String pointsUnit;
121
122private:
124 void CheckAndSetPointsInfo(const G4String& beamPipeTypeIn);
125
130 void CheckRequiredParametersSet(G4bool setAper1, G4bool setAper2,
131 G4bool setAper3, G4bool setAper4);
132
134 void InfoOKForCircular();
135
137 void InfoOKForElliptical();
138
141
143 void InfoOKForLHC();
144
147
150
152 void InfoOKForRaceTrack();
153
155 void InfoOKForOctagonal();
156
158 void InfoOKForClicPCL();
159
161 void InfoOKForRhombus();
162};
163
164#endif
Holder class for all information required to describe a beam pipe model.
G4double IndicativeRadiusInner() const
Return an indicative inner extent for the beam pipe vacuum.
BDSExtent Extent() const
G4Material * beamPipeMaterial
Public member for direct access.
G4double aper3
Public member for direct access.
G4double aperOffsetX
Public member for direct access.
G4String pointsUnit
Public member for direct access.
BDSBeamPipeInfo()=delete
Deleted default constructor to ensure one of supplied constructors is used.
void InfoOKForLHC()
Aperture info check for lhc aperture.
BDSBeamPipeInfo ShrinkBy(G4double margin) const
Return a copy that's shrunk by value margin.
G4double aper1
Public member for direct access.
G4ThreeVector outputFaceNormal
Public member for direct access.
void InfoOKForOctagonal()
Aperture info check for octagonal aperture.
G4Material * vacuumMaterial
Public member for direct access.
void CheckAndSetPointsInfo(const G4String &beamPipeTypeIn)
Parse the type string to extract the file name and the optional units and assign to member variables.
void InfoOKForClicPCL()
Aperture info check for CLIC PCL aperture.
G4double beamPipeThickness
Public member for direct access.
G4double aperOffsetY
Public member for direct access.
void InfoOKForRaceTrack()
Aperture info check for racetrack aperture.
void InfoOKForElliptical()
Aperture info check for elliptical aperture.
BDSExtent ExtentInner() const
Return an extent for just the raw aperture.
void InfoOKForRectEllipse()
Aperture info check for rectellipse aperture.
void InfoOKForRhombus()
Aperture info check for Rhombus aperture.
G4String pointsFileName
Public member for direct access.
G4double aper4
Public member for direct access.
void InfoOKForLHCDetailed()
Aperture info check for lhc detailed aperture.
void InfoOKForCircular()
Aperture info check for circular aperture.
void CheckRequiredParametersSet(G4bool setAper1, G4bool setAper2, G4bool setAper3, G4bool setAper4)
void InfoOKForRectangular()
Aperture info check for rectangular aperture.
G4double IndicativeRadius() const
Return an indicative extent of the beam pipe - typically the maximum of x or y extent.
G4double aper2
Public member for direct access.
BDSBeamPipeType beamPipeType
Public member for direct access.
G4ThreeVector inputFaceNormal
Public member for direct access.
Holder for +- extents in 3 dimensions.
Definition BDSExtent.hh:38