BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSMagnetOuterInfo.cc
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#include "BDSColours.hh"
20#include "BDSMagnetGeometryType.hh"
21#include "BDSMagnetOuterInfo.hh"
22
23#include "globals.hh"
24#include "G4Colour.hh"
25#include "G4Material.hh"
26
28 name("not_specified"),
29 geometryType(BDSMagnetGeometryType::cylindrical),
30 horizontalWidth(0),
31 outerMaterial(nullptr),
32 innerRadius(1.0),
33 vhRatio(1.0),
34 angleIn(0),
35 angleOut(0),
36 yokeOnLeft(false),
37 hStyle(false),
38 buildEndPieces(true),
39 coilWidthFraction(0.65),
40 coilHeightFraction(0.8),
41 geometryTypeAndPath(""),
42 autoColour(true)
43{
44 colour = BDSColours::Instance()->GetColour("default");
45}
46
48 BDSMagnetGeometryType geometryTypeIn,
49 G4double horizontalWidthIn,
50 G4Material* outerMaterialIn,
51 G4double innerRadiusIn,
52 G4double vhRatioIn,
53 G4double angleInIn,
54 G4double angleOutIn,
55 G4bool yokeOnLeftIn,
56 G4bool hStyleIn,
57 G4bool buildEndPiecesIn,
58 G4double coilWidthFractionIn,
59 G4double coilHeightFractionIn,
60 const G4String& geometryTypeAndPathIn,
61 G4Colour* colourIn,
62 G4bool autoColourIn):
63 name(nameIn),
64 geometryType(geometryTypeIn),
65 horizontalWidth(horizontalWidthIn),
66 outerMaterial(outerMaterialIn),
67 innerRadius(innerRadiusIn),
68 vhRatio(vhRatioIn),
69 angleIn(angleInIn),
70 angleOut(angleOutIn),
71 yokeOnLeft(yokeOnLeftIn),
72 hStyle(hStyleIn),
73 buildEndPieces(buildEndPiecesIn),
74 coilWidthFraction(coilWidthFractionIn),
75 coilHeightFraction(coilHeightFractionIn),
76 geometryTypeAndPath(geometryTypeAndPathIn),
77 colour(colourIn),
78 autoColour(autoColourIn)
79{;}
static BDSColours * Instance()
singleton pattern
Definition: BDSColours.cc:33
G4Colour * GetColour(const G4String &type, G4bool normaliseTo255=true)
Get colour from name.
Definition: BDSColours.cc:204
BDSMagnetOuterInfo()
default constructor