BUNCH9 This utility examines the bunch structure of a file written in ICOOL for009 format. Usage: > bunch9 Input files: bunch9.inp for009.dat (or equivalent) Output files: bunch9.dat bunch9.f09 bunch9.f03 (1) input files ---------------------------------------------------------- bunch9.inp contains the execution parameters for BUNCH9. fname freq [MHz] plow phigh [GeV/c] nb1 nb2 toff [s] boff [s] fname is either for009.dat written out for a single region or the name of an equivalent file. It is useful to run EXTREG9 to extract the for009 data at a given region, in which case fname would be extreg9.dat. freq is the frequency of the desired bunch train. plow and phigh set momentum limits for the analysis. nb1 and nb2 set the limits for contiguous bunches in a truncated bunch train. toff is a time offset for the start edge of a bunch. boff is a time offset from a half-period for the length of the time bucket. (2) output file bunch9.dat --------------------------------------------------- The program first shifts the start time for the bucket to find setting that maximizes the number of particles per bunch. The default bunchlength is half an rf period. We define a good bunched muon to have not a reference particle iflag=0 (no error) iptyp=2 (muon) plow < p < phigh time located in a periodic bucket in the bunch train A table is output showing the number of good particles and the number of failures for different bunch start times. The following quantities are then computed: NGOOD the maximum number of good bunched muons in the full bunch train NTOTAL number of all initial beam particles FRAC = NGOOD / NTOTAL A table shows statistics about the optimally bunched beam. For each bunch in the train we list summed weight weighted mean momentum error on mean p low value of p high value of p weighted mean helicity error on mean helicity NBOX the number of good, optimally bunched muons inside the momentum cut and in the truncated bunch train. (the individual data corresponding to this is written to the file bunch9.f09) NBEAM all non-electron, good events in the truncated bunch train These events are not required to be in a bunch or the momentum band. The truncated bunch must be shifted to smaller values to calculate this correctly because the momentum cut normally has an effect on this. (the individual data corresponding to this is written to the file bunch9.f03) (3) output file bunch9.f09 --------------------------------------------------- This file contains ICOOL for009 data for optimally bunched particles meeting the following cuts. iflag=0 (no error) iptyp=2 (muon) plow < p < phigh time located in a periodic bucket in the bunch train bunch train number: nb1 < nb < nb2 (4) output file bunch9.f03 --------------------------------------------------- This file contains ICOOL for003 data for optimally bunched particles meeting the following cuts. iflag=0 (no error) not an electron bunch train number: nb1 < nb < nb2