- description: touschekLifetime computes Touschek lifetime using A. Piwinski’s formula [23, 24]. A longitudinally non-Gaussian distributed bunch lifetime (such as ring with harmonic cavity) can be computed if the bunch profile is inputed through beam option.
- examples:
touschekLifetime aps.life -twiss=aps.twi -aper=aps.aper -part=2e10 -coupling=0.01 -length=6

- synopsis:
touschekLifetime outputFile -twiss=twissFile -aperture=momentumApertureFile [-beam=beamProfile | -sliceAnalysis=filename] -charge=nC|-particles=value {-coupling=value|-emityInput=value} -RF=Voltage=MV,harmonic=value[,limit] | -length=mm [-emitInput=valueInMeters] [-deltaInput=value] [-verbosity=value] [-ignoreMismatch] [-deltaLimit=valueInPercent] [-method=0|1]

- files: outputFile — Contains resulting Touschek lifetime.
- switches:
- -twiss — A twiss parameter file from elegant. You must use the radiation_integrals flag in twiss_output.
- -aperture — A momentum aperture file from elegant. This file can contain a subset of elements of twissFile (for example: only Quadrupole elements). However, the Twiss and momentum aperture files must cover the same beamline. Having one file for a part of beamline (e.g., a few sectors) and one for the entire ring will yield incorrect results.
- -beam — Give beam profile file from elegant2genesis. If this option is given, other input beam parameters are ignored. You can use this option to compute touschek lifetime for a non-Gaussian longitudinally distributed bunch.
- -sliceAnalysis — Give slice analysis file from the SLICE element in elegant. If this option is given, other input beam parameters are ignored. You can use this option to compute touschek lifetime for a non-Gaussian longitudinally distributed bunch.
- -charge, -particles — Give the charge (in nanocoulombs) or the number of electrons.
- -emitInput — Give the initial total emittance in meters (if -coupling is used) or the initial x emittance in meters (if -emityInput is used).. If not specified, the value from the parameter ex0 in twissFile is used.
- -coupling — Give the emittance coupling ratio, ϵ
_{y}∕ϵ_{x}. This is used to compute the horizontal and vertical emittance from the natural emittance. - -emityInput — Give the vertical emittance in meters.
- -deltaInput — Give the initial rms fractional momentum spread. If not specified, the value from the parameter Sdelta0 in twissFile is used.
- -RF=Voltage=MV,harmonic=value[,limit] — Specify rf voltage and harmonic number. The limit qualifier, if given means that the momentum acceptance is limited by the bucket half-height. N.B.: If the data files cover only a portion of the ring, using this option will give incorrect results!
- -length=mm — Specify the rms bunch length. This is an alternative to giving rf parameters.
- -verbosity — If nonzero, program execution information is printed to the standard output.
- -ignoreMismatch — If given, then mismatch of element names between the twiss and momentum aperture files is ignored. May be useful if there are zero-length elements.
- -deltaLimit — Give the maximum value for the momentum aperture, in percent. If not specified, the values in the momentum aperture input file are used, possibly altered by the use of the -RF option with the limit qualifier. If both -deltaLimit and -RF=limit... are given, the smaller is enforced.
- -method — The integral of Piwinski’s formula can be done in two ways. “0” - direct
integral of parameter τ, this method is also used in elegant. 1 - substitute variable τ
with variable k, with τ = tan
^{2}(k). These two methods give you same results.

- Note: If using Pelegant to compute the momentum aperture with output_mode=1, it is necessary to first run the script reorganizeMmap to put the data into the form needed by touschekLifetime.
- author: A. Xiao, ANL/APS.

view3dGeometry