g2_tracking example input files March 18, 2017 Example2 g-2/examples/example2 - Start of tracking is at the hole in the iron. Muon decay and spin tracking are off Muons are tracked until they hit an aperture (mostly defined in lattice file, but occasionally hard coded) The lattice file is bmad_short_kickers_trackers. It includes fiber monitor trackers ! :character string - BMAD format lattice file lat_file_name = 'bmad_short_kickers_trackers.' The muon distribution is read from a file ! : If you choose to read an existing distribution, here is where the name is written. muon_file = 'VDstop_DS_436_12000.dat' ! read the phase space distribution off the target from this file. If blank, use freshly created distribution The distribution assumes some twiss parameters. We extract the twiss parameters from the moments of the distribution. And then rewrite the distribuion so that when it gets to the end of the inflector (or the center) it will have the specified twiss parameters ! :12-real - betax, betay, alphax, alphay, etax, etapx, etay, etapy, phix, phiy, gammax, gammay at inflector twiss = 2.0, 10.0, 0., 0.0, 0.0, 0., 0., 0., 0.7, 0.7, 0., 0. The distribution can be defined at the end of the inflector () or half way through ( : Reference point within inflector for twiss parameters specified in previous line. 'end' = at inflector exit. 'center' = halfway through inflector twiss_ref = 'end' Tracking begins at the start of the injection channel (hole in the magnet iron) or in the ring the end of the inflector Here tracking it will start at the hole. !: logical - if true then start tracking the distribution at the inflector exit, if false, start tracking at end of M5 line start_tracking_at_inflector_exit = F After the distribution is created it can be offset in each of the phase space coordinates Since we are starting tracking in the ring, initial_offsets = 0 places the center of the distribution on the magic radius ! :real - x, y, z, x-angle, y-angle, deltaE/E ! - offset of beam at entrance into the hole in the ring iron, with respect to the tangent through the center of the inflector initial_offsets = -4.7671E-02 0. 0. 2.2134E-02 0. 0. !these are the offsets you need if starting at the hole in the iron The strengths of the three kickers are chosen to steer the muons onto the magic radius. ! : 3 reals - Bfield (T) for the three kicker mangets kicker_params%kicker_field = 326.6e-4 304.8e-4 240.2e-4 ! Kick strength (Tesla) for 989 kick 1.27m kickers Muon spin tracking and decay are off !: logical - if true then include spin tracking of muons. Default = true spin_tracking_on = F !: logical - if true then include muon decay. Default = true muon_decay_on = F Some output is controlled by the following logicals. !: logical - if true write phase space coordinates of each muon to a file at each element on first turn write_phase_space_file = T The average and rms of each of the phase space coordinates computed on each turn is written to 'Beam_moments_tbt.dat' If you want to see how the distribution changes going around the ring, set Then the average and rms, computed at the end of each element, are written to 'Beam_moments_by_element.dat' ! - if true allocate array muon_ele(:,:) to save distribution at each element. To reduce memory requirements - false save_element_by_element_info = F For all the details see the input.dat file Files: input.dat bmad_short_kickers_trackers. Also /g-2/files/pulse_127cm.dat /g-2/magneticfield/ring_inject_bfield3d_wuzheng_extended.dat /g-2/magneticfield/inf_field_alone.dat /g-2/files/KICKER_E989_NoRolledEdges.dat /g-2/files/muons/VDstop_DS_436_12000.dat