20#include "BDSIntegratorSet.hh"
21#include "BDSIntegratorSetType.hh"
22#include "BDSIntegratorType.hh"
25#include "G4Version.hh"
55 dipoleQuadrupole(dipoleQuadrupoleIn),
56 quadrupole(quadrupoleIn),
57 sextupole(sextupoleIn),
60 multipoleThick(multipoleThickIn),
61 muonSpoiler(muonSpoilerIn),
62 rfpillbox(rfpillboxIn),
63 rfconstantinx(rfconstantinxIn),
64 rfconstantiny(rfconstantinyIn),
65 rfconstantinz(rfconstantinzIn),
67 skewQuadrupole(skewQuadrupoleIn),
68 skewSextupole(skewSextupoleIn),
69 skewOctupole(skewOctupoleIn),
70 skewDecapole(skewDecapoleIn),
71 dipoleFringe(dipoleFringeIn),
72 multipoleThin(multipoleThinIn),
73 multipoleOuter(multipoleOuterIn),
74 rmatrixThin(rmatrixThinIn),
75 parallelTransporter(parallelTransporterIn),
76 undulator(undulatorIn),
77 cavityFringe(cavityFringeIn),
78 gaborLens(gaborLensIn)
83 if (dipoleIn == BDSIntegratorType::dipolematrix)
91 BDSIntegratorType::dipolerodrigues,
92 BDSIntegratorType::dipolematrix,
93 BDSIntegratorType::quadrupole,
94 BDSIntegratorType::sextupole,
95 BDSIntegratorType::octupole,
96 BDSIntegratorType::decapole,
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::g4classicalrk4,
107 BDSIntegratorType::g4classicalrk4,
108 BDSIntegratorType::dipolefringe,
109 BDSIntegratorType::multipolethin,
110 BDSIntegratorType::g4rk4minimumstep,
111 BDSIntegratorType::rmatrixthin,
112 BDSIntegratorType::paralleltransport,
113 BDSIntegratorType::g4classicalrk4,
114 BDSIntegratorType::cavityfringe,
115 BDSIntegratorType::g4classicalrk4);
119 BDSIntegratorType::dipolerodrigues2,
120 BDSIntegratorType::dipolematrix,
121 BDSIntegratorType::quadrupole,
122 BDSIntegratorType::euler,
123 BDSIntegratorType::euler,
124 BDSIntegratorType::euler,
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::g4classicalrk4,
134 BDSIntegratorType::g4classicalrk4,
135 BDSIntegratorType::g4classicalrk4,
136 BDSIntegratorType::dipolefringe,
137 BDSIntegratorType::multipolethin,
138 BDSIntegratorType::g4rk4minimumstep,
139 BDSIntegratorType::rmatrixthin,
140 BDSIntegratorType::paralleltransport,
141 BDSIntegratorType::g4classicalrk4,
142 BDSIntegratorType::cavityfringe,
143 BDSIntegratorType::g4classicalrk4);
147 BDSIntegratorType::dipolematrix,
148 BDSIntegratorType::dipolematrix,
149 BDSIntegratorType::quadrupole,
150 BDSIntegratorType::euler,
151 BDSIntegratorType::euler,
152 BDSIntegratorType::euler,
153 BDSIntegratorType::g4classicalrk4,
154 BDSIntegratorType::g4classicalrk4,
155 BDSIntegratorType::g4classicalrk4,
156 BDSIntegratorType::g4classicalrk4,
157 BDSIntegratorType::g4classicalrk4,
158 BDSIntegratorType::g4classicalrk4,
159 BDSIntegratorType::g4classicalrk4,
160 BDSIntegratorType::g4classicalrk4,
161 BDSIntegratorType::g4classicalrk4,
162 BDSIntegratorType::g4classicalrk4,
163 BDSIntegratorType::g4classicalrk4,
164 BDSIntegratorType::dipolefringe,
165 BDSIntegratorType::multipolethin,
166 BDSIntegratorType::g4rk4minimumstep,
167 BDSIntegratorType::rmatrixthin,
168 BDSIntegratorType::paralleltransport,
169 BDSIntegratorType::g4classicalrk4,
170 BDSIntegratorType::cavityfringe,
171 BDSIntegratorType::g4classicalrk4);
174 BDSIntegratorType::dipolematrix,
175 BDSIntegratorType::dipolematrix,
176 BDSIntegratorType::quadrupole,
177 BDSIntegratorType::euler,
178 BDSIntegratorType::euler,
179 BDSIntegratorType::euler,
180 BDSIntegratorType::g4classicalrk4,
181 BDSIntegratorType::g4classicalrk4,
182 BDSIntegratorType::g4classicalrk4,
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::dipolefringescaling,
192 BDSIntegratorType::multipolethin,
193 BDSIntegratorType::g4rk4minimumstep,
194 BDSIntegratorType::rmatrixthin,
195 BDSIntegratorType::paralleltransport,
196 BDSIntegratorType::g4classicalrk4,
197 BDSIntegratorType::cavityfringe,
198 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::g4classicalrk4,
213 BDSIntegratorType::g4classicalrk4,
214 BDSIntegratorType::g4classicalrk4,
215 BDSIntegratorType::g4classicalrk4,
216 BDSIntegratorType::g4classicalrk4,
217 BDSIntegratorType::g4classicalrk4,
218 BDSIntegratorType::dipolefringe,
219 BDSIntegratorType::multipolethin,
220 BDSIntegratorType::g4rk4minimumstep,
221 BDSIntegratorType::rmatrixthin,
222 BDSIntegratorType::paralleltransport,
223 BDSIntegratorType::g4classicalrk4,
224 BDSIntegratorType::cavityfringe,
225 BDSIntegratorType::g4classicalrk4);
226#if G4VERSION_NUMBER > 1039
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::g4dormandprince745,
240 BDSIntegratorType::g4dormandprince745,
241 BDSIntegratorType::g4dormandprince745,
242 BDSIntegratorType::g4dormandprince745,
243 BDSIntegratorType::g4dormandprince745,
244 BDSIntegratorType::g4dormandprince745,
245 BDSIntegratorType::g4dormandprince745,
246 BDSIntegratorType::dipolefringe,
247 BDSIntegratorType::multipolethin,
248 BDSIntegratorType::g4dormandprince745,
249 BDSIntegratorType::rmatrixthin,
250 BDSIntegratorType::paralleltransport,
251 BDSIntegratorType::g4dormandprince745,
252 BDSIntegratorType::cavityfringe,
253 BDSIntegratorType::g4classicalrk4);
266 case BDSIntegratorSetType::geant4:
267 {
return BDS::integratorsGeant4;
break;}
268#if G4VERSION_NUMBER > 1039
269 case BDSIntegratorSetType::geant4dp:
270 {
return BDS::integratorsGeant4DP;
break;}
272 case BDSIntegratorSetType::bdsimone:
273 {
return BDS::integratorsBDSIMOne;
break;}
274 case BDSIntegratorSetType::bdsimtwo:
275 {
return BDS::integratorsBDSIMTwo;}
276 case BDSIntegratorSetType::bdsimmatrix:
278 case BDSIntegratorSetType::bdsimmatrixfringescaling:
279 {
return BDS::integratorsBDSIMMatrixFringeScaling;}
281 {
return BDS::integratorsBDSIMOne;
break;}
289 case BDSFieldType::none:
290 {
return general;
break;}
291 case BDSFieldType::bmap1d:
292 case BDSFieldType::bmap2d:
293 case BDSFieldType::bmap3d:
294 case BDSFieldType::bmap4d:
295 case BDSFieldType::ebmap1d:
296 case BDSFieldType::ebmap2d:
297 case BDSFieldType::ebmap3d:
298 case BDSFieldType::ebmap4d:
299 case BDSFieldType::emap1d:
300 case BDSFieldType::emap2d:
301 case BDSFieldType::emap3d:
302 case BDSFieldType::emap4d:
303 case BDSFieldType::mokka:
305 G4cout << __METHOD_NAME__ <<
"WARNING - this is overriding the specified field maps integrator" << G4endl;
309 case BDSFieldType::solenoid:
310 {
return solenoid;
break;}
311 case BDSFieldType::dipole:
312 {
return dipole;
break;}
313 case BDSFieldType::dipolequadrupole:
314 {
return dipoleQuadrupole;
break;}
315 case BDSFieldType::quadrupole:
316 {
return quadrupole;
break;}
317 case BDSFieldType::sextupole:
318 {
return sextupole;
break;}
319 case BDSFieldType::octupole:
320 {
return octupole;
break;}
321 case BDSFieldType::decapole:
322 {
return decapole;
break;}
323 case BDSFieldType::multipole:
324 {
return multipoleThick;
break;}
325 case BDSFieldType::muonspoiler:
326 {
return muonSpoiler;
break;}
327 case BDSFieldType::skewquadrupole:
328 {
return skewQuadrupole;
break;}
329 case BDSFieldType::skewsextupole:
330 {
return skewSextupole;
break;}
331 case BDSFieldType::skewoctupole:
332 {
return skewOctupole;
break;}
333 case BDSFieldType::skewdecapole:
334 {
return skewDecapole;
break;}
335 case BDSFieldType::rfpillbox:
336 {
return rfpillbox;
break;}
337 case BDSFieldType::rfconstantinx:
338 {
return rfconstantinx;
break;}
339 case BDSFieldType::rfconstantiny:
340 {
return rfconstantiny;
break;}
341 case BDSFieldType::rfconstantinz:
342 {
return rfconstantinz;
break;}
343 case BDSFieldType::rmatrix:
344 {
return rmatrixThin;
break;}
345 case BDSFieldType::paralleltransporter:
346 {
return parallelTransporter;
break;}
347 case BDSFieldType::cavityfringe:
348 {
return cavityFringe;
break;}
349 case BDSFieldType::gaborlens:
350 {
return gaborLens;
break;}
351 case BDSFieldType::undulator:
352 {
return undulator;
break;}
353 case BDSFieldType::dipole3d:
354 {
return general;
break;}
355 case BDSFieldType::multipoleouterdipole:
356 case BDSFieldType::multipoleouterquadrupole:
357 case BDSFieldType::multipoleoutersextupole:
358 case BDSFieldType::multipoleouteroctupole:
359 case BDSFieldType::multipoleouterdecapole:
360 case BDSFieldType::skewmultipoleouterquadrupole:
361 case BDSFieldType::skewmultipoleoutersextupole:
362 case BDSFieldType::skewmultipoleouteroctupole:
363 case BDSFieldType::skewmultipoleouterdecapole:
364 case BDSFieldType::multipoleouterdipole3d:
365 case BDSFieldType::multipoleouterdipolelhc:
366 case BDSFieldType::multipoleouterquadrupolelhc:
367 case BDSFieldType::multipoleoutersextupolelhc:
368 {
return multipoleOuter;
break;}
370 {
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.