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) 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#include "BDSColours.hh"
19#include "BDSMagnetGeometryType.hh"
20#include "BDSMagnetOuterInfo.hh"
21
22#include "globals.hh"
23#include "G4Colour.hh"
24#include "G4Material.hh"
25
27 name("not_specified"),
28 geometryType(BDSMagnetGeometryType::cylindrical),
29 horizontalWidth(0),
30 outerMaterial(nullptr),
31 innerRadius(1.0),
32 vhRatio(1.0),
33 angleIn(0),
34 angleOut(0),
35 yokeOnLeft(false),
36 hStyle(false),
37 buildEndPieces(true),
38 coilWidthFraction(0.65),
39 coilHeightFraction(0.8),
40 geometryTypeAndPath(""),
41 autoColour(true)
42{
43 colour = BDSColours::Instance()->GetColour("default");
44}
45
47 BDSMagnetGeometryType geometryTypeIn,
48 G4double horizontalWidthIn,
49 G4Material* outerMaterialIn,
50 G4double innerRadiusIn,
51 G4double vhRatioIn,
52 G4double angleInIn,
53 G4double angleOutIn,
54 G4bool yokeOnLeftIn,
55 G4bool hStyleIn,
56 G4bool buildEndPiecesIn,
57 G4double coilWidthFractionIn,
58 G4double coilHeightFractionIn,
59 const G4String& geometryTypeAndPathIn,
60 G4Colour* colourIn,
61 G4bool autoColourIn):
62 name(nameIn),
63 geometryType(geometryTypeIn),
64 horizontalWidth(horizontalWidthIn),
65 outerMaterial(outerMaterialIn),
66 innerRadius(innerRadiusIn),
67 vhRatio(vhRatioIn),
68 angleIn(angleInIn),
69 angleOut(angleOutIn),
70 yokeOnLeft(yokeOnLeftIn),
71 hStyle(hStyleIn),
72 buildEndPieces(buildEndPiecesIn),
73 coilWidthFraction(coilWidthFractionIn),
74 coilHeightFraction(coilHeightFractionIn),
75 geometryTypeAndPath(geometryTypeAndPathIn),
76 colour(colourIn),
77 autoColour(autoColourIn)
78{;}
G4Colour * GetColour(G4double red, G4double green, G4double blue, G4double alpha=1)
Get a cached anonymous colour by values.
static BDSColours * Instance()
singleton pattern
Definition BDSColours.cc:32
BDSMagnetOuterInfo()
default constructor