BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSBeamPipeFactoryOctagonal.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 BDSBEAMPIPEFACTORYOCTAGONAL_H
19#define BDSBEAMPIPEFACTORYOCTAGONAL_H
20
21#include "BDSBeamPipeFactoryPoints.hh"
22
23namespace BDS
24{
26 {
27 G4double aper1;
28 G4double aper2;
29 G4double aper3;
30 G4double aper4;
31 };
32}
33
51{
52public:
55
56private:
59 virtual void GeneratePoints(G4double aper1,
60 G4double aper2,
61 G4double aper3,
62 G4double aper4,
63 G4double beamPipeThickness,
64 G4int pointsPerTwoPi = 40);
65
67 virtual G4double CalculateIntersectionRadius(G4double aper1,
68 G4double aper2,
69 G4double aper3,
70 G4double aper4,
71 G4double beamPipeThickness);
72
74 void GenerateOctagonal(std::vector<G4TwoVector>& vec,
75 G4double x1,
76 G4double y1,
77 G4double x2,
78 G4double y2);
79
84 BDS::FourPoints ExpandOctagon(G4double aper1,
85 G4double aper2,
86 G4double aper3,
87 G4double aper4,
88 G4double distance);
89};
90
91#endif
Factory for octagonal aperture model beampipes.
virtual void GeneratePoints(G4double aper1, G4double aper2, G4double aper3, G4double aper4, G4double beamPipeThickness, G4int pointsPerTwoPi=40)
virtual G4double CalculateIntersectionRadius(G4double aper1, G4double aper2, G4double aper3, G4double aper4, G4double beamPipeThickness)
Calculate the radius of the solid used for intersection for angled faces.
void GenerateOctagonal(std::vector< G4TwoVector > &vec, G4double x1, G4double y1, G4double x2, G4double y2)
Append 2D points on an octagon in a clockwise direction into the vector argument.
BDS::FourPoints ExpandOctagon(G4double aper1, G4double aper2, G4double aper3, G4double aper4, G4double distance)
Factory for beam pipes defined by a series of x,y points that are extruded.
Return either G4Tubs or G4CutTubs depending on flat face.