20#include "BDSIntegratorSet.hh"
21#include "BDSIntegratorSetType.hh"
22#include "BDSIntegratorType.hh"
25#include "G4Version.hh"
52 dipoleQuadrupole(dipoleQuadrupoleIn),
53 quadrupole(quadrupoleIn),
54 sextupole(sextupoleIn),
57 multipoleThick(multipoleThickIn),
58 muonSpoiler(muonSpoilerIn),
62 skewQuadrupole(skewQuadrupoleIn),
63 skewSextupole(skewSextupoleIn),
64 skewOctupole(skewOctupoleIn),
65 skewDecapole(skewDecapoleIn),
66 dipoleFringe(dipoleFringeIn),
67 multipoleThin(multipoleThinIn),
68 multipoleOuter(multipoleOuterIn),
69 rmatrixThin(rmatrixThinIn),
70 parallelTransporter(parallelTransporterIn),
71 undulator(undulatorIn),
72 cavityFringe(cavityFringeIn)
77 if (dipoleIn == BDSIntegratorType::dipolematrix)
85 BDSIntegratorType::dipolerodrigues,
86 BDSIntegratorType::dipolematrix,
87 BDSIntegratorType::quadrupole,
88 BDSIntegratorType::sextupole,
89 BDSIntegratorType::octupole,
90 BDSIntegratorType::decapole,
91 BDSIntegratorType::g4classicalrk4,
92 BDSIntegratorType::g4classicalrk4,
93 BDSIntegratorType::g4classicalrk4,
94 BDSIntegratorType::g4classicalrk4,
95 BDSIntegratorType::g4classicalrk4,
96 BDSIntegratorType::g4classicalrk4,
97 BDSIntegratorType::g4classicalrk4,
98 BDSIntegratorType::g4classicalrk4,
99 BDSIntegratorType::g4classicalrk4,
100 BDSIntegratorType::dipolefringe,
101 BDSIntegratorType::multipolethin,
102 BDSIntegratorType::g4rk4minimumstep,
103 BDSIntegratorType::rmatrixthin,
104 BDSIntegratorType::paralleltransport,
105 BDSIntegratorType::g4classicalrk4,
106 BDSIntegratorType::cavityfringe);
110 BDSIntegratorType::dipolerodrigues2,
111 BDSIntegratorType::dipolematrix,
112 BDSIntegratorType::quadrupole,
113 BDSIntegratorType::euler,
114 BDSIntegratorType::euler,
115 BDSIntegratorType::euler,
116 BDSIntegratorType::g4classicalrk4,
117 BDSIntegratorType::g4classicalrk4,
118 BDSIntegratorType::g4classicalrk4,
119 BDSIntegratorType::g4classicalrk4,
120 BDSIntegratorType::g4classicalrk4,
121 BDSIntegratorType::g4classicalrk4,
122 BDSIntegratorType::g4classicalrk4,
123 BDSIntegratorType::g4classicalrk4,
124 BDSIntegratorType::g4classicalrk4,
125 BDSIntegratorType::dipolefringe,
126 BDSIntegratorType::multipolethin,
127 BDSIntegratorType::g4rk4minimumstep,
128 BDSIntegratorType::rmatrixthin,
129 BDSIntegratorType::paralleltransport,
130 BDSIntegratorType::g4classicalrk4,
131 BDSIntegratorType::cavityfringe);
135 BDSIntegratorType::dipolematrix,
136 BDSIntegratorType::dipolematrix,
137 BDSIntegratorType::quadrupole,
138 BDSIntegratorType::euler,
139 BDSIntegratorType::euler,
140 BDSIntegratorType::euler,
141 BDSIntegratorType::g4classicalrk4,
142 BDSIntegratorType::g4classicalrk4,
143 BDSIntegratorType::g4classicalrk4,
144 BDSIntegratorType::g4classicalrk4,
145 BDSIntegratorType::g4classicalrk4,
146 BDSIntegratorType::g4classicalrk4,
147 BDSIntegratorType::g4classicalrk4,
148 BDSIntegratorType::g4classicalrk4,
149 BDSIntegratorType::g4classicalrk4,
150 BDSIntegratorType::dipolefringe,
151 BDSIntegratorType::multipolethin,
152 BDSIntegratorType::g4rk4minimumstep,
153 BDSIntegratorType::rmatrixthin,
154 BDSIntegratorType::paralleltransport,
155 BDSIntegratorType::g4classicalrk4,
156 BDSIntegratorType::cavityfringe);
159 BDSIntegratorType::dipolematrix,
160 BDSIntegratorType::dipolematrix,
161 BDSIntegratorType::quadrupole,
162 BDSIntegratorType::euler,
163 BDSIntegratorType::euler,
164 BDSIntegratorType::euler,
165 BDSIntegratorType::g4classicalrk4,
166 BDSIntegratorType::g4classicalrk4,
167 BDSIntegratorType::g4classicalrk4,
168 BDSIntegratorType::g4classicalrk4,
169 BDSIntegratorType::g4classicalrk4,
170 BDSIntegratorType::g4classicalrk4,
171 BDSIntegratorType::g4classicalrk4,
172 BDSIntegratorType::g4classicalrk4,
173 BDSIntegratorType::g4classicalrk4,
174 BDSIntegratorType::dipolefringescaling,
175 BDSIntegratorType::multipolethin,
176 BDSIntegratorType::g4rk4minimumstep,
177 BDSIntegratorType::rmatrixthin,
178 BDSIntegratorType::paralleltransport,
179 BDSIntegratorType::g4classicalrk4,
180 BDSIntegratorType::cavityfringe);
183 BDSIntegratorType::g4classicalrk4,
184 BDSIntegratorType::g4classicalrk4,
185 BDSIntegratorType::g4classicalrk4,
186 BDSIntegratorType::g4classicalrk4,
187 BDSIntegratorType::g4classicalrk4,
188 BDSIntegratorType::g4classicalrk4,
189 BDSIntegratorType::g4classicalrk4,
190 BDSIntegratorType::g4classicalrk4,
191 BDSIntegratorType::g4classicalrk4,
192 BDSIntegratorType::g4classicalrk4,
193 BDSIntegratorType::g4classicalrk4,
194 BDSIntegratorType::g4classicalrk4,
195 BDSIntegratorType::g4classicalrk4,
196 BDSIntegratorType::g4classicalrk4,
197 BDSIntegratorType::g4classicalrk4,
198 BDSIntegratorType::dipolefringe,
199 BDSIntegratorType::multipolethin,
200 BDSIntegratorType::g4rk4minimumstep,
201 BDSIntegratorType::rmatrixthin,
202 BDSIntegratorType::paralleltransport,
203 BDSIntegratorType::g4classicalrk4,
204 BDSIntegratorType::cavityfringe);
205#if G4VERSION_NUMBER > 1039
208 BDSIntegratorType::g4dormandprince745,
209 BDSIntegratorType::g4dormandprince745,
210 BDSIntegratorType::g4dormandprince745,
211 BDSIntegratorType::g4dormandprince745,
212 BDSIntegratorType::g4dormandprince745,
213 BDSIntegratorType::g4dormandprince745,
214 BDSIntegratorType::g4dormandprince745,
215 BDSIntegratorType::g4dormandprince745,
216 BDSIntegratorType::g4dormandprince745,
217 BDSIntegratorType::g4dormandprince745,
218 BDSIntegratorType::g4dormandprince745,
219 BDSIntegratorType::g4dormandprince745,
220 BDSIntegratorType::g4dormandprince745,
221 BDSIntegratorType::g4dormandprince745,
222 BDSIntegratorType::g4dormandprince745,
223 BDSIntegratorType::dipolefringe,
224 BDSIntegratorType::multipolethin,
225 BDSIntegratorType::g4dormandprince745,
226 BDSIntegratorType::rmatrixthin,
227 BDSIntegratorType::paralleltransport,
228 BDSIntegratorType::g4dormandprince745,
229 BDSIntegratorType::cavityfringe);
242 case BDSIntegratorSetType::geant4:
243 {
return BDS::integratorsGeant4;
break;}
244#if G4VERSION_NUMBER > 1039
245 case BDSIntegratorSetType::geant4dp:
246 {
return BDS::integratorsGeant4DP;
break;}
248 case BDSIntegratorSetType::bdsimone:
249 {
return BDS::integratorsBDSIMOne;
break;}
250 case BDSIntegratorSetType::bdsimtwo:
251 {
return BDS::integratorsBDSIMTwo;}
252 case BDSIntegratorSetType::bdsimmatrix:
254 case BDSIntegratorSetType::bdsimmatrixfringescaling:
255 {
return BDS::integratorsBDSIMMatrixFringeScaling;}
257 {
return BDS::integratorsBDSIMOne;
break;}
265 case BDSFieldType::none:
266 {
return general;
break;}
267 case BDSFieldType::bmap1d:
268 case BDSFieldType::bmap2d:
269 case BDSFieldType::bmap3d:
270 case BDSFieldType::bmap4d:
271 case BDSFieldType::ebmap1d:
272 case BDSFieldType::ebmap2d:
273 case BDSFieldType::ebmap3d:
274 case BDSFieldType::ebmap4d:
275 case BDSFieldType::emap1d:
276 case BDSFieldType::emap2d:
277 case BDSFieldType::emap3d:
278 case BDSFieldType::emap4d:
279 case BDSFieldType::mokka:
281 G4cout << __METHOD_NAME__ <<
"WARNING - this is overriding the specified field maps integrator" << G4endl;
285 case BDSFieldType::solenoid:
286 {
return solenoid;
break;}
287 case BDSFieldType::dipole:
288 {
return dipole;
break;}
289 case BDSFieldType::dipolequadrupole:
290 {
return dipoleQuadrupole;
break;}
291 case BDSFieldType::quadrupole:
292 {
return quadrupole;
break;}
293 case BDSFieldType::sextupole:
294 {
return sextupole;
break;}
295 case BDSFieldType::octupole:
296 {
return octupole;
break;}
297 case BDSFieldType::decapole:
298 {
return decapole;
break;}
299 case BDSFieldType::multipole:
300 {
return multipoleThick;
break;}
301 case BDSFieldType::muonspoiler:
302 {
return muonSpoiler;
break;}
303 case BDSFieldType::skewquadrupole:
304 {
return skewQuadrupole;
break;}
305 case BDSFieldType::skewsextupole:
306 {
return skewSextupole;
break;}
307 case BDSFieldType::skewoctupole:
308 {
return skewOctupole;
break;}
309 case BDSFieldType::skewdecapole:
310 {
return skewDecapole;
break;}
311 case BDSFieldType::rfcavity:
312 {
return rfcavity;
break;}
313 case BDSFieldType::rf:
315 case BDSFieldType::rmatrix:
316 {
return rmatrixThin;
break;}
317 case BDSFieldType::paralleltransporter:
318 {
return parallelTransporter;
break;}
319 case BDSFieldType::cavityfringe:
320 {
return cavityFringe;
break;}
321 case BDSFieldType::undulator:
322 {
return undulator;
break;}
323 case BDSFieldType::dipole3d:
324 {
return general;
break;}
325 case BDSFieldType::multipoleouterdipole:
326 case BDSFieldType::multipoleouterquadrupole:
327 case BDSFieldType::multipoleoutersextupole:
328 case BDSFieldType::multipoleouteroctupole:
329 case BDSFieldType::multipoleouterdecapole:
330 case BDSFieldType::skewmultipoleouterquadrupole:
331 case BDSFieldType::skewmultipoleoutersextupole:
332 case BDSFieldType::skewmultipoleouteroctupole:
333 case BDSFieldType::skewmultipoleouterdecapole:
334 case BDSFieldType::multipoleouterdipole3d:
335 case BDSFieldType::multipoleouterdipolelhc:
336 case BDSFieldType::multipoleouterquadrupolelhc:
337 case BDSFieldType::multipoleoutersextupolelhc:
338 {
return multipoleOuter;
break;}
340 {
return general;
break;}
Which integrator to use for each type of magnet / field object.
BDSIntegratorType Integrator(const BDSFieldType field) const
Get appropriate integrator based on the field type.
type underlying() const
return underlying value (can be used in switch statement)
Return either G4Tubs or G4CutTubs depending on flat face.
const BDSIntegratorSet * IntegratorSet(G4String set)
Return the appropriate set of integrators to use for each magnet type.
BDSIntegratorSetType DetermineIntegratorSetType(G4String integratorSet)
Function that gives corresponding enum value for string (case-insensitive)
const BDSIntegratorSet * integratorsBDSIMMatrix
Mad-x style tracking.