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) 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 BDSBEAMPIPEFACTORYRHOMBUS_H
19#define BDSBEAMPIPEFACTORYRHOMBUS_H
20
21#include "BDSBeamPipeFactoryPoints.hh"
22
23namespace BDS
24{
26 {
27 G4double aper1;
28 G4double aper2;
29 G4double aper3;
30 };
31}
32
48{
49public:
52
53private:
55 virtual void GeneratePoints(G4double aper1,
56 G4double aper2,
57 G4double aper3,
58 G4double aper4,
59 G4double beamPipeThickness,
60 G4int pointsPerTwoPi = 40);
61
63 virtual G4double CalculateIntersectionRadius(G4double aper1,
64 G4double aper2,
65 G4double aper3,
66 G4double aper4,
67 G4double beamPipeThickness);
68
70 void GenerateRhombus(std::vector<G4TwoVector>& vec,
71 G4double x1,
72 G4double y1,
73 G4double cornerRadius,
74 G4int pointsPerTwoPi);
75
77 BDS::ThreePoints ExpandRhombus(G4double aper1,
78 G4double aper2,
79 G4double aper3,
80 G4double distance);
81};
82
83#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.