BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSMagnetOuterFactoryCylindrical.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 BDSMAGNETOUTERFACTORYCYLINDRICAL_H
19#define BDSMAGNETOUTERFACTORYCYLINDRICAL_H
20
21#include "BDSMagnetOuterFactoryBase.hh"
22
23#include "globals.hh" // geant4 globals / types
24
25class BDSBeamPipe;
27class G4Colour;
28class G4Material;
29
37{
38public:
41
42 virtual void CleanUp();
43
45 virtual BDSMagnetOuter* CreateSectorBend(G4String name, // name
46 G4double length, // full length [mm]
47 const BDSBeamPipe* beamPipe, // beampipe
48 G4double containerLength, // full length to make AccComp container
49 const BDSMagnetOuterInfo* recipe); // recipe for geometry
50
52 virtual BDSMagnetOuter* CreateRectangularBend(G4String name, // name
53 G4double length, // full length [mm]
54 const BDSBeamPipe* beamPipe, // beampipe
55 G4double containerLength, // full length to make AccComp container
56 const BDSMagnetOuterInfo* recipe); // recipe for geometry
57
59 virtual BDSMagnetOuter* CreateQuadrupole(G4String name, // name
60 G4double length, // length
61 BDSBeamPipe* beamPipe, // beampipe
62 G4double containerLength, // full length to make AccComp container
63 const BDSMagnetOuterInfo* recipe); // geometry recipe
64
65
67 virtual BDSMagnetOuter* CreateSextupole(G4String name, // name
68 G4double length, // length
69 BDSBeamPipe* beamPipe, // beampipe
70 G4double containerLength, // full length to make AccComp container
71 const BDSMagnetOuterInfo* recipe); // geometry recipe
72
74 virtual BDSMagnetOuter* CreateOctupole(G4String name, // name
75 G4double length, // length
76 BDSBeamPipe* beamPipe, // beampipe
77 G4double containerLength, // full length to make AccComp container
78 const BDSMagnetOuterInfo* recipe); // geometry recipe
79
81 virtual BDSMagnetOuter* CreateDecapole(G4String name, // name
82 G4double length, // length
83 BDSBeamPipe* beamPipe, // beampipe
84 G4double containerLength, // full length to make AccComp container
85 const BDSMagnetOuterInfo* recipe); // geometry recipe
86
88 virtual BDSMagnetOuter* CreateSolenoid(G4String name, // name
89 G4double length, // length
90 BDSBeamPipe* beamPipe, // beampipe
91 G4double containerLength, // full length to make AccComp
92 const BDSMagnetOuterInfo* recipe); // geometry recipe
93
95 virtual BDSMagnetOuter* CreateMultipole(G4String name, // name
96 G4double length, // length
97 BDSBeamPipe* beamPipe, // beampipe
98 G4double containerLength, // full length to make AccComp container
99 const BDSMagnetOuterInfo* recipe); // geometry recipe
100
102 virtual BDSMagnetOuter* CreateRfCavity(G4String name, // name
103 G4double length, // length
104 BDSBeamPipe* beamPipe, // beampipe
105 G4double containerLength, // full length to make AccComp container
106 const BDSMagnetOuterInfo* recipe); // geometry recipe
107
109 virtual BDSMagnetOuter* CreateMuonSpoiler(G4String name, // name
110 G4double length, // length
111 BDSBeamPipe* beamPipe, // beampipe
112 G4double containerLength, // full length to make AccComp container
113 const BDSMagnetOuterInfo* recipe); // geometry recipe
114
116 virtual BDSMagnetOuter* CreateKicker(G4String name, // name
117 G4double length, // length [mm]
118 const BDSBeamPipe* beamPipe, // beampipe
119 G4double containerLength, // full length to make AccComp container
120 const BDSMagnetOuterInfo* recipe, // geometry recipe
121 G4bool vertical); // is it a vertical kicker?
122
123private:
125 void CreateCylindricalSolids(G4String name, // name
126 G4double length, // full length
127 const BDSBeamPipe* beamPipe, // beampipe
128 G4double magnetContainerLength, // magnet object container full length
129 G4double boxSize); // full width
130
131 void CreateCylindricalSolidsAngled(G4String name, // name
132 G4double length, // full length
133 const BDSBeamPipe* beamPipe, // beampipe
134 G4double magnetContainerLength, // magnet object container full length
135 G4double boxSize); // full width
136
140 G4double length,
141 const BDSMagnetOuterInfo* recipe);
142
144 void TestInputParameters(const BDSBeamPipe* beamPipe,
145 G4double& horizontalWidthIn);
146
147 G4double magnetContainerRadius;
148};
149
150#endif
A holder class for a piece of beam pipe geometry.
Abstract base class for magnet outer volume factories.
Factory that produces cylindrical magnet geometry.
virtual BDSMagnetOuter * CreateKicker(G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe, G4bool vertical)
horizontal and vertical kicker outer volume
virtual BDSMagnetOuter * CreateMuonSpoiler(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
muon spoiler outer volume
virtual BDSMagnetOuter * CreateSextupole(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
sextupole outer volume
void CreateCylindricalSolids(G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double magnetContainerLength, G4double boxSize)
Only really one function needed for this factory private to this factory only.
virtual BDSMagnetOuter * CreateRectangularBend(G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
rectangular bend outer volume
virtual BDSMagnetOuter * CreateMultipole(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
general multipole outer volume - could be any 2N order multipole
virtual BDSMagnetOuter * CreateSectorBend(G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
sector bend outer volume
virtual BDSMagnetOuter * CreateDecapole(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
decapole outer volume
BDSMagnetOuter * CommonFinalConstructor(G4String name, G4double length, const BDSMagnetOuterInfo *recipe)
virtual BDSMagnetOuter * CreateSolenoid(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
solenoid outer volume
virtual BDSMagnetOuter * CreateQuadrupole(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
quadrupole outer volume
virtual BDSMagnetOuter * CreateOctupole(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
octupole outer volume
virtual BDSMagnetOuter * CreateRfCavity(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
RF cavity outer volume.
virtual void CleanUp()
Empty containers for next use - factories are never deleted so can't rely on scope.
void TestInputParameters(const BDSBeamPipe *beamPipe, G4double &horizontalWidthIn)
test inputs for no null pointers or overlapping volumes due to poorly defined sizes
Holder struct of all information required to create the outer geometry of a magnet.
An object for both the returned magnet outer body but also a tight fitting container for the whole ma...