+PATCH,$CORR. +DECK,CORR1. Updates version: 1.28/00 to 1.28/04 +REP,*TITLE*,TITLE,0-1. &TITLE. CBOFF 1.28/04 22/06/95 18.06.30 SE +REP,$VERSION,V1_28,1-4. *CMZU: 1.28/04 22/06/95 18.06.31 by Christian Voelcker *CMZ : 1.28/03 22/06/95 10.48.32 by Christian Voelcker *CMZ : 1.28/02 19/06/95 10.52.08 by Christian Voelcker *CMZ : 1.28/01 16/06/95 18.46.59 by Christian Voelcker *CMZ : 1.28/00 10/06/95 01.26.56 by Christian Voelcker *-- Author : Christian Voelcker 10/06/95 * *::> VERSION 1.28/04 22/06/95 18.06.30 * three more logical arrays in /TCSVRA/ common * *::> VERSION 1.28/03 22/06/95 10.48.31 * common block CBLINK changed!! * the three links LRVTX, LRSVX, LTVXT and its * zebra divisions IXRVTX, IXRSVX, IXTVXT * *::> VERSION 1.28/02 19/06/95 10.52.07 * extended character array ERMSG in CBINIT to 80 * *::> VERSION 1.28/01 16/06/95 18.46.59 * number of down links for raw data bank was not increased. * IBANK=18 (was 16) in zbinit, since we have two new banks! * *::> VERSION 1.28/00 10/06/95 01.26.54 +REP,COMMCB,CBCOMMON,1-23. *CMZU: 1.28/03 22/06/95 10.48.26 by Christian Voelcker *CMZU: 1.28/00 10/06/95 00.21.02 by Christian Voelcker *CMZU: 1.27/00 01/04/95 22.14.25 by Christian Voelcker *CMZU: 1.25/03 14/09/94 13.20.53 by Christian Voelcker *CMZ : 1.25/02 21/07/94 13.52.09 by Christian Voelcker *CMZ : 1.25/01 20/07/94 18.29.44 by Christian Voelcker *CMZ : 1.23/10 01/07/94 20.37.20 by Curtis A. Meyer *CMZ : 1.23/09 30/06/94 18.05.07 by Michael Doser *CMZU: 1.23/06 02/03/94 17.16.37 by Curtis A. Meyer *CMZU: 1.23/04 13/01/94 11.39.22 by Curtis A. Meyer *CMZU: 1.22/00 17/11/92 11.57.33 by Michael Doser *CMZU: 1.21/00 03/07/92 11.56.45 by Michael Doser *CMZ : 1.20/12 04/06/92 14.59.01 by Gunter Folger *CMZ : 1.20/07 13/03/92 16.34.13 by Michael Doser *CMZU: 1.20/04 01/12/91 14.02.38 by Curtis A. Meyer *CMZ : 1.20/00 20/11/91 16.54.46 by Gunter Folger *CMZ : 1.19/03 11/10/91 14.01.59 by Gunter Folger *CMZ : 1.19/00 20/09/91 13.37.58 by Gunter Folger *CMZU: 1.18/08 20/06/91 16.41.05 by Gunter Folger *CMZ : 1.17/00 02/04/91 13.28.59 by Gunter Folger *CMZU: 1.16/07 30/01/91 14.50.38 by Gunter Folger *CMZ : 1.15/05 04/12/90 12.29.46 by Gunter Folger *CMZ : 1.14/01 10/10/90 12.06.05 by Gunter Folger *-- Author : Gunter Folger +REP,COMMCB,CBCOMMON,114. * header words +REP,COMMCB,CBCOMMON,127-129. & LRBCR,LRLAT,LRLPR,LRMON,LRENO,LRMCB,LRVTX,LRSVX, & LDIST,LSWIT,LGEOM,LVERT,LKINE,LPHYS,LMCIN,LRTBF,LRTBL, & LTJDC,LTPWC,LTCHT,LTCTK,LTCTR,LTCHX,LTCVX,LTVXT, +REP,COMMCB,CBCOMMON,141-149. & LLAST COMMON /CBXDIV/IXCOMP,IXFRST, & IXEVHD,IXHRAW,IXHTJD,IXHTBC,IXHTRK,IXHFIT,IXHUSR, & IXRTRG,IXRSFT,IXRPWC,IXRSCL,IXRJDC,IXRJDF,IXRBCF,IXRBCL, & IXRBCR,IXRLAT,IXRLPR,IXRMON,IXRENO,IXRMCB,IXRVTX,IXRSVX, & IXDIST,IXSWIT,IXGEOM,IXVERT,IXKINE,IXPHYS, & IXMCIN,IXRTBF,IXRTBL, & IXTJDC,IXTPWC,IXTCHT,IXTCTK,IXTCTR,IXTCHX,IXTCVX,IXTVXT, +REP,COMMCB,CBCOMMON,162-169. & IXSTOR INTEGER LFRST, & LEVHD,LHRAW,LHTJD,LHTBC,LHTRK,LHFIT,LHUSR, & LRTRG,LRSFT,LRPWC,LRSCL,LRJDC,LRJDF,LRBCF,LRBCL, & LRBCR,LRLAT,LRLPR,LRMON,LRENO,LRMCB,LRVTX,LRSVX, & LDIST,LSWIT,LGEOM,LVERT,LKINE,LPHYS,LMCIN,LRTBF,LRTBL, & LTJDC,LTPWC,LTCHT,LTCTK,LTCTR,LTCHX,LTCVX,LTVXT, +REP,COMMCB,CBCOMMON,181-189. & LLAST INTEGER IXCOMP,IXFRST, & IXEVHD,IXHRAW,IXHTJD,IXHTBC,IXHTRK,IXHFIT,IXHUSR, & IXRTRG,IXRSFT,IXRPWC,IXRSCL,IXRJDC,IXRJDF,IXRBCF,IXRBCL, & IXRBCR,IXRLAT,IXRLPR,IXRMON,IXRENO,IXRMCB,IXRVTX,IXRSVX, & IXDIST,IXSWIT,IXGEOM,IXVERT,IXKINE,IXPHYS, & IXMCIN,IXRTBF,IXRTBL, & IXTJDC,IXTPWC,IXTCHT,IXTCTK,IXTCTR,IXTCHX,IXTCVX,IXTVXT, +REP,COMMCB,CBCOMMON,202-211. & IXSTOR &KEEP,XCBLINK,IF=EXPLAIN. *----------------------------------------------------------------------- * CBLINK contains the Common blocks /CBLINK/ and /CBXDIV/ * with link addresses and divisions for the raw data of CB * the sequence CBBANK must be always included ! if one * uses these features. * PARAMETERS: none * VARIABLES : L**** : +REP,COMMCB,CBCOMMON,218. *----------------------------------------------------------------------- +REP,COMMCB,CBCOMMON,302-304. * allow to analyse from run/event (RSELCB(1)/RSELCB(2)) to * RSELCB(3)/RSELCB(4). * veto analysis of runs given on RSELCB(5) ... RSELCB(50) +REP,COMMCB,CBCOMMON,312. * variables read FFGO used for control of Zebra data I/O +REP,COMMCB,CBCOMMON,320. * controls which banks are written out to logical unit 20 +REP,COMMCB,CBCOMMON,334. * not yet. will be used for a complete setup of the dst production mode +REP,COMMCB,CBCOMMON,343. * control input of constants from database +REP,COMMCB,CBCOMMON,388. * allow user to stop the job : set STOPCB=.TRUE. +REP,COMMCB,CBCOMMON,442. * The following logicals are true if an event is a +REP,COMMCB,CBCOMMON,519. * Logicals from 'R'ea'D'out setup word: +REP,COMMCB,CBCOMMON,546. * ZEBRA common. meaning of variables see ZEBRA manual. +REP,COMMCB,CBCOMMON,567. * No /CBLABL/ common for this machine. +REP,COMMCB,CBCOMMON,582. * make a few user words available +REP,COMMCB,CBCOMMON,591. * Slow control links +REP,COMMCB,CBCOMMON,605. * names and whereabouts for SC +REP,COMMCB,TC_MACRO,1-37. *CMZU: 1.28/04 22/06/95 18.04.01 by Christian Voelcker *CMZU: 1.28/00 09/06/95 21.38.04 by Christian Voelcker *CMZ : 1.27/06 08/06/95 18.53.59 by Christian Voelcker *CMZ : 1.27/05 08/05/95 15.46.11 by Christian Voelcker *CMZ : 1.27/03 26/04/95 11.30.14 by Christian Voelcker *CMZU: 1.27/02 10/04/95 15.36.58 by Curtis A. Meyer *CMZU: 1.27/00 06/04/95 17.02.28 by Christian Voelcker *CMZ : 1.26/03 15/03/95 18.09.01 by Christian Voelcker *CMZU: 1.26/02 15/03/95 12.01.10 by Curtis A. Meyer *CMZ : 1.26/01 10/02/95 16.33.37 by Christian Voelcker *CMZU: 1.26/00 19/01/95 11.23.50 by Christian Voelcker *CMZU: 1.23/15 05/07/94 20.12.55 by Curtis A. Meyer *CMZ : 1.23/12 02/07/94 15.07.17 by Curtis A. Meyer *CMZ : 1.23/11 02/07/94 14.50.34 by Curtis A. Meyer *CMZU: 1.23/09 14/06/94 17.49.34 by Curtis A. Meyer *CMZU: 1.23/06 06/03/94 12.01.19 by Curtis A. Meyer *CMZU: 1.23/00 25/09/93 11.11.19 by Curtis A. Meyer *CMZU: 1.22/00 14/07/92 08.15.49 by Curtis A. Meyer *CMZU: 1.21/00 26/06/92 08.55.53 by Curtis A. Meyer *CMZU: 1.20/04 18/12/91 09.34.04 by Curtis A. Meyer *CMZU: 1.20/00 25/11/91 11.13.20 by Curtis A. Meyer *CMZU: 1.50/11 29/10/91 16.36.06 by Gunter Folger *CMZ : 1.48/00 31/07/91 11.46.33 by Curtis A. Meyer *CMZ : 1.47/00 23/07/91 13.34.11 by Curtis A. Meyer *CMZ : 1.45/06 06/03/91 16.53.17 by Curtis A. Meyer *CMZ : 1.45/05 27/02/91 11.17.08 by Curtis A. Meyer *CMZ : 1.44/09 21/11/90 11.14.04 by Curtis A. Meyer *CMZ : 1.44/07 28/10/90 13.51.19 by Curtis A. Meyer *CMZ : 1.44/00 21/09/90 13.53.23 by Curtis A. Meyer *CMZ : 1.43/02 29/08/90 18.48.17 by Curtis A. Meyer *CMZ : 1.43/01 15/08/90 18.20.18 by Curtis A. Meyer *CMZ : 1.42/00 11/07/90 08.27.14 by Curtis A. Meyer *-- Author : Curtis A. Meyer * *-- Modified: 24-May-1994, C.A.Meyer * Add OLDJDC flag to TCFLAG, and OLDJLG to LGHOLD. * *-- Modified: 29-AUG-1993, R.Bossingham +ADD,COMMCB,TC_MACRO,115. * 22/06/95 R.Ouared/Chr. Voelcker * three more logical arrays appended at common /TCSVRA/ * +REP,COMMCB,TC_MACRO,576. * Here starts the statistic of the fuzzy Radon pattern recognition +REP,COMMCB,TC_MACRO,764. * PWC cluster information (added by M.Doser) +REP,COMMCB,TC_MACRO,868-869. LOGICAL LSUBPED,LVALID(1920),LOVER(1920),LSIGN(1920) COMMON/TCSVRA/ AMPLS,PAMPL,CAMPL,CMOD,NSHORT,NFORM,LSUBPED, & LVALID,LOVER,LSIGN +REP,CBPHYS,CBINIT,1-24. *CMZU: 1.28/02 19/06/95 10.47.00 by Christian Voelcker *CMZU: 1.28/00 09/06/95 20.44.19 by Christian Voelcker *CMZU: 1.27/00 07/04/95 18.47.23 by Christian Voelcker *CMZU: 1.23/14 06/07/94 19.14.31 by Christian Voelcker *CMZ : 1.23/13 06/07/94 14.39.43 by Gunter Folger *CMZU: 1.23/07 18/05/94 08.22.04 by Michael Doser *CMZU: 1.23/06 02/03/94 15.05.05 by Curtis A. Meyer *CMZU: 1.22/00 04/12/92 12.02.36 by Michael Doser *CMZU: 1.20/08 03/04/92 12.30.28 by Curtis A. Meyer *CMZU: 1.20/04 17/01/92 07.40.04 by Curtis A. Meyer *CMZ : 1.20/00 15/11/91 17.49.19 by Gunter Folger *CMZ : 1.19/08 13/11/91 19.10.29 by Gunter Folger *CMZU: 1.19/07 11/11/91 12.17.25 by Curtis A. Meyer *CMZ : 1.19/00 29/08/91 10.58.18 by Gunter Folger *CMZU: 1.18/06 11/06/91 18.24.03 by Gunter Folger *CMZ : 1.18/01 30/04/91 12.20.01 by Gunter Folger *CMZ : 1.17/00 04/04/91 17.35.16 by Gunter Folger *CMZU: 1.16/06 22/01/91 17.15.56 by Curtis A. Meyer *CMZU: 1.16/05 04/12/90 14.09.21 by Gunter Folger *CMZ : 1.15/03 30/11/90 17.23.04 by Gunter Folger *CMZ : 30/11/90 17.00.22 by Gunter Folger * remove call to TJGAIN, now from database *CMZU: 1.15/01 17/11/90 22.36.45 by Curtis A. Meyer *CMZ : 1.14/01 01/10/90 20.32.59 by Curtis A. Meyer *-- Author : Gunter Folger +REP,CBPHYS,CBINIT,136. CHARACTER*80 ERMSG +REP,CBPHYS,CBINIT,148-151. *---On the SUN it is necessary to initialize i/o channels with *---a call to IOINIT. This call will allow the program to *---connect the file assigned to the environment FORTxx to logical *---unit number xx. +REP,CBPHYS,CBINIT,158. * set I/O units +REP,CBPHYS,CBINIT,173. * Zebra Input (LRDT) and output (LDST) +REP,CBPHYS,CBINIT,215. *---- +REP,CBPHYS,CBINIT,243. *---- +REP,CBPHYS,CBINIT,310. * clear statistic summary array +REP,CBPHYS,CBINIT,347-349. * 1/4/95 CV * write a nice cboff startup message using the new routine * CBMESS(LLOG,IVERS) +REP,CBPHYS,CBINIT,358. * check if the dst mode has been selected +REP,CBPHYS,CBINIT,369. * test if the DSTP card has been set to 3 or 4 +REP,CBPHYS,CBINIT,395-399. 9900 FORMAT(' ' & ,/,' ###########################################' & ,/,' # #' & ,/,' # dst production mode ',I2,': #') 9901 FORMAT( +REP,CBPHYS,CBINIT,407-412. 9902 FORMAT( ' # redefine LTERM=LERR=LDBG=6 #') 9903 FORMAT( ' # banks for charged dst to unit 20 #') 9904 FORMAT( ' # banks for neutral dst to unit 20 #') 9909 FORMAT( ' # banks set in card BANK to unit 20 #') 9910 FORMAT( +REP,CBPHYS,CBINIT,419. * open the error and dbg file with reasonable names. +REP,CBPHYS,CBINIT,441-447. ******************************************************************* * 30/3/95 CV control set of banks not written to output * (whatever is in ixevnt doesn't go to LDST) ******************************************************************* * * dst production for charged data: keep banks which are required * to rebuild the TTKS banks. drop all other 'intermediate' banks. +REP,CBPHYS,CBINIT,459-460. * dst production for neutral data: don't write TBEN, TBTK,TBCL banks * to output. +REP,CBPHYS,CBINIT,475-483. * only event header and raw data to output (keep RJDF banks) ELSEIF ( OUTBCB.EQ.HRAWB ) THEN IXCOMP = MZIXCO(IXEVHD,IXHRAW, 0, 0) * only raw data and global tracking data to output (no RJDF banks) ELSEIF ( OUTBCB.EQ.HGLOB ) THEN IXCOMP = MZIXCO(IXEVHD,IXHRAW,IXHTRK, 0) IXRJDF = IXEVNT ENDIF ********************************************************************* +REP,CBPHYS,CBINIT,499. * modify the vertex cut (+- 50 cm) if we are in dst production mode +REP,CBPHYS,CBINIT,518-523. * for online version read in lookup table * CALL CBSCON &SELF. * * init database +REP,CBPHYS,ZBINIT,1-28. *CMZU: 1.28/01 16/06/95 18.46.00 by Christian Voelcker *CMZU: 1.28/00 09/06/95 23.52.33 by Christian Voelcker *CMZU: 1.27/00 01/04/95 19.55.33 by Christian Voelcker *CMZU: 1.25/01 20/07/94 14.45.51 by Christian Voelcker *CMZU: 1.25/00 15/07/94 09.44.48 by Curtis A. Meyer *CMZU: 1.23/06 02/03/94 17.23.55 by Curtis A. Meyer *CMZU: 1.23/04 07/10/93 07.34.24 by Curtis A. Meyer *CMZU: 1.21/00 03/07/92 11.54.57 by Michael Doser *CMZ : 1.20/12 23/06/92 15.22.46 by Michael Doser *CMZU: 1.20/11 21/05/92 16.48.11 by Curtis A. Meyer *CMZU: 1.20/08 07/04/92 11.45.27 by Curtis A. Meyer *CMZ : 1.20/07 13/03/92 12.43.51 by Michael Doser *CMZ : 1.20/06 27/01/92 15.09.13 by Michael Doser *CMZU: 1.20/05 17/01/92 11.03.16 by Curtis A. Meyer *CMZU: 1.20/04 01/12/91 14.05.35 by Curtis A. Meyer *CMZ : 1.20/00 29/11/91 13.47.37 by Gunter Folger *CMZ : 1.19/00 19/09/91 17.25.41 by Gunter Folger *CMZU: 1.18/06 03/06/91 12.35.45 by Curtis A. Meyer *CMZ : 1.18/03 28/05/91 15.33.36 by Gunter Folger *CMZ : 1.18/00 26/04/91 17.08.16 by Gunter Folger *CMZ : 25/04/91 18.25.48 by Gunter Folger * I/O for DECS, ie, use CFOPEN instead of OPEN *CMZ : 1.17/03 18/04/91 15.59.04 by Gunter Folger *CMZ : 1.17/00 29/03/91 14.15.20 by Gunter Folger *CMZU: 1.16/08 30/01/91 15.12.47 by Gunter Folger *CMZ : 1.16/07 30/01/91 14.04.38 by Gunter Folger *CMZ : 1.16/06 24/01/91 14.54.28 by Gunter Folger *CMZ : 1.14/01 10/10/90 12.23.07 by Gunter Folger *-- Author : Curtis A. Meyer & Gunter Folger +REP,CBPHYS,ZBINIT,109. DATA HEAD/'EVHD'/,IBANK/18/ +REP,CBPHYS,ZBINIT,132-139. 10 CALL UCTOH(CH4(I),HCH4(I),4,4) CALL UCOPY(JLOC(0),ILOC(0),21) DO 11 I=1,10 11 CALL UCTOH(CDIV(I),HDIV(I),4,4) CALL VZERO(IDIV(0),11) * DO 12 I=1,NSLOWB 12 CALL UCTOH(CSLOW(I),HSLOWB(I),4,4) +REP,CBPHYS,ZBINIT,169-172. ** division 1 (IXWORK) division for working space ** division 2 (IXEVNT) division for banks not to be written to DST ** division 3 (IXCONS) division for short term (run) constants ** division 4 (IXSAVE) division for fixed constants +REP,CBPHYS,ZBINIT,179-181. * now create all the divisions for raw and reconstructed data, * these divisions are ( may be ) written to DST * The following sizes are adapted to a division size (XCLENG) of 150000 +REP,CBPHYS,ZBINIT,199. * set the array to steer into which division data are read in +REP,CBPHYS,ZBINIT,293-304. *---On the SUN, get the file name from the environment variable, and *---if the environment exists, then close the file so we can open *---it with the correct parameters. * IF(LRDT.LT.10) WRITE(IENVIR,148)LRDT IF(LRDT.GE.10) WRITE(IENVIR,149)LRDT &SELF,IF=ALT. 148 FORMAT('FOR00',I1) 149 FORMAT('FOR0',I2) &SELF,IF=DECS,SUN,UNIX. 148 FORMAT('FORT0',I1) 149 FORMAT('FORT',I2) +REP,CBPHYS,ZBINIT,310-321. 150 CONTINUE * *---If we got here, then there was no input file assigned. * WRITE(LLOG,*)' *** NO INPUT FILE WAS ASSIGNED ' GOTO 1000 * *---Ok, now we have the correct filename. Close the file as it was *---probably opened wrong by the system, and reopen it. * 170 CLOSE(UNIT=LRDT) 171 FORMAT(' READING FROM INPUT FILE ',/,1X,A) +REP,CBPHYS,ZBINIT,332. * Check for a valid recordlength in eXchange format +REP,CBPHYS,ZBINIT,378-383. * call IOOPTN to allow for many tapes, may always be there CALL IOOPTN(LRDT,'CON', IRC) IF ( IRC .NE. 0 ) THEN WRITE(LLOG,6300) IRC IF ( LLOG.NE.LERR) WRITE(LERR,6300) IRC 6300 FORMAT(' ZBINIT : error from IOOPTN, please refer to', +REP,CBPHYS,ZBINIT,405. * do nothing on the IBM +REP,CBPHYS,ZBINIT,423. * do nothing on the IBM +REP,CBPHYS,ZBINIT,448. * Check for a valid recordlength in eXchange format +REP,CBPHYS,ZBINIT,478-480. *---On UNIX, get the file name from the environment variable, and *---if the environment exists, then close the file so we can open *---it with the correct parameters. +REP,CBPHYS,ZBINIT,488-501. 250 CONTINUE * *---If we got here, then there was no output file assigned. * &SELF,IF=ALT,DECS,SUN,UNIX. WRITE(FILEOT,251)LDST 251 FORMAT('FORT.',I2) ILENOT = 7 * *---Ok, now we have the correct filename. Close the file as it was *---probably opened wrong by the system, and reopen it. * 270 CLOSE(UNIT=LDST) 271 FORMAT(' WRITING TO OUTPUT FILE ',/,1X,A) +REP,CBPHYS,ZBINIT,522. * do nothing on the IBM +REP,CBPHYS,ZBINIT,539. * do nothing on the IBM +REP,CBPHYS,ZBINIT,554. * do nothing on the IBM +REP,CBPHYS,ZBINIT,566-567. * make sure the user requests this unit for output * else Zebra crashes +REP,CBPHYS,ZBINIT,579-581. 1000 WRITE(LERR,6100)IOS IF(LERR.NE.LLOG) WRITE(LLOG,6100)IOS 6100 FORMAT(2(' *******************************************',/), +REP,CBPHYS,ZBINIT,588-590. 2000 WRITE(LERR,6200)IOS IF(LLOG.NE.LERR) WRITE(LLOG,6200)IOS 6200 FORMAT(2(' ********************************************',/),