20#include "BDSIntegratorSet.hh"
21#include "BDSIntegratorSetType.hh"
22#include "BDSIntegratorType.hh"
25#include "G4Version.hh"
54 dipoleQuadrupole(dipoleQuadrupoleIn),
55 quadrupole(quadrupoleIn),
56 sextupole(sextupoleIn),
59 multipoleThick(multipoleThickIn),
60 muonSpoiler(muonSpoilerIn),
61 rfpillbox(rfpillboxIn),
62 rfconstantinx(rfconstantinxIn),
63 rfconstantiny(rfconstantinyIn),
64 rfconstantinz(rfconstantinzIn),
66 skewQuadrupole(skewQuadrupoleIn),
67 skewSextupole(skewSextupoleIn),
68 skewOctupole(skewOctupoleIn),
69 skewDecapole(skewDecapoleIn),
70 dipoleFringe(dipoleFringeIn),
71 multipoleThin(multipoleThinIn),
72 multipoleOuter(multipoleOuterIn),
73 rmatrixThin(rmatrixThinIn),
74 parallelTransporter(parallelTransporterIn),
75 undulator(undulatorIn),
76 cavityFringe(cavityFringeIn)
81 if (dipoleIn == BDSIntegratorType::dipolematrix)
89 BDSIntegratorType::dipolerodrigues,
90 BDSIntegratorType::dipolematrix,
91 BDSIntegratorType::quadrupole,
92 BDSIntegratorType::sextupole,
93 BDSIntegratorType::octupole,
94 BDSIntegratorType::decapole,
95 BDSIntegratorType::g4classicalrk4,
96 BDSIntegratorType::g4classicalrk4,
97 BDSIntegratorType::g4classicalrk4,
98 BDSIntegratorType::g4classicalrk4,
99 BDSIntegratorType::g4classicalrk4,
100 BDSIntegratorType::g4classicalrk4,
101 BDSIntegratorType::g4classicalrk4,
102 BDSIntegratorType::g4classicalrk4,
103 BDSIntegratorType::g4classicalrk4,
104 BDSIntegratorType::g4classicalrk4,
105 BDSIntegratorType::g4classicalrk4,
106 BDSIntegratorType::dipolefringe,
107 BDSIntegratorType::multipolethin,
108 BDSIntegratorType::g4rk4minimumstep,
109 BDSIntegratorType::rmatrixthin,
110 BDSIntegratorType::paralleltransport,
111 BDSIntegratorType::g4classicalrk4,
112 BDSIntegratorType::cavityfringe);
116 BDSIntegratorType::dipolerodrigues2,
117 BDSIntegratorType::dipolematrix,
118 BDSIntegratorType::quadrupole,
119 BDSIntegratorType::euler,
120 BDSIntegratorType::euler,
121 BDSIntegratorType::euler,
122 BDSIntegratorType::g4classicalrk4,
123 BDSIntegratorType::g4classicalrk4,
124 BDSIntegratorType::g4classicalrk4,
125 BDSIntegratorType::g4classicalrk4,
126 BDSIntegratorType::g4classicalrk4,
127 BDSIntegratorType::g4classicalrk4,
128 BDSIntegratorType::g4classicalrk4,
129 BDSIntegratorType::g4classicalrk4,
130 BDSIntegratorType::g4classicalrk4,
131 BDSIntegratorType::g4classicalrk4,
132 BDSIntegratorType::g4classicalrk4,
133 BDSIntegratorType::dipolefringe,
134 BDSIntegratorType::multipolethin,
135 BDSIntegratorType::g4rk4minimumstep,
136 BDSIntegratorType::rmatrixthin,
137 BDSIntegratorType::paralleltransport,
138 BDSIntegratorType::g4classicalrk4,
139 BDSIntegratorType::cavityfringe);
143 BDSIntegratorType::dipolematrix,
144 BDSIntegratorType::dipolematrix,
145 BDSIntegratorType::quadrupole,
146 BDSIntegratorType::euler,
147 BDSIntegratorType::euler,
148 BDSIntegratorType::euler,
149 BDSIntegratorType::g4classicalrk4,
150 BDSIntegratorType::g4classicalrk4,
151 BDSIntegratorType::g4classicalrk4,
152 BDSIntegratorType::g4classicalrk4,
153 BDSIntegratorType::g4classicalrk4,
154 BDSIntegratorType::g4classicalrk4,
155 BDSIntegratorType::g4classicalrk4,
156 BDSIntegratorType::g4classicalrk4,
157 BDSIntegratorType::g4classicalrk4,
158 BDSIntegratorType::g4classicalrk4,
159 BDSIntegratorType::g4classicalrk4,
160 BDSIntegratorType::dipolefringe,
161 BDSIntegratorType::multipolethin,
162 BDSIntegratorType::g4rk4minimumstep,
163 BDSIntegratorType::rmatrixthin,
164 BDSIntegratorType::paralleltransport,
165 BDSIntegratorType::g4classicalrk4,
166 BDSIntegratorType::cavityfringe);
169 BDSIntegratorType::dipolematrix,
170 BDSIntegratorType::dipolematrix,
171 BDSIntegratorType::quadrupole,
172 BDSIntegratorType::euler,
173 BDSIntegratorType::euler,
174 BDSIntegratorType::euler,
175 BDSIntegratorType::g4classicalrk4,
176 BDSIntegratorType::g4classicalrk4,
177 BDSIntegratorType::g4classicalrk4,
178 BDSIntegratorType::g4classicalrk4,
179 BDSIntegratorType::g4classicalrk4,
180 BDSIntegratorType::g4classicalrk4,
181 BDSIntegratorType::g4classicalrk4,
182 BDSIntegratorType::g4classicalrk4,
183 BDSIntegratorType::g4classicalrk4,
184 BDSIntegratorType::g4classicalrk4,
185 BDSIntegratorType::g4classicalrk4,
186 BDSIntegratorType::dipolefringescaling,
187 BDSIntegratorType::multipolethin,
188 BDSIntegratorType::g4rk4minimumstep,
189 BDSIntegratorType::rmatrixthin,
190 BDSIntegratorType::paralleltransport,
191 BDSIntegratorType::g4classicalrk4,
192 BDSIntegratorType::cavityfringe);
195 BDSIntegratorType::g4classicalrk4,
196 BDSIntegratorType::g4classicalrk4,
197 BDSIntegratorType::g4classicalrk4,
198 BDSIntegratorType::g4classicalrk4,
199 BDSIntegratorType::g4classicalrk4,
200 BDSIntegratorType::g4classicalrk4,
201 BDSIntegratorType::g4classicalrk4,
202 BDSIntegratorType::g4classicalrk4,
203 BDSIntegratorType::g4classicalrk4,
204 BDSIntegratorType::g4classicalrk4,
205 BDSIntegratorType::g4classicalrk4,
206 BDSIntegratorType::g4classicalrk4,
207 BDSIntegratorType::g4classicalrk4,
208 BDSIntegratorType::g4classicalrk4,
209 BDSIntegratorType::g4classicalrk4,
210 BDSIntegratorType::g4classicalrk4,
211 BDSIntegratorType::g4classicalrk4,
212 BDSIntegratorType::dipolefringe,
213 BDSIntegratorType::multipolethin,
214 BDSIntegratorType::g4rk4minimumstep,
215 BDSIntegratorType::rmatrixthin,
216 BDSIntegratorType::paralleltransport,
217 BDSIntegratorType::g4classicalrk4,
218 BDSIntegratorType::cavityfringe);
219#if G4VERSION_NUMBER > 1039
222 BDSIntegratorType::g4dormandprince745,
223 BDSIntegratorType::g4dormandprince745,
224 BDSIntegratorType::g4dormandprince745,
225 BDSIntegratorType::g4dormandprince745,
226 BDSIntegratorType::g4dormandprince745,
227 BDSIntegratorType::g4dormandprince745,
228 BDSIntegratorType::g4dormandprince745,
229 BDSIntegratorType::g4dormandprince745,
230 BDSIntegratorType::g4dormandprince745,
231 BDSIntegratorType::g4dormandprince745,
232 BDSIntegratorType::g4dormandprince745,
233 BDSIntegratorType::g4dormandprince745,
234 BDSIntegratorType::g4dormandprince745,
235 BDSIntegratorType::g4dormandprince745,
236 BDSIntegratorType::g4dormandprince745,
237 BDSIntegratorType::g4dormandprince745,
238 BDSIntegratorType::g4dormandprince745,
239 BDSIntegratorType::dipolefringe,
240 BDSIntegratorType::multipolethin,
241 BDSIntegratorType::g4dormandprince745,
242 BDSIntegratorType::rmatrixthin,
243 BDSIntegratorType::paralleltransport,
244 BDSIntegratorType::g4dormandprince745,
245 BDSIntegratorType::cavityfringe);
258 case BDSIntegratorSetType::geant4:
259 {
return BDS::integratorsGeant4;
break;}
260#if G4VERSION_NUMBER > 1039
261 case BDSIntegratorSetType::geant4dp:
262 {
return BDS::integratorsGeant4DP;
break;}
264 case BDSIntegratorSetType::bdsimone:
265 {
return BDS::integratorsBDSIMOne;
break;}
266 case BDSIntegratorSetType::bdsimtwo:
267 {
return BDS::integratorsBDSIMTwo;}
268 case BDSIntegratorSetType::bdsimmatrix:
270 case BDSIntegratorSetType::bdsimmatrixfringescaling:
271 {
return BDS::integratorsBDSIMMatrixFringeScaling;}
273 {
return BDS::integratorsBDSIMOne;
break;}
281 case BDSFieldType::none:
282 {
return general;
break;}
283 case BDSFieldType::bmap1d:
284 case BDSFieldType::bmap2d:
285 case BDSFieldType::bmap3d:
286 case BDSFieldType::bmap4d:
287 case BDSFieldType::ebmap1d:
288 case BDSFieldType::ebmap2d:
289 case BDSFieldType::ebmap3d:
290 case BDSFieldType::ebmap4d:
291 case BDSFieldType::emap1d:
292 case BDSFieldType::emap2d:
293 case BDSFieldType::emap3d:
294 case BDSFieldType::emap4d:
295 case BDSFieldType::mokka:
297 G4cout << __METHOD_NAME__ <<
"WARNING - this is overriding the specified field maps integrator" << G4endl;
301 case BDSFieldType::solenoid:
302 {
return solenoid;
break;}
303 case BDSFieldType::dipole:
304 {
return dipole;
break;}
305 case BDSFieldType::dipolequadrupole:
306 {
return dipoleQuadrupole;
break;}
307 case BDSFieldType::quadrupole:
308 {
return quadrupole;
break;}
309 case BDSFieldType::sextupole:
310 {
return sextupole;
break;}
311 case BDSFieldType::octupole:
312 {
return octupole;
break;}
313 case BDSFieldType::decapole:
314 {
return decapole;
break;}
315 case BDSFieldType::multipole:
316 {
return multipoleThick;
break;}
317 case BDSFieldType::muonspoiler:
318 {
return muonSpoiler;
break;}
319 case BDSFieldType::skewquadrupole:
320 {
return skewQuadrupole;
break;}
321 case BDSFieldType::skewsextupole:
322 {
return skewSextupole;
break;}
323 case BDSFieldType::skewoctupole:
324 {
return skewOctupole;
break;}
325 case BDSFieldType::skewdecapole:
326 {
return skewDecapole;
break;}
327 case BDSFieldType::rfpillbox:
328 {
return rfpillbox;
break;}
329 case BDSFieldType::rfconstantinx:
330 {
return rfconstantinx;
break;}
331 case BDSFieldType::rfconstantiny:
332 {
return rfconstantiny;
break;}
333 case BDSFieldType::rfconstantinz:
334 {
return rfconstantinz;
break;}
335 case BDSFieldType::rmatrix:
336 {
return rmatrixThin;
break;}
337 case BDSFieldType::paralleltransporter:
338 {
return parallelTransporter;
break;}
339 case BDSFieldType::cavityfringe:
340 {
return cavityFringe;
break;}
341 case BDSFieldType::undulator:
342 {
return undulator;
break;}
343 case BDSFieldType::dipole3d:
344 {
return general;
break;}
345 case BDSFieldType::multipoleouterdipole:
346 case BDSFieldType::multipoleouterquadrupole:
347 case BDSFieldType::multipoleoutersextupole:
348 case BDSFieldType::multipoleouteroctupole:
349 case BDSFieldType::multipoleouterdecapole:
350 case BDSFieldType::skewmultipoleouterquadrupole:
351 case BDSFieldType::skewmultipoleoutersextupole:
352 case BDSFieldType::skewmultipoleouteroctupole:
353 case BDSFieldType::skewmultipoleouterdecapole:
354 case BDSFieldType::multipoleouterdipole3d:
355 case BDSFieldType::multipoleouterdipolelhc:
356 case BDSFieldType::multipoleouterquadrupolelhc:
357 case BDSFieldType::multipoleoutersextupolelhc:
358 {
return multipoleOuter;
break;}
360 {
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.