subroutine fpp_drift_dist(letime,toffset,iplane,dist) c c Written by Ed Brash c implicit none c include 'parameter.h' include 'espace_type.h' include 'detector.h' include 'transport.h' include 'option.h' c real*8 letime,toffset,dist real*8 time integer iw,iplane time=toffset-letime c this bit of code is for 85% Ar 15% CO2 c Uses the x-t relation of Mark Jones derived from a Garfield simulation c c if(time.gt.2.0) then c dist = .01868 + .00518*time + .000015775*time**2 - c > .00000018735*time**3 c else c dist = .00860 + .01200*time - .001470*time**2 c endif c Below is the result for integral method (EJB) c a single fit for all planes was used. c c if(time.gt.0.0.and.time.le.110.0) then c dist=15.199-0.32085*time+2.9064*time**2- c > .059774*time**3+.00054390*time**4-.0000018513*time**5 c dist=dist*0.522/5350.0 c else if ( time .le. 0 .and. time .gt. -10 ) then c dist = 0.0 c else c dist=1.0 c endif c Below is the result for integral method (EJB/MKJ) c an individual fit for each plane is used. c if(time.gt.0.0.and.time.le.200.0) then dist=0 do iw=1,6 dist = dist + spdetector.l.fpp.plane(iplane). > drift_dist_param(iw)*time**(iw-1) enddo if(dist.gt.0.522) dist=0.522 if (dist .lt. 0) dist = 0 else if ( time .le. 0 .and. time .gt. -10 ) then dist = 0.0 else dist=1.0 endif return end