BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSBeamPipeFactoryRhombus.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 BDSBEAMPIPEFACTORYRHOMBUS_H
20#define BDSBEAMPIPEFACTORYRHOMBUS_H
21
22#include "BDSBeamPipeFactoryPoints.hh"
23
24namespace BDS
25{
27 {
28 G4double aper1;
29 G4double aper2;
30 G4double aper3;
31 };
32}
33
49{
50public:
53
54private:
56 virtual void GeneratePoints(G4double aper1,
57 G4double aper2,
58 G4double aper3,
59 G4double aper4,
60 G4double beamPipeThickness,
61 G4int pointsPerTwoPi = 40);
62
64 virtual G4double CalculateIntersectionRadius(G4double aper1,
65 G4double aper2,
66 G4double aper3,
67 G4double aper4,
68 G4double beamPipeThickness);
69
71 void GenerateRhombus(std::vector<G4TwoVector>& vec,
72 G4double x1,
73 G4double y1,
74 G4double cornerRadius,
75 G4int pointsPerTwoPi);
76
78 BDS::ThreePoints ExpandRhombus(G4double aper1,
79 G4double aper2,
80 G4double aper3,
81 G4double distance);
82};
83
84#endif
Factory for beam pipes defined by a series of x,y points that are extruded.
Factory for rhombus aperture model beampipes.
BDS::ThreePoints ExpandRhombus(G4double aper1, G4double aper2, G4double aper3, G4double distance)
Expand the rhombus as needed.
void GenerateRhombus(std::vector< G4TwoVector > &vec, G4double x1, G4double y1, G4double cornerRadius, G4int pointsPerTwoPi)
Generate either 4 points or set of points with curved edges.
virtual void GeneratePoints(G4double aper1, G4double aper2, G4double aper3, G4double aper4, G4double beamPipeThickness, G4int pointsPerTwoPi=40)
Generate all the sets of required points for each surface.
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.
Return either G4Tubs or G4CutTubs depending on flat face.