BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSMagnetOuterFactoryLHC.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
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 BDSMAGNETOUTERFACTORYLHC_H
20#define BDSMAGNETOUTERFACTORYLHC_H
21
22#include "BDSMagnetOuterFactoryBase.hh"
23
24#include "globals.hh" // geant4 globals / types
25
26class BDSBeamPipe;
27class G4Material;
28
39{
40private:
42 enum class YokeColour {dipole, kicker};
43public:
44 explicit BDSMagnetOuterFactoryLHC(G4bool isLeftOffset);
46
48 virtual BDSMagnetOuter* CreateSectorBend(G4String name, // name
49 G4double length, // full length [mm]
50 const BDSBeamPipe* beamPipe, // beampipe
51 G4double containerLength, // full length to make AccComp container
52 const BDSMagnetOuterInfo* recipe); // recipe for geometry
53
55 static const G4double beamSeparation;
56private:
59 BDSMagnetOuter* CreateLHCDipole(const G4String& name, // name
60 G4double length, // full length [mm]
61 const BDSBeamPipe* beamPipe, // beampipe
62 G4double containerLength, // full length to make AccComp container
63 const BDSMagnetOuterInfo* recipe, // recipe for geometry
64 YokeColour colourIn);
65public:
67 virtual BDSMagnetOuter* CreateRectangularBend(G4String name, // name
68 G4double length, // full length [mm]
69 const BDSBeamPipe* beamPipe, // beampipe
70 G4double containerLength, // full length to make AccComp container
71 const BDSMagnetOuterInfo* recipe); // recipe for geometry
72
74 virtual BDSMagnetOuter* CreateQuadrupole(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* CreateSextupole(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* CreateOctupole(G4String name, // name
89 G4double length, // length
90 BDSBeamPipe* beamPipe, // beampipe
91 G4double containerLength, // full length to make AccComp container
92 const BDSMagnetOuterInfo* recipe); // geometry recipe
93
95 virtual BDSMagnetOuter* CreateDecapole(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* CreateSolenoid(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* CreateMultipole(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* CreateRfCavity(G4String name, // name
117 G4double length, // length
118 BDSBeamPipe* beamPipe, // beampipe
119 G4double containerLength, // full length to make AccComp container
120 const BDSMagnetOuterInfo* recipe); // geometry recipe
121
123 virtual BDSMagnetOuter* CreateMuonSpoiler(G4String name, // name
124 G4double length, // length
125 BDSBeamPipe* beamPipe, // beampipe
126 G4double containerLength, // full length to make AccComp container
127 const BDSMagnetOuterInfo* recipe); // geometry recipe
128
130 virtual BDSMagnetOuter* CreateKicker(G4String name, // name
131 G4double length, // length
132 const BDSBeamPipe* beamPipe, // beampipe
133 G4double containerLength, // full length to make AccComp container
134 const BDSMagnetOuterInfo* recipe, // geometry recipe
135 G4bool vertical); // is it a vertical kicker?
136
137protected:
138 G4bool isLeftOffset;
139 G4bool IsLeftOffset(){return isLeftOffset;}
140
141private:
143 void TestInputParameters(const BDSBeamPipe* beamPipe,
144 G4double& horizontalWidthIn);
145
147};
148
149#endif
A holder class for a piece of beam pipe geometry.
Definition: BDSBeamPipe.hh:45
Abstract base class for magnet outer volume factories.
The base factory for the LHC magnet geometry factory.
virtual BDSMagnetOuter * CreateRfCavity(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
RF cavity outer volume.
virtual BDSMagnetOuter * CreateSectorBend(G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
sector bend outer volume
static const G4double beamSeparation
Used in many places - make it a constant in the code and put here as most relevant.
virtual BDSMagnetOuter * CreateSolenoid(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
solenoid outer volume
virtual BDSMagnetOuter * CreateMuonSpoiler(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
muon spoiler outer volume
virtual BDSMagnetOuter * CreateDecapole(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
decapole outer volume
YokeColour
Enum up front for yoke colouring.
virtual BDSMagnetOuter * CreateSextupole(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
sextupole outer volume
virtual BDSMagnetOuter * CreateQuadrupole(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
quadrupole outer volume
BDSMagnetOuterFactoryBase * cylindrical
Default factory to fall back to.
virtual BDSMagnetOuter * CreateOctupole(G4String name, G4double length, BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe)
octupole outer volume
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 * CreateKicker(G4String name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe, G4bool vertical)
horizontal and vertical kicker outer volume
BDSMagnetOuter * CreateLHCDipole(const G4String &name, G4double length, const BDSBeamPipe *beamPipe, G4double containerLength, const BDSMagnetOuterInfo *recipe, YokeColour colourIn)
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...