CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C C C SUBROUTINE F I E L D _ C O N S T C C C C PURPOSE: CONSTANT MAGNETIC FIELD VALUES FOR PARTICLE TRACKING C C C C WRITTEN BY: B.A.M. C C C C DATE: 24-AUG-91 C C C C CHANGES: WHAT WHO WHEN C C Unix Compatible Version BAM 05/11/00 C C C C C CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC C 1 2 3 4 5 6 7 8 C2345678901234567890123456789012345678901234567890123456789012345678901234567890 C SUBROUTINE FIELD_CONST(X,B,RI,CHAR,P,FAC,IOUT,ICONT) ckm FIELD(XA,BVEK,RI,1.,1.,1.,0, 1) SAVE DIMENSION B(3),X(3),RI(3) C C X COORDINATE C B MAGNETIC FIELD IN TESLA C RI INVERSE RADIUS IN M**(-1) C CHAR CHARGE IN UNITS OF E C P MOMENTUM IN GEV/C C FAC COMMON FACTOR FOR THE MAGNETIC FIELD C ICONT CONTROLLING THE FUNCTION OF THE SUBROUTINE C icount=1 : initialization print *, ' starting field_const' GOTO(100,200,300),ICONT 100 CONTINUE PI=P C PARAMETERS OF THE FAST DIPOLE FOR THE CLAS++ CENTRAL DETECTOR c update with values for Hall D solenoid c ES 10/01/06 c XMIN=0.0 c XMAX=0.5 XMAX=0.95 c c B field used in simulation c c B0=2.0 B0=1.74 RETURN C 200 CONTINUE C IF((X(3).GE.XMIN).AND.(X(3).LE.XMAX)) THEN BB=B0 ELSE BB=0. ENDIF B(1)=0. B(2)=0. B(3)=BB C DO 1 I=1,3 RI(I)=B(I)*CHAR*.2997925/PI ! 1/R IN 1/METER 1 CONTINUE C print *, ' at write field_const' print 1001, (X(II),II=1,3),(B(II),II=1,3) WRITE(3,1001) (X(II),II=1,3),(B(II),II=1,3) 1001 FORMAT(' X,B ',6F10.4) RETURN 300 CONTINUE RETURN END