BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSMagnetOuterFactoryLHC.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 BDSMAGNETOUTERFACTORYLHC_H
19#define BDSMAGNETOUTERFACTORYLHC_H
20
21#include "BDSMagnetOuterFactoryBase.hh"
22
23#include "globals.hh" // geant4 globals / types
24
25class BDSBeamPipe;
26class G4Material;
27
38{
39private:
41 enum class YokeColour {dipole, kicker};
42public:
43 explicit BDSMagnetOuterFactoryLHC(G4bool isLeftOffset);
45
47 virtual BDSMagnetOuter* CreateSectorBend(G4String name, // name
48 G4double length, // full length [mm]
49 const BDSBeamPipe* beamPipe, // beampipe
50 G4double containerLength, // full length to make AccComp container
51 const BDSMagnetOuterInfo* recipe); // recipe for geometry
52
54 static const G4double beamSeparation;
55private:
58 BDSMagnetOuter* CreateLHCDipole(const G4String& name, // name
59 G4double length, // full length [mm]
60 const BDSBeamPipe* beamPipe, // beampipe
61 G4double containerLength, // full length to make AccComp container
62 const BDSMagnetOuterInfo* recipe, // recipe for geometry
63 YokeColour colourIn);
64public:
66 virtual BDSMagnetOuter* CreateRectangularBend(G4String name, // name
67 G4double length, // full length [mm]
68 const BDSBeamPipe* beamPipe, // beampipe
69 G4double containerLength, // full length to make AccComp container
70 const BDSMagnetOuterInfo* recipe); // recipe for geometry
71
73 virtual BDSMagnetOuter* CreateQuadrupole(G4String name, // name
74 G4double length, // length
75 BDSBeamPipe* beamPipe, // beampipe
76 G4double containerLength, // full length to make AccComp container
77 const BDSMagnetOuterInfo* recipe); // geometry recipe
78
80 virtual BDSMagnetOuter* CreateSextupole(G4String name, // name
81 G4double length, // length
82 BDSBeamPipe* beamPipe, // beampipe
83 G4double containerLength, // full length to make AccComp container
84 const BDSMagnetOuterInfo* recipe); // geometry recipe
85
87 virtual BDSMagnetOuter* CreateOctupole(G4String name, // name
88 G4double length, // length
89 BDSBeamPipe* beamPipe, // beampipe
90 G4double containerLength, // full length to make AccComp container
91 const BDSMagnetOuterInfo* recipe); // geometry recipe
92
94 virtual BDSMagnetOuter* CreateDecapole(G4String name, // name
95 G4double length, // length
96 BDSBeamPipe* beamPipe, // beampipe
97 G4double containerLength, // full length to make AccComp container
98 const BDSMagnetOuterInfo* recipe); // geometry recipe
99
101 virtual BDSMagnetOuter* CreateSolenoid(G4String name, // name
102 G4double length, // length
103 BDSBeamPipe* beamPipe, // beampipe
104 G4double containerLength, // full length to make AccComp container
105 const BDSMagnetOuterInfo* recipe); // geometry recipe
106
108 virtual BDSMagnetOuter* CreateMultipole(G4String name, // name
109 G4double length, // length
110 BDSBeamPipe* beamPipe, // beampipe
111 G4double containerLength, // full length to make AccComp container
112 const BDSMagnetOuterInfo* recipe); // geometry recipe
113
115 virtual BDSMagnetOuter* CreateRfCavity(G4String name, // name
116 G4double length, // length
117 BDSBeamPipe* beamPipe, // beampipe
118 G4double containerLength, // full length to make AccComp container
119 const BDSMagnetOuterInfo* recipe); // geometry recipe
120
122 virtual BDSMagnetOuter* CreateMuonSpoiler(G4String name, // name
123 G4double length, // length
124 BDSBeamPipe* beamPipe, // beampipe
125 G4double containerLength, // full length to make AccComp container
126 const BDSMagnetOuterInfo* recipe); // geometry recipe
127
129 virtual BDSMagnetOuter* CreateKicker(G4String name, // name
130 G4double length, // length
131 const BDSBeamPipe* beamPipe, // beampipe
132 G4double containerLength, // full length to make AccComp container
133 const BDSMagnetOuterInfo* recipe, // geometry recipe
134 G4bool vertical); // is it a vertical kicker?
135
136protected:
137 G4bool isLeftOffset;
138 G4bool IsLeftOffset(){return isLeftOffset;}
139
140private:
142 void TestInputParameters(const BDSBeamPipe* beamPipe,
143 G4double& horizontalWidthIn);
144
146};
147
148#endif
A holder class for a piece of beam pipe geometry.
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...