You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xfields/beam_elements/beambeam3dpic.py
+27-27Lines changed: 27 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,13 @@
5
5
6
6
importnumpyasnp
7
7
fromscipy.constantsimporteasqe
8
-
fromscipy.constantsimportcasclight
9
8
10
9
importxobjectsasxo
11
10
importxtrackasxt
12
-
importpickleaspkl
13
-
14
-
from ..generalimport_pkg_root
15
-
from .beambeam3dimport_init_alpha_phi
16
11
fromxfieldsimportTriLinearInterpolatedFieldMap
12
+
from .beambeam3dimport_init_alpha_phi
13
+
from ..generalimport_pkg_root
14
+
17
15
18
16
classBeamstrahlungTable(xo.HybridClass):
19
17
"""
@@ -30,7 +28,7 @@ class BeamstrahlungTable(xo.HybridClass):
30
28
particle_id: [1] array index in the xpart.Particles object of the primary macroparticle emitting the photon
31
29
primary_energy: [eV] total energy of primary macroparticle before emission of this photon
32
30
photon_id: [1] counter for photons emitted from the same primary in the same collision with a single slice
33
-
photon_energy: [eV] total energy of a beamstrahlung photon
31
+
photon_energy: [eV] total energy of a beamstrahlung photon
34
32
photon_critical_energy (with quantum BS only): [eV] critical energy of a beamstrahlung photon
35
33
rho_inv (with quantum BS only): [m^-1] (Fr/dz) inverse bending radius of the primary macroparticle
36
34
"""
@@ -44,7 +42,7 @@ class BeamstrahlungTable(xo.HybridClass):
44
42
'photon_energy': xo.Float64[:],
45
43
'photon_critical_energy': xo.Float64[:],
46
44
'rho_inv': xo.Float64[:],
47
-
}
45
+
}
48
46
49
47
classLumiTable(xo.HybridClass):
50
48
"""
@@ -61,24 +59,23 @@ class LumiTable(xo.HybridClass):
61
59
luminosity: [m^-2] integrated luminosity per bunch crossing for one turn, obtained from the charge density grid. Turn by turn lumi. This is overwritten at every call.
62
60
"""
63
61
_xofields= {
64
-
'_index': xt.RecordIndex,
65
-
'at_turn': xo.Int64[:],
66
-
'at_element': xo.Int64[:], #size: n_turns
67
-
'luminosity': xo.Float64[:], #size: n_turns
68
-
}
62
+
'_index': xt.RecordIndex,
63
+
'at_turn': xo.Int64[:],
64
+
'at_element': xo.Int64[:], #size: n_turns
65
+
'luminosity': xo.Float64[:], #size: n_turns
66
+
}
69
67
70
68
# currently not possible to have a record table with elements of different size so lumigrid is an attribute
71
69
72
70
classBeamBeamPIC3DRecord(xo.HybridClass):
73
71
_xofields= {
74
72
'beamstrahlungtable': BeamstrahlungTable,
75
73
'lumitable': LumiTable,
76
-
}
74
+
}
77
75
78
76
classBeamBeamPIC3D(xt.BeamElement):
79
77
80
78
_xofields= {
81
-
82
79
'_sin_phi': xo.Float64,
83
80
'_cos_phi': xo.Float64,
84
81
'_tan_phi': xo.Float64,
@@ -112,7 +109,7 @@ class BeamBeamPIC3D(xt.BeamElement):
0 commit comments