subroutine hec_beam_ini c c Initialize the procedure of MWPC alignment constants finding. c Here the period dependent variables in the commons /config/ and c /shifts/ can be changed. (see block data beam_data.f) c c If SHIFTX(ipla) or SHIFTY(ipla) is set greater then 1000., then c the corresplonding x- or y-plane ipla will be rejected. c c The two reference chambers, which defines the coordinate system, c can be changed: NRFF and NRFL, by defauld these are the 2nd and 5th chambers. c c SHIFTX/Y(NRFF)=0.0 by defenition. The SHIFTX/Y(NRFL) should be choosen c by such a way that the z_axis would be collinear to the beam direction c (provided y_table=0.0) in some arbitrary (called further reference) run, c which belongs to the period of interest, and fixed to be used for all c the runs of this period. To find these values this program should be run c over the reference run data with SHIFTX/Y(NRFL) initially set to 0.0. The c needed values will be printed in the string: c 'LAST REFERENCE MWPC DISPLACEMENTS: DX=... DY=...' c These values should be assigned to SHIFTX/Y(NRFL) in THIS subroutine. c implicit none c c common for datacard values c include'hec_par.inc' ! shared parameters include'hec_datacard.inc' c c common with MWPC alignment constants c INCLUDE 'hec_beam_sys_cluset.inc' INCLUDE 'hec_beam_sys_clusters.inc' INCLUDE 'hec_beam_sys_config.inc' include 'hec_beam_sys_shifts.inc' c c local variables c c if (irunpd.eq.1) then ! may96 SHIFTX(5)=2.236 ! ref. run #5261 SHIFTY(5)=0.175 ! ref. run #5261 elseif (irunpd.eq.2) then ! july96 SHIFTX(1)=1001. ! MWPC #1 was unoperable in july96 SHIFTY(1)=1001. ! MWPC #1 was unoperable in july96 SHIFTY(4)=1001. ! MWPC-y #4 was unoperable in july96 SHIFTX(5)=1.524 ! ref. run #5573 SHIFTY(5)=-0.056 ! ref. run #5573 elseif (irunpd.eq.3) then ! sept96 SHIFTX(1)=1001. ! MWPC #1 was unoperable in sept96 SHIFTY(1)=1001. ! MWPC #1 was unoperable in sept96 SHIFTX(5)=1.634 ! ref. run #6230 SHIFTY(5)=0.390 ! ref. run #6230 elseif (irunpd.eq.5) then ! may97 print *,' ' print *,' *** MWPCs were not working at this period: irunpd=5' print *,' ' elseif (irunpd.eq.6 ) then ! oct97 ZXPLANE(2)=180. ! new position ZYPLANE(2)=ZXPLANE(2)-3. ! new position ZXPLANE(3)=279. ! new position ZYPLANE(3)=ZXPLANE(3)-3. ! new position ZXPLANE(4)=351. ! new position ZYPLANE(4)=ZXPLANE(4)-3. ! new position ZXPLANE(5)=3092.7 ! new position ZYPLANE(5)=ZXPLANE(5)-2.7 ! new position SHIFTX(1)=1001. ! old MWPC #1 removed SHIFTY(1)=1001. ! old MWPC #1 removed SHIFTX(5)=-0.494 ! ref. run #6699 SHIFTY(5)=-0.476 ! ref. run #6699 elseif (irunpd.eq.7 ) then ! April 98 ZXPLANE(2)=180. ! new position ZYPLANE(2)=ZXPLANE(2)-3. ! new position ZXPLANE(3)=279. ! new position ZYPLANE(3)=ZXPLANE(3)-3. ! new position ZXPLANE(4)=351. ! new position ZYPLANE(4)=ZXPLANE(4)-3. ! new position ZXPLANE(5)=3092.7 ! new position ZYPLANE(5)=ZXPLANE(5)-2.7 ! new position SHIFTX(1)=1001. ! old MWPC #1 removed SHIFTY(1)=1001. ! old MWPC #1 removed SHIFTX(5)=0.261 ! ref. run #7232 SHIFTY(5)=-0.491 ! ref. run #7232 elseif (irunpd .eq. 8) then ! August 98 ZXPLANE(2)=180. ! new position ZYPLANE(2)=ZXPLANE(2)-3.! new position ZXPLANE(3)=279. ! new position ZYPLANE(3)=ZXPLANE(3)-3.! new position ZXPLANE(4)=351. ! new position ZYPLANE(4)=ZXPLANE(4)-3.! new position ZXPLANE(5)=3092.7 ! new position ZYPLANE(5)=ZXPLANE(5)-2.7 ! new position SHIFTX(1)=1001. ! old MWPC #1 removed SHIFTY(1)=1001. ! old MWPC #1 removed SHIFTX(5)=0.343 ! ref. run #7979 SHIFTY(5)=-1.105 ! ref. run #7979 elseif (irunpd .ge. 9) then c c so far this is just a copy of August 1998 settings. c c print *,'WARNING, we need new info in hec_beam_ini.f' ZXPLANE(2)=180. ! new position ZYPLANE(2)=ZXPLANE(2)-3. ! new position ZXPLANE(3)=279. ! new position ZYPLANE(3)=ZXPLANE(3)-3. ! new position ZXPLANE(4)=351. ! new position ZYPLANE(4)=ZXPLANE(4)-3. ! new position ZXPLANE(5)=3092.7 ! new position ZYPLANE(5)=ZXPLANE(5)-2.7 ! new position SHIFTX(1)=1001. ! old MWPC #1 removed SHIFTY(1)=1001. ! old MWPC #1 removed SHIFTX(5)=0.343 ! ref. run #7979 SHIFTY(5)=-1.105 ! ref. run #7979 else print *,' ' print *,' *** To work with MWPC data this period should be ', + 'initialized! irunpd=', irunpd print *,' *** Look subroutine beam_ini !!!' print *,'STOPPING!!!! ' stop endif return end