C ======================================== SUBROUTINE low_angle_electron(theta_min) C ======================================== implicit none * * This routine returns the lowest angle (highest Q^2) * of the tlt electron finder candidates. It can be used to * select events for an analysis in energy, theta bins. * It also may be useful for selecting BCAL or FCAL electrons, * BCAL prompt photons, or wide angle comptons where Q^2 is not * really the selection variable needed. * * * Energy cut = 4.0 GeV * * Sinistra probability cut = 0.7 * * High y Fcal electrons were excluded since emille and sinistra find too * many fakes in FCAL. Only FCAL high y events were cut since * In BCAL and RCAL I want to do a high Y analysis. * These fakes eliminate the usefullness * of this selection if they are included. * * Author: Mike Wodarczyk, 21.11.1997 * ---------------------------------------------------------------------- #include "partap.inc" #include "tltemc.inc" #include "tltele.inc" #include "tltvtx.inc" #include "tltevt.inc" integer k logical exist_tltemc integer Nel * tlt vertex z position real zvtx * Electron Variables real Eel, X, Y, Z real prob character*16 prog * selection variables logical accept real ye real theta,theta_min * * For the vertex, use the true vertex if it will give * smaller electron angles that using a vertex at 0 * This insures that I won't reject high Q^2 (low theta) * events because the tlt vertex was places at * zvtx = 0. if (coutab(tltvtx).gt.0) then call fettab(tltvtx,ID,1) if (TLTVTX_FVZ.lt.zvtx) zvtx = TLTVTX_FVZ endif C C TLT Results (for most of 1996/97 use tltemc for 1995 use tltele) C if (coutab(TLTEMC).gt.0) then exist_tltemc = .TRUE. Nel = coutab(TLTEMC) else exist_tltemc = .FALSE. Nel = coutab(TLTELE) endif theta_min = 3.5 Do k=1,Nel if (exist_tltemc) then CALL FETTAB(TLTEMC,ID,k) Eel = TLTEMC_ENECAND X = TLTEMC_XPOS Y = TLTEMC_YPOS Z = TLTEMC_ZPOS PROB = TLTEMC_EPROB prog = TLTEMC_PROG else CALL FETTAB(TLTELE,ID,k) Eel = TLTELE_ENECAND X = TLTELE_PXCAND Y = TLTELE_PYCAND Z = TLTELE_PZCAND PROB = TLTELE_EPROB prog = TLTELE_PROG endif accept = .TRUE. IF (prog.EQ.'Sinistra'.and.prob.lt.0.7) THEN accept = .FALSE. endif if (Eel.lt.4.0) accept = .FALSE. ! energy too low. if (Z.gt.220) then theta = atan2(sqrt(x**2+y**2),z-zvtx) ye = 1. - Eel*(1.-cos(theta))/(2.*27.5) if (ye.gt.0.9) then accept = .FALSE. ! High y FCAL electrons are fakes endif endif if (accept) then theta = atan2(sqrt(x**2+y**2),z-zvtx) if (theta.lt.theta_min) theta_min = theta endif enddo return end