Skip to content

Commit affed9f

Browse files
author
Michael Ehrlichman
committed
better documentation and headers
1 parent 777a246 commit affed9f

File tree

2 files changed

+166
-7
lines changed

2 files changed

+166
-7
lines changed

bsim/touschek_background/doc/touschek_background.tex

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,164 @@ \section{Input Parameters}
186186
&end
187187
\end{example}
188188
189+
\section{Output Parameters}
190+
Descriptions of output files generated by \vn{touschek_background}.
191+
192+
\subsection{\vn{collimator_profile.out}}
193+
The \vn{.in} files contains a \vn{test_collimator} parameter that is a radius in units meters.
194+
For each element between a location where a Touschek particle is generated and where it is lost,
195+
the program tests if the Touschek particle trajectory exceeds \vn{test_collimator}. If it does,
196+
then the number of particles represented by the Touschek particle is added to running tally kept
197+
at that element.
198+
199+
This data can be used to determine where in the lattice a collimator should be placed so as to capture the most
200+
Touschek particles.
201+
202+
Header:
203+
\begin{verbatim}
204+
# slice location potential N element name
205+
# index (s) caught
206+
\end{verbatim}
207+
208+
\subsection{\vn{energy_deposited_at_s.out}}
209+
Records the amount of energy deposited by Touschek particles colliding with the physical aperture
210+
at each location.
211+
212+
This data can be used to determine radiation backgrounds.
213+
Header:
214+
\begin{verbatim}
215+
# slice location nrg deposited at cumulative
216+
# index (m) slice per bunch nrg
217+
# (eV) (eV)
218+
\end{verbatim}
219+
220+
\subsection{\vn{generation_pipe.out}}
221+
Records the number of Touschek particles generated at each location which are destined
222+
to be lost to colliding with the beampipe, as opposed to those Touschek particles which
223+
are lost due to stopping during deceleration. This distinction is important for energy
224+
recovery linacs.
225+
226+
Header:
227+
\begin{verbatim}
228+
# slice location N generated cumulative N
229+
# index (s) at slice generated
230+
\end{verbatim}
231+
232+
\subsection{\vn{generation_stop.out}}
233+
Records the number of Touschek particles generated at each location which are destined
234+
to be lost to stopping during deceleration, as opposed to those Touschek particles which
235+
are lost due to colliding with the beampipe. This distinction is important for energy
236+
recovery linacs.
237+
238+
Header:
239+
\begin{verbatim}
240+
# slice location N generated cumulative N
241+
# index (s) at slice generated
242+
\end{verbatim}
243+
244+
\subsection{\vn{Npart_striking_pipe_by_s.out}}
245+
Records the number of Touschek particles colliding with the beampipe at each location.
246+
247+
Header:
248+
\begin{verbatim}
249+
# slice location N deposited at cumulative N
250+
# index (s) slice per bunch
251+
\end{verbatim}
252+
253+
\subsection{\vn{Npart_stopping_with_no_energy_by_s.out}}
254+
Records the number of Touschek particles stopping at each slice due deceleration.
255+
256+
Header:
257+
\begin{verbatim}
258+
# slice location N deposited at cumulative N
259+
# index (s) slice per bunch
260+
\end{verbatim}
261+
262+
\subsection{\vn{Npart_total_losses_by_s.out}}
263+
Records the number of Touschek particles lost at each slice, counting
264+
both those particles that stop due to deceleration and those that collide with the
265+
beampipe.
266+
267+
Header:
268+
\begin{verbatim}
269+
# slice location N deposited at cumulative N
270+
# index (s) slice per bunch
271+
\end{verbatim}
272+
273+
\subsection{\vn{physical_aperture_from_track.out}}
274+
The physical apertures in the lattice that was tracked through.
275+
276+
Header:
277+
\begin{verbatim}
278+
# ele location aperture element name
279+
# index (s) radius
280+
\end{verbatim}
281+
282+
\subsection{\vn{raw_rates.out}}
283+
This is the rate of Touschek particles scattered above the positive momentum aperture
284+
and below the negative momentum aperture for each location in the lattice.
285+
It is essentially, the Touschek formula evaluated at the given location
286+
at the momentum aperture for that location.
287+
288+
Header:
289+
\begin{verbatim}
290+
# slice location positive aperture negative aperture
291+
# index (s) rate (N/bunch/sec) rate (N/bunch/sec)
292+
\end{verbatim}
293+
294+
\subsection{\vn{sigma_matrix.out}}
295+
The matrix of second order moments of all the Touschek particles
296+
passing through each location in the lattice.
297+
298+
Header:
299+
\begin{verbatim}
300+
# Slice Location Cov(x,x) Cov(x,px) Cov(x,y) ...
301+
# index m m^2 m m^2 ...
302+
# row number: 1 1 1 ...
303+
# column number: 1 2 3 ...
304+
\end{verbatim}
305+
306+
\subsection{\vn{sigma_p.out}}
307+
The energy spread at each location in the lattice after taking
308+
intrabeam scattering into account.
309+
310+
Header:
311+
\begin{verbatim}
312+
# location sigma_p Total energy
313+
# (s) (dp/p0) (eV)
314+
\end{verbatim}
315+
316+
\subsection{\vn{slice_index_from_track.out}}
317+
The slice index assigned to each location in the lattice that was tracked
318+
through.
319+
320+
Header:
321+
\begin{verbatim}
322+
# slice location element
323+
# index (s) name
324+
\end{verbatim}
325+
326+
\subsection{\vn{touschek_track.details}}
327+
Compiled statistics from the Touschek tracking simulation.
328+
329+
\vn{Halo}: Was halo tracking enabled?\\
330+
\vn{Number of data points:} Number of samples of the Touschek formula per slice.\\
331+
\vn{Number of test particles:} Number of test particles used to represent the \\
332+
distribution of Touschek particles at each slice.\\
333+
\vn{Total Integrated current (\#e-):} Total number of Touschek particles generated.\\
334+
\vn{Beam Pipe Collisions:} Total number of particles lost due to collision \\
335+
with the physical aperture.\\
336+
\vn{Zero Energy in Linac:} Total number of particles lost due to stopping during \\
337+
deceleration.\\
338+
\vn{Energy deposited into beam pipe (eV):} Total energy in eV deposited into the \\
339+
beampipe due by Touschek particles.\\
340+
\vn{Number of test particles:} Total number of test particles generated \\
341+
and tracked.\\
342+
\vn{Number lost to beam pipe:} Number of test particles lost to beam \\
343+
pipe collisions.\\
344+
\vn{Number lost to zero energy:} Number of test particles stopped during \\
345+
deceleration.\\
346+
189347
%------------------------------------------------------------------
190348
191349
\begin{thebibliography}{9}

bsim/touschek_background/touschek_background.f90

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,8 @@ PROGRAM touschek_background
14011401
OPEN(77, FILE="energy_deposited_at_s.out")
14021402
accumulator = 0.
14031403
WRITE(77,'(A61)') "# slice location nrg deposited at cumulative"
1404-
WRITE(77,'(A61)') "# index (s) slice per bunch nrg"
1404+
WRITE(77,'(A61)') "# index (m) slice per bunch nrg"
1405+
WRITE(77,'(A61)') "# (eV) (eV)"
14051406
DO i=slix_lost_start, slix_lost_end
14061407
accumulator = accumulator + energy_deposited_at_slice(i)
14071408
WRITE(77,'(I12,F11.3,2ES19.4)') i, slices(i), energy_deposited_at_slice(i), accumulator
@@ -1460,22 +1461,22 @@ PROGRAM touschek_background
14601461
!- Write generation profile files
14611462
!-----------------------------------------------------------------------
14621463
OPEN(18,FILE="generation_pipe.out")
1463-
WRITE(18,'(A52)') " slice location N generated cumulative N"
1464-
WRITE(18,'(A52)') " index (s) at slice generated"
1464+
WRITE(18,'(A52)') "# slice location N generated cumulative N"
1465+
WRITE(18,'(A52)') "# index (s) at slice generated"
14651466
DO i=slix_prod_start, slix_prod_end
14661467
WRITE(18,'(I11,F11.3,ES15.4,ES15.4)') i, slices(i), generation_at_slice(i)%pipe_this_slice, generation_at_slice(i)%pipe_cumulative
14671468
ENDDO
14681469
CLOSE(18)
14691470
OPEN(19,FILE="generation_stop.out")
1470-
WRITE(19,'(A52)') " slice location N generated cumulative N"
1471-
WRITE(19,'(A52)') " index (s) at slice generated"
1471+
WRITE(19,'(A52)') "# slice location N generated cumulative N"
1472+
WRITE(19,'(A52)') "# index (s) at slice generated"
14721473
DO i=slix_prod_start, slix_prod_end
14731474
WRITE(19,'(I11,F11.3,ES15.4,ES15.4)') i, slices(i), generation_at_slice(i)%stop_this_slice, generation_at_slice(i)%stop_cumulative
14741475
ENDDO
14751476
CLOSE(19)
14761477
OPEN(19,FILE="raw_rates.out")
1477-
WRITE(19,'(A65)') " slice location positive aperture negative aperture"
1478-
WRITE(19,'(A65)') " index (s) rate (N/bunch/sec) rate (N/bunch/sec)"
1478+
WRITE(19,'(A65)') "# slice location positive aperture negative aperture"
1479+
WRITE(19,'(A65)') "# index (s) rate (N/bunch/sec) rate (N/bunch/sec)"
14791480
DO i=slix_prod_start, slix_prod_end
14801481
WRITE(19,'(I9,F12.3,ES22.4E3,ES22.4E3)') i, slices(i), raw_scattering_rates(i,1), raw_scattering_rates(i,2)
14811482
ENDDO

0 commit comments

Comments
 (0)