BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSMagnetOuterFactoryPolesSquare.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 BDSMAGNETOUTERFACTORYPOLESSQUARE_H
20#define BDSMAGNETOUTERFACTORYPOLESSQUARE_H
21
22#include "BDSMagnetOuterFactoryPolesBase.hh"
23
24#include "globals.hh" // geant4 globals / types
25#include <vector>
26
27class BDSBeamPipe;
28class G4Colour;
29class G4LogicalVolume;
30class G4Material;
31class G4VSolid;
32
46{
47public:
50
51private:
53 virtual void CleanUp();
54
56 void CleanUpPolesSquare();
57
59 virtual void CreateYokeAndContainerSolid(const G4String& name,
60 G4double length,
61 G4int order,
62 G4double magnetContainerLength,
63 G4double magnetContainerRadiusIn);
64
65 virtual void IntersectPoleWithYoke(const G4String& name,
66 G4double length,
67 G4int orderIn);
68
73 virtual void CreateLogicalVolumes(const G4String& name,
74 G4Colour* colour,
75 G4Material* outerMaterial);
76
78 virtual void PlaceComponents(const G4String& name,
79 G4int order);
80
84 virtual BDSMagnetOuter* CommonConstructor(const G4String& name,
85 G4double length,
86 BDSBeamPipe* beamPipe,
87 G4int order,
88 G4double magnetContainerLength,
89 const BDSMagnetOuterInfo* recipe);
90
93 std::vector<G4RotationMatrix*> poleRotations;
94 std::vector<G4VSolid*> poleSolids;
95 std::vector<G4LogicalVolume*> poleLVs;
96
99 G4int order;
100};
101
102#endif
A holder class for a piece of beam pipe geometry.
Definition: BDSBeamPipe.hh:45
Factory class for outer volume of magnets. Produces magnets with 2N-poles around the beampipe with a ...
Factory class for outer volume of magnets.
void CleanUpPolesSquare()
Clean up for this factory. Non-virtual as used in constructor.
virtual void IntersectPoleWithYoke(const G4String &name, G4double length, G4int orderIn)
Chop off the top of the pole to match the appropriate yoke geometry.
virtual BDSMagnetOuter * CommonConstructor(const G4String &name, G4double length, BDSBeamPipe *beamPipe, G4int order, G4double magnetContainerLength, const BDSMagnetOuterInfo *recipe)
virtual void CreateLogicalVolumes(const G4String &name, G4Colour *colour, G4Material *outerMaterial)
std::vector< G4RotationMatrix * > poleRotations
virtual void PlaceComponents(const G4String &name, G4int order)
Place the poles and yoke in the container volume.
virtual void CreateYokeAndContainerSolid(const G4String &name, G4double length, G4int order, G4double magnetContainerLength, G4double magnetContainerRadiusIn)
Create yoke that connects poles and container to put them in.
virtual void CleanUp()
Clean up all memebers used.
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...