BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSFieldType.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 BDSFIELDTYPE_H
20#define BDSFIELDTYPE_H
21
22#include "BDSTypeSafeEnum.hh"
23#include "globals.hh" // geant4 globals / types
24
37{
38 // we use "bfieldzero" etc instead of "bzero" because "bzero" exists
39 // in strings.h in the macosx system SDK globals
40 enum type {none,
41 bfieldzero, efieldzero, ebfieldzero,
42 teleporter,
43 bmap1d, bmap2d, bmap3d, bmap4d,
44 emap1d, emap2d, emap3d, emap4d,
45 ebmap1d, ebmap2d, ebmap3d, ebmap4d,
46 mokka,
47 solenoid, solenoidsheet,
48 dipole, quadrupole, dipolequadrupole, sextupole,
49 octupole, decapole, multipole, muonspoiler,
50 skewquadrupole, skewsextupole, skewoctupole, skewdecapole,
51 rfpillbox, rfconstantinx, rfconstantiny, rfconstantinz, cavityfringe,
52 rmatrix, paralleltransporter, undulator,
53 dipole3d,
54 multipoleouterdipole, multipoleouterquadrupole,
55 multipoleoutersextupole, multipoleouteroctupole,
56 multipoleouterdecapole,
57 skewmultipoleouterquadrupole, skewmultipoleoutersextupole,
58 skewmultipoleouteroctupole, skewmultipoleouterdecapole,
59 multipoleouterdipole3d,
60 multipoleouterdipolelhc, multipoleouterquadrupolelhc,
61 multipoleoutersextupolelhc
62 };
63};
64
65// NOTE - when adding a new field type:
66// - BDSFieldClassType should also be updated
67// - BDSIntegratorSet::Integrator() should also be updated
68
69// NOTE - also add to manual/source/dev_fields.rst -> Field Names and Parameters
70
72
73namespace BDS
74{
76 BDSFieldType DetermineFieldType(G4String fieldType);
77}
78
79#endif
80
81
Improve type-safety of native enum data type in C++.
Return either G4Tubs or G4CutTubs depending on flat face.
BDSFieldType DetermineFieldType(G4String fieldType)
Function that gives corresponding enum value for string (case-insensitive)
Definition: BDSFieldType.cc:90
Type definition for field formats - used for comparison in factory methods.
Definition: BDSFieldType.hh:37