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) 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 BDSMAGNETOUTERFACTORYCYLINDRICAL_H
20#define BDSMAGNETOUTERFACTORYCYLINDRICAL_H
21
22#include "BDSMagnetOuterFactoryBase.hh"
23
24#include "globals.hh" // geant4 globals / types
25
26class BDSBeamPipe;
28class G4Colour;
29class G4Material;
30
38{
39public:
42
43 virtual void CleanUp();
44
46 virtual BDSMagnetOuter* CreateSectorBend(G4String name, // name
47 G4double length, // full length [mm]
48 const BDSBeamPipe* beamPipe, // beampipe
49 G4double containerLength, // full length to make AccComp container
50 const BDSMagnetOuterInfo* recipe); // recipe for geometry
51
53 virtual BDSMagnetOuter* CreateRectangularBend(G4String name, // name
54 G4double length, // full length [mm]
55 const BDSBeamPipe* beamPipe, // beampipe
56 G4double containerLength, // full length to make AccComp container
57 const BDSMagnetOuterInfo* recipe); // recipe for geometry
58
60 virtual BDSMagnetOuter* CreateQuadrupole(G4String name, // name
61 G4double length, // length
62 BDSBeamPipe* beamPipe, // beampipe
63 G4double containerLength, // full length to make AccComp container
64 const BDSMagnetOuterInfo* recipe); // geometry recipe
65
66
68 virtual BDSMagnetOuter* CreateSextupole(G4String name, // name
69 G4double length, // length
70 BDSBeamPipe* beamPipe, // beampipe
71 G4double containerLength, // full length to make AccComp container
72 const BDSMagnetOuterInfo* recipe); // geometry recipe
73
75 virtual BDSMagnetOuter* CreateOctupole(G4String name, // name
76 G4double length, // length
77 BDSBeamPipe* beamPipe, // beampipe
78 G4double containerLength, // full length to make AccComp container
79 const BDSMagnetOuterInfo* recipe); // geometry recipe
80
82 virtual BDSMagnetOuter* CreateDecapole(G4String name, // name
83 G4double length, // length
84 BDSBeamPipe* beamPipe, // beampipe
85 G4double containerLength, // full length to make AccComp container
86 const BDSMagnetOuterInfo* recipe); // geometry recipe
87
89 virtual BDSMagnetOuter* CreateSolenoid(G4String name, // name
90 G4double length, // length
91 BDSBeamPipe* beamPipe, // beampipe
92 G4double containerLength, // full length to make AccComp
93 const BDSMagnetOuterInfo* recipe); // geometry recipe
94
96 virtual BDSMagnetOuter* CreateMultipole(G4String name, // name
97 G4double length, // length
98 BDSBeamPipe* beamPipe, // beampipe
99 G4double containerLength, // full length to make AccComp container
100 const BDSMagnetOuterInfo* recipe); // geometry recipe
101
103 virtual BDSMagnetOuter* CreateRfCavity(G4String name, // name
104 G4double length, // length
105 BDSBeamPipe* beamPipe, // beampipe
106 G4double containerLength, // full length to make AccComp container
107 const BDSMagnetOuterInfo* recipe); // geometry recipe
108
110 virtual BDSMagnetOuter* CreateMuonSpoiler(G4String name, // name
111 G4double length, // length
112 BDSBeamPipe* beamPipe, // beampipe
113 G4double containerLength, // full length to make AccComp container
114 const BDSMagnetOuterInfo* recipe); // geometry recipe
115
117 virtual BDSMagnetOuter* CreateKicker(G4String name, // name
118 G4double length, // length [mm]
119 const BDSBeamPipe* beamPipe, // beampipe
120 G4double containerLength, // full length to make AccComp container
121 const BDSMagnetOuterInfo* recipe, // geometry recipe
122 G4bool vertical); // is it a vertical kicker?
123
124private:
126 void CreateCylindricalSolids(G4String name, // name
127 G4double length, // full length
128 const BDSBeamPipe* beamPipe, // beampipe
129 G4double magnetContainerLength, // magnet object container full length
130 G4double boxSize); // full width
131
132 void CreateCylindricalSolidsAngled(G4String name, // name
133 G4double length, // full length
134 const BDSBeamPipe* beamPipe, // beampipe
135 G4double magnetContainerLength, // magnet object container full length
136 G4double boxSize); // full width
137
141 G4double length,
142 const BDSMagnetOuterInfo* recipe);
143
145 void TestInputParameters(const BDSBeamPipe* beamPipe,
146 G4double& horizontalWidthIn);
147
148 G4double magnetContainerRadius;
149};
150
151#endif
A holder class for a piece of beam pipe geometry.
Definition: BDSBeamPipe.hh:45
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...