+PATCH,$CORR. +DECK,CORR1. Updates version: 1.11/00 to 1.11/01 +REP,*TITLE*,TITLE,1. USDROP 1.11/01 16/12/95 17.46.08 +REP,$VERSION,V1_11,1-2. *CMZ : 1.11/01 16/12/95 17.46.08 by Curtis A. Meyer *CMZ : 1.11/00 23/08/95 14.07.50 by Curtis A. Meyer *-- Author : Curtis A. Meyer 23/08/95 * *::> VERSION 1.11/01 16/12/95 17.46.08 * *> Allow the user to disable the primary veryex requirement * on tracks by setting LVXREQ to .false. after usdini has * been called. +REP,DROPCOMM,@DMACRO,1-13. *CMZ : 1.11/01 16/12/95 17.37.02 by Curtis A. Meyer *CMZU: 1.10/01 11/04/95 12.46.34 by Curtis A. Meyer *CMZ : 1.10/00 30/03/95 18.07.16 by Curtis A. Meyer *CMZ : 1.09/02 16/03/95 20.41.49 by Curtis A. Meyer *CMZ : 1.06/01 26/10/93 18.04.13 by Curtis A. Meyer *CMZU: 1.04/02 06/04/92 13.18.55 by Curtis A. Meyer *CMZ : 1.04/00 25/02/92 13.15.14 by Curtis A. Meyer *CMZ : 1.02/00 23/01/92 17.23.48 by Curtis A. Meyer *CMZ : 1.01/00 16/01/92 08.55.07 by Curtis A. Meyer *CMZ : 1.00/03 06/12/91 12.26.56 by Curtis A. Meyer *CMZ : 1.00/02 25/11/91 16.24.09 by Curtis A. Meyer *CMZ : 1.00/01 20/11/91 16.18.03 by Curtis A. Meyer *CMZ : 1.00/00 25/10/91 12.36.17 by Curtis A. Meyer *-- Author : Curtis A. Meyer +ADD,DROPCOMM,@DMACRO,71. * LVXREQ Require all tracks from the vertex. true=yes, false=no. +REP,DROPCOMM,@DMACRO,79. LOGICAL LE19US,LVXREQ +REP,DROPCOMM,@DMACRO,85. & LE19US,INTLUS,LVXREQ +REP,DROPCODE,CBDROP,1-14. *CMZ : 1.11/01 05/09/95 17.56.16 by Curtis A. Meyer *CMZU: 1.10/02 07/07/95 20.29.48 by Curtis A. Meyer *CMZ : 1.10/01 11/04/95 13.01.58 by Curtis A. Meyer *CMZ : 1.10/00 30/03/95 18.13.50 by Curtis A. Meyer *CMZ : 1.09/02 17/03/95 09.39.21 by Curtis A. Meyer *CMZ : 1.06/01 26/10/93 18.03.15 by Curtis A. Meyer *CMZU: 1.06/00 13/03/93 14.17.00 by Curtis A. Meyer *CMZ : 1.04/01 27/02/92 14.45.23 by Curtis A. Meyer *CMZ : 1.04/00 25/02/92 15.44.26 by Curtis A. Meyer *CMZ : 1.02/00 16/01/92 15.19.39 by Curtis A. Meyer *CMZ : 1.01/00 16/01/92 09.48.46 by Curtis A. Meyer *CMZ : 1.00/03 09/12/91 09.57.43 by Curtis A. Meyer *CMZ : 1.00/01 20/11/91 16.18.43 by Curtis A. Meyer *CMZ : 1.00/00 25/10/91 12.36.17 by Curtis A. Meyer *-- Author : Curtis A. Meyer 28/06/91 +ADD,DROPCODE,CBDROP,95. * 05 September 1995, C.A.Meyer * Move Data declaration to the end of the declarative * statements. * +DEL,DROPCODE,CBDROP,124. +ADD,DROPCODE,CBDROP,133. DATA LGFRST /.TRUE./ * +REP,DROPCODE,CBDROP,157-162. 101 FORMAT(' ********************************************* ',/, & ' * CBDROP Version ',A8,' * ',/, & ' * Code has been initialized with the *'/, & ' * Following options on: *',/, & ' * *') 102 FORMAT(' * Cut on Ped Energy is ',L4,': Cut = ',F6.2,' *',/, +REP,DROPCODE,CBDROP,171-178. 103 FORMAT(' * CBDROP loads from Helix Banks *',/, & ' *********************************************') 104 FORMAT(' * CBDROP loads from Vertex Banks *',/, & ' *********************************************') 105 FORMAT(' * CBDROP loads from Global Banks *',/, & ' *********************************************') * *---Make sure that we are really trying to do something. +REP,DROPCODE,CBDROP,187-189. *---Load all possible particles that we may need into the USPALL *---common block. If we get IERR less than zero, then the load *---failed, and we can abort. +REP,DROPCODE,CBDROP,198. *---Check for smart mode. +REP,DROPCODE,CBDROP,205-212. *---In smart mode, we will [a] reject events which cannot possibly *---reach the range of NGMNUS to NGMXUS, and [b] never drop photons *---if we would fall below NGMNUS. First get the number of possible *---photons. * NGAM = NALLUS - NTRKUS - NREJUS * *---Now make sure we can reach the allowed range. +REP,DROPCODE,CBDROP,218. *---Determine if we should drop up to NTRY, or stop sooner. +REP,DROPCODE,CBDROP,225. *---Loop over all the drop possibilities, and fit. +REP,DROPCODE,CBDROP,241-248. 9007 FORMAT(' Drop ',I2,' Keep ',I2,/, & ' Best CL ',E12.5,' 2nd Best ',E12.5) &SELF. * 500 CONTINUE * *---Find out which is the most probable drop combination, and *---set INDX to that number of photons. +REP,DROPCODE,CBDROP,259-263. 9033 FORMAT(' Best Drop is ',I2,' CL ',E12.5) &SELF. * *---Redo the best fit so that the 4-C fit values will be avaialable *---in the USPMOM common block. +REP,DROPCODE,UGVHLD,1-10. *CMZ : 1.11/01 16/12/95 17.44.38 by Curtis A. Meyer *CMZU: 1.10/01 11/04/95 14.13.40 by Curtis A. Meyer *CMZU: 1.09/00 30/06/94 18.27.08 by Curtis A. Meyer *CMZU: 1.07/01 15/04/94 16.53.04 by F.-H.Heinsius *CMZU: 1.06/00 13/03/93 14.25.15 by Curtis A. Meyer *CMZ : 1.05/04 14/12/92 07.51.45 by Curtis A. Meyer *CMZ : 1.05/03 25/11/92 13.40.24 by Curtis A. Meyer *CMZ : 1.01/00 16/01/92 09.44.41 by Curtis A. Meyer *CMZ : 1.00/04 09/12/91 17.54.26 by Curtis A. Meyer *CMZ : 1.00/03 09/12/91 10.33.20 by Curtis A. Meyer *-- Author : Curtis A. Meyer 13/09/90 +REP,DROPCODE,UGVHLD,75. * 16 December, 1996 C.A.Meyer * Allow for IVRT to be passed as a negative number. If * it is done, there is no vertex constraint on the * accepted tracks. * * ********************************************************************* +REP,DROPCODE,UGVHLD,170. 100 IERR = -1 +REP,DROPCODE,UGVHLD,179. *---Check global tracking version: +REP,DROPCODE,UGVHLD,190. *---No error condition, extract the data: +REP,DROPCODE,UGVHLD,201-207. *---Data should be taken from the TTKS banks: * ITRK = 0 JTTKS = LQ(LTTKS-1) 400 IF(JTTKS .LE. 0) GOTO 500 * *---Check to make sure that the track is charged, and at the vertex. +REP,DROPCODE,UGVHLD,213-225. 9011 FORMAT(' Track id ',I2,' Q ',I3,' Vertex ',I3) &SELF. * *---Check to see if the user has disabled this TRACK. * QACC = .TRUE. DO 600 I = 1,NBADUS IF(IBADUS(I) .EQ. ITRK) QACC=.FALSE. 600 CONTINUE * *---If the passed vertex, IVRT is positive, then require the track from *---this vertex. If IVRT is negative, then no such requirement is applied. * IF ((IVRT.GT.0).AND.(IQ(JTTKS+8).NE.IVRT)) QACC = .FALSE. * *---For acceptable tracks, load the data: * IF ( QACC ) THEN * *---Load the track data from the TTKS data bank: +REP,DROPCODE,UGVHLD,266-268. *---Apply a cludge for old software. This is based on global *---tracking version number being less than or equal to 1.25/00, *---a non existant version. +REP,DROPCODE,UGVHLD,296-300. 9013 FORMAT(' LGLONG ',L4,' LGBAD ',L4, & ' LGLYR1 ',L4,' IERR ',I9) &SELF. * *---Now copy the data into the ouput arrays: +REP,DROPCODE,UGVHLD,310. 800 CONTINUE +REP,DROPCODE,UGVHLD,320. 900 CONTINUE +REP,DROPCODE,UGVHLD,326. *---Check the next track. +REP,DROPCODE,UGVHLD,332-334. *---Done loading, make sure that everything is ok. * 500 IF(NTRK.LE.0) RETURN +REP,DROPCODE,USDINI,1-16. *CMZ : 1.11/01 16/12/95 17.37.31 by Curtis A. Meyer *CMZU: 1.10/02 07/07/95 20.30.15 by Curtis A. Meyer *CMZ : 1.10/01 11/04/95 12.59.55 by Curtis A. Meyer *CMZ : 1.10/00 30/03/95 18.09.26 by Curtis A. Meyer *CMZ : 1.09/02 16/03/95 20.40.40 by Curtis A. Meyer *CMZU: 1.05/02 14/07/92 08.16.57 by Curtis A. Meyer *CMZ : 1.05/00 26/06/92 08.50.01 by Curtis A. Meyer *CMZ : 1.04/02 06/04/92 13.21.15 by Curtis A. Meyer *CMZ : 1.04/00 25/02/92 13.14.01 by Curtis A. Meyer *CMZ : 1.02/00 23/01/92 17.24.21 by Curtis A. Meyer *CMZ : 1.01/00 15/01/92 13.36.32 by Curtis A. Meyer *CMZ : 1.00/04 18/12/91 10.16.13 by Curtis A. Meyer *CMZ : 1.00/03 06/12/91 12.27.26 by Curtis A. Meyer *CMZ : 1.00/02 25/11/91 16.28.27 by Curtis A. Meyer *CMZ : 1.00/01 20/11/91 16.27.00 by Curtis A. Meyer *CMZ : 1.00/00 25/10/91 12.36.17 by Curtis A. Meyer *-- Author : Curtis A. Meyer 24/07/91 +REP,DROPCODE,USDINI,72-73. LVXREQ = .TRUE. * *---Initialize the 4-C kinematic fit parameters. +REP,DROPCODE,USDINI,85-86. *---Initialize the factors by which the covariance matrix for *---charged tracks is increased. +REP,DROPCODE,USDINI,98. *---Initialize the chisquare per degree of freedom cut for tracks. +REP,DROPCODE,USDRLD,1-14. *CMZ : 1.11/01 16/12/95 17.38.30 by Curtis A. Meyer *CMZU: 1.10/01 28/04/95 11.40.22 by Curtis A. Meyer *CMZ : 1.10/00 30/03/95 18.12.07 by Curtis A. Meyer *CMZ : 1.09/02 16/03/95 20.39.46 by Curtis A. Meyer *CMZ : 1.09/01 19/07/94 23.03.37 by 'Curtis A. Meyer" *CMZU: 1.09/00 28/06/94 17.12.20 by Curtis A. Meyer *CMZ : 1.08/00 24/06/94 11.10.35 by Curtis A. Meyer *CMZU: 1.07/01 15/04/94 16.51.20 by F.-H.Heinsius *CMZ : 1.06/01 26/10/93 18.03.16 by Curtis A. Meyer *CMZU: 1.05/03 24/11/92 17.54.09 by Curtis A. Meyer *CMZ : 1.04/03 23/06/92 16.30.40 by Curtis A. Meyer *CMZ : 1.04/02 06/04/92 13.42.21 by Curtis A. Meyer *CMZ : 1.02/00 23/01/92 17.26.55 by Curtis A. Meyer *CMZ : 1.01/00 16/01/92 13.13.04 by Curtis A. Meyer *-- Author : Curtis A. Meyer 15/01/92 +ADD,DROPCODE,USDRLD,70. * 16 December, 1995 C.A.Meyer * Allow the user to disable the requirement * that the tracks come from the primary vertex. * +REP,DROPCODE,USDRLD,117-122. *---Zero the entire commom block. * CALL VZERO(PALLUS(1,1),681) * *---Load the track information. The loading routine is determined by *---the value of the IVRTUS word. +REP,DROPCODE,USDRLD,131. 100 CONTINUE +REP,DROPCODE,USDRLD,147-148. IF (LVXREQ) THEN CALL UGVHLS(1,NPRTUS,ICODE,CHRGUS,PINIUS,CVINUS,IERRT, & LONGUS,IGIDUS) ELSE CALL UGVHLS(-1,NPRTUS,ICODE,CHRGUS,PINIUS,CVINUS,IERRT, & LONGUS,IGIDUS) ENDIF +REP,DROPCODE,USDRLD,169-170. *---Check for a "fatal" error at this point. Namely the wrong number *---of tracks, or a fatal from the loading routine. +REP,DROPCODE,USDRLD,176-183. *---Mask the error code to see if wee should take the event: *---Bit 0: Charge does not sum to zero. *---Bit 1: All tracks are not long, (10 hits). *---Bit 2: At least one track is poorly fit. *---Bit 3: At least one track starts outside layer 5. *---Bit 4: The vertex convergence is poor. *---Mask 13 = 01101 ==> Q_sum, E_code, Start_layer *---Mask 15 = 01111 ==> Q_sum, Length, E_code, Start_layer +REP,DROPCODE,USDRLD,197-219. *---Now load the particles into the global area. * DO 500 I = 1,NTRKUS * *---The tracks will be stored in the slots according to their *---global tracking number. In order to quickly access these, *---we provide an index list to the tracks. * IGALUS(I) = IGIDUS(I) J = IGIDUS(I) * *---Copy the momentum and the covariance matrix. * CALL UCOPY(PINIUS(1,I) ,PALLUS(1,J) ,3) CALL UCOPY(CVINUS(1,1,I),CVALUS(1,1,J) ,9) * *---Copy the Charge: * CHALUS(J) = CHRGUS(I) * *---Now get the mass. If IGTRAK is not set, and IVRTUS is not zero, *---then these are just set to the pion mass. Otherwise we need to *---see what global tracking thinks. +REP,DROPCODE,USDRLD,247-252. 500 CONTINUE * ITBTK = 0 * *---Now we want to load all the photons into the array. We will make no *---energy cut at this level. +REP,DROPCODE,USDRLD,258-261. 1000 IF(JTTKS .GT. 0 ) THEN * *---Make sure that the data are from BCTRAK, and that this is *---an unmatched photon. +REP,DROPCODE,USDRLD,274-280. *---Check to see if this photon fails the energy cuts. *---Set the initial setup to "fail". * LGALUS(I) = 1 * *---Check photon energy from global tracking bank. Accept *---if it is ok. +REP,DROPCODE,USDRLD,286. *---Check energy in central crystal. +REP,DROPCODE,USDRLD,292. *---If both are required: +REP,DROPCODE,USDRLD,299-303. *---If neither are required: * IF((.NOT.LEGAUS).AND.(.NOT.LCENUS)) LGALUS(I) = 0 * *---Make a Cut on E1/E9 +REP,DROPCODE,USDRLD,309-317. *---Check to see if the user has disabled this PED. * IF(NBADUS .GT. 0) THEN DO 1100 II = 1,NBADUS IF(IBADUS(II) .EQ. I) LGALUS(I) = 1 1100 CONTINUE ENDIF * *---Check to see if this is an edge Crystal. +REP,DROPCODE,USDRLD,323. *---Check to see if TAXI2 wants to reject this PED: +REP,DROPCODE,USDRLD,329. *---Check to see if DOLBYC rejected this PED. +REP,DROPCODE,USDRLD,335. *---Check to see if SMART rejected this PED. +REP,DROPCODE,USDRLD,341. *---Check for rejected photon. +REP,DROPCODE,USDRLD,347. 9023 FORMAT(' Part ',I2,' Error ',I9) +REP,DROPCODE,USDRLD,367-372. 9101 CONTINUE 9109 FORMAT(' Tracks Loaded ',I3,' Total Part ',I3) 9111 FORMAT(' TTKS ',I3,' Mass ',F9.3,' Chrg ',F3.0,/ & ' Energy_cut ',I3,' Edge ',I3,/, & ,' Momentum Covariance Matrix ') 9113 FORMAT(10X,F9.3,5X,3(2X,E12.5)) +REP,MANUAL,MANUAL,1. *CMZ : 1.11/01 16/12/95 17.42.43 by Curtis A. Meyer *CMZ : 1.11/00 23/08/95 14.07.42 by Curtis A. Meyer +ADD,MANUAL,MANUAL,245. \item {\sc lvxreq} is a logical that when set to {\sc true} causes {\sc cbdrop} to require all tracks be attached to vertex one. This is the default configuration. Setting {\sc lvxreq} to {\sc false} will disable this. +REP,MANUAL,MANUAL,566-571. LOGICAL LE19US,LVXREQ COMMON /USDCUT/ EGAMUS,ECENUS,E1E9US,EBALUS,PBALUS,ESMCUS, & PSMCUS,VSHFUS,CHCTUS,NDRPUS,NGMNUS,NGMXUS, & NGAMUS,NTRKUS,LONGUS,IVRTUS,MASKUS,ISHFUS, & IGTRAK,LEDGUS,LCENUS,LEGAUS,LTAXI2,LDOLBY, & LSMART,LE19US,INTLUS,LVXREQ +ADD,MANUAL,MANUAL,635. \item {\sc lvxreq} Set to {\sc true} if {\sc cbdrop} should require all tracks to come from the primary vertex. This is the default configuration. It is set to {\sc false} to eliminate this constraint. This may be useful in events with Kshorts.