CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C C SUBROUTINE: M O R E C C C C PURPOSE: CALCULATES THE RESOLUTION C C IN INHOMOGENEOUS MAGNETIC DETECTORS C C (SUBROUTINE VERSION OF MAIN IMPAUF) C C C C WRITTEN BY: B.A.M. C C C C DATE: 23-AUG-1985 C C C C CHANGES: WHAT WHEN WHO C C UNIX VERSION 04/27/00 C C C C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C 1 2 3 4 5 6 7 C234567890123456789012345678901234567890123456789012345678901234567890123 C C PROGRAM TO CALCULATE POSITION, ANGULAR AND MOMENTUM RESOLUTION C IN INHOMOGENEOUS MAGNETIC FIELDS C SUBROUTINE MORE(P,AM,NSTEP,SS,SIGX,X0,IMAX,RESO,IOUT,ICONT) SAVE C DIMENSION NSTEP(50),SS(0:4,0:50),F123(3,0:50),F123S(3,0:50) DIMENSION SIGX(50),SIGX2(50),X0(50),AMAT(3,3) DIMENSION DS(50) DIMENSION XAUF(3),XAUFV(3),XAUFS(3),AM12(50,50) DIMENSION RESO(3,3),XA(3),B(3),RI(3) C C INPUT DATA C P PARTICLE MOMENTUM IN GEV/C C AM MASS IN GEV C NSTEP NUMBER OF STEPS (TO SOLVE THE DIFFERENTIAL EQUATION) C SS(0,I) POSITION OF DATA POINT ON THE TRACK C THE ORIGIN IS ASSUMED TO BE AT SS(0,0) C C SIGX POSITION RESOLUTION IN METER C (NULL OR NEGATIV TO MARK THE INTERFACE BETWEEN TWO DIFFERENT C MATERIALS; NO POSITION INFORMATION AT THIS POINT C C X0 RADIATION LENGTH (IN METER) C IMAX NUMBER OF DATA POINTS C ICONT CONTROLS THE FUCTION OF THE SR C C C OUTPUT DATA C RESO MATRIX CONTAINING THE RESOLUTION C RESO(1,I) DUE TO POSTION RESOLUTION C RESO(2,I) DUE TO MULTIPLE SCATTERING C RESO(3,I) TOTAL C I=1 DELTA-X C I=2 DELTA-THETA C I=3 DELTA-P / P C GOTO(100,200,300),ICONT 100 CONTINUE RETURN C 200 CONTINUE C INITIALIZE FIELD SUBROUTINE CALL FIELD(XA,B,RI,1.,P,1.,IOUT,1) NPOS=0 C ckm zero XA(1) and XA(2) XA(1)=0. XA(2)=0. DO 201 I=0,IMAX XA(3)=SS(0,I) CALL FIELD(XA,B,RI,1.,P,1.,0,2) SS(4,I)=RI(3) IF(I.EQ.0) GOTO 201 DS(I)=SS(0,I)-SS(0,I-1) IF(SIGX(I).GT.0.) SIGX2(I)=SIGX(I)**2 IF(SIGX(I).LE.0.) SIGX2(I)=0. IF(SIGX(I).GT.0.) NPOS=NPOS+1 ! NUMBER OF POSITION MEASUREMENTS 201 CONTINUE C IF(NPOS.GE.3) GOTO 240 DO 241 I1=1,3 DO 241 I2=1,3 241 RESO(I1,I2)=0. RETURN C 240 CONTINUE BETA=P/SQRT(P**2+AM**2) C C INTEGRATION OF THE DIFFERENTIAL EQUATION FOR THE DEVIATION FROM C THE CENTRAL TRACK CALL DGLABW(P,NSTEP,SS,F123,1,IMAX,1) C C INTEGRATION OF THE DIFFERENTIAL EQUATION BETWEEN I AND IMAX C (IMPORTANT FOR MULTIPLE SCATTERING, ONLY) DO 220 I=1,IMAX IMIN=I CALL DGLABW(P,NSTEP,SS,F123S,IMIN,IMAX,1) DO 221 K=IMIN,IMAX 221 AM12(IMIN,K)=F123S(2,K) 220 CONTINUE C C SET MATRIX CONTAINING THE COEFFICIENTS DO 210 I=1,3 DO 211 J=1,3 SU=0. DO 212 K=1,IMAX IF(SIGX(K).LE.0.) GOTO 212 SU=SU+F123(I,K)*F123(J,K)/SIGX2(K) 212 CONTINUE AMAT(I,J)=SU 211 CONTINUE 210 CONTINUE C C RESOLX TREATS THE INFLUENCE OF THE POSITION RESOLUTION ANALYTICALLY CALL RESOLX(AMAT,F123,SIGX,XAUF,IMAX) C C RESOLV TREATS THE INFLUENCE OF THE MULTIPLE SCATTERING ANALYTICALLY CALL RESOLV(AM12,AMAT,F123,SIGX2,SS,NSTEP,X0,P,BETA, 1 XAUFV,IMAX) C C TOTAL RESOLUTION BY ADDING THE CONTRIBUTIONS QUADRATICALLY C DO 213 K=1,3 XAUFS(K)=SQRT(XAUF(K)**2+XAUFV(K)**2) RESO(1,K)=XAUF(K) RESO(2,K)=XAUFV(K) RESO(3,K)=XAUFS(K) 213 CONTINUE RETURN C 300 CONTINUE CALL DGLABW(P,NSTEP,SS,F123,1,IMAX,3) ! TEST 1000 FORMAT(' MORE ',2I3,8F8.3) RETURN END