* * $Id: tpc_hitlist_xcheck.F,v 1.2 2004/05/28 16:12:00 dpp Exp $ * * $Log: tpc_hitlist_xcheck.F,v $ * Revision 1.2 2004/05/28 16:12:00 dpp * -> eliminate some printout * * Revision 1.1 2003/10/28 21:26:26 dpp * -> NEW * -> find number of isolated hits * * * #include "sys/CLEO_machine.h" #include "pilot.h" #if defined(CLEO_DOITTPC) SUBROUTINE TPC_HITLIST_XCHECK(INPUT_TRACK,INPUT_MIN,INPUT_MAX, 2 NCLEAR) C....................................................................... C. C. TPC_HITLIST_XCHECK - checks hits on the input list against all other C. to detemine the isolation of the input list C. C. COMMON : C. CALLS : C. CALLED : C. AUTHOR : D. Peterson C. C. VERSION : 1.00 C. CREATED : 22-Oct-2002 C. C....................................................................... #if defined(CLEO_TYPCHK) IMPLICIT NONE #endif SAVE #include "doit/duseq/monte_carlo_tracks.inc" #include "/home/dpp/lcd_simulation/cornell/hep/lcd/io/fortran/lcdevt.inc" INTEGER INPUT_TRACK INTEGER INPUT_MIN INTEGER INPUT_MAX INTEGER IHIT,JHIT INTEGER NRANGE INTEGER NCLEAR LOGICAL CLOSE REAL XYDIST2 REAL XYLIM2 REAL ZDIST REAL ZLIM c23456789 123456789 123456789 123456789 123456789 123456789 123456789 12 * ----------Executable code starts here--------------------------------- c ROAD_AMB_EXTRA_Z=0.05 C note: trkhit(1:3,hit) is in units of cm ZLIM=(.05*100.) XYLIM2=(0.03*100.)**2 c print 1000,INPUT_TRACK,INPUT_MIN,INPUT_MAX 1000 FORMAT( 1 ' TPC_HITLIST_XCHECK:', 1 ' test track number',I7,' hits from ',I8,' through ',I8) C----------------------------------------------------------------------- C loop over the input hit range C----------------------------------------------------------------------- nrange=input_max-input_min+1 if( 1 (ntrkhits.ge.1).and. 2 (nrange.gt.0).and. 3 (input_min.ge.1).and. 3 (input_min.le.ntrkhits).and. 3 (input_max.ge.1).and. 3 (input_max.le.ntrkhits))THEN nclear=nrange do 289 ihit=input_min,input_max C----------------------------------------------------------------------- C process the input hit list C loop over hits C----------------------------------------------------------------------- jhit=0 219 jhit=jhit+1 IF(JHIT.LE.NTRKHITS)THEN if( 1 (jhit.lt.input_min).or. 1 (jhit.gt.input_max))then C----------------------------------------------------------------------- C test if within cuts C----------------------------------------------------------------------- zdist=abs( 1 (trkhit(3,ihit)-trkhit(3,jhit)) 2 ) if(zdist.lt.ZLIM)then xydist2= 1 (trkhit(1,ihit)-trkhit(1,jhit))**2 + 2 (trkhit(2,ihit)-trkhit(2,jhit))**2 IF(xydist2.lt.xylim2)then close=.true. else close=.false. endif else close=.false. endif IF(.NOT.CLOSE)then go to 219 else nclear=nclear-1 endif endif endif 289 CONTINUE endif C----------------------------------------------------------------------- C SUMMARY OF FOUND TRACKS C----------------------------------------------------------------------- print 1005,INPUT_TRACK,INPUT_MIN,INPUT_MAX,NCLEAR,NRANGE 1005 FORMAT( 1 ' TPC_HITLIST_XCHECK:', 2 ' test track number',I7,' hits from ',I8,' through ',I8, 3 ' found',I6 ' clear out of',I6) C end of compliation flag CLEO_DOITTPC #else SUBROUTINE TPC_HITLIST_XCHECK #endif RETURN END