1 jones 1.1 subroutine mc_calo_recon (delta_p,delta_t,delta_phi,y_tgt,fry,delta_y,delta_z,drift_to_cal)
2 C+______________________________________________________________________________
3 !
4 ! MC_CALO_RECON : Reconstruct target quantities from tracks.
5 ! This subroutine is part of the MC_HMS program.
6 !
7 ! Right-handed coordinates are assumed: X=down, Z=downstream, Y = (Z cross X)
8 !
9 ! Inputs are from common block in track_*.inc (except for fry):
10 ! xs, ys, fry are in cm.
11 ! dxdzs, dydzs are unitless slopes (we say "radians" to contrast to "mr").
12 C-______________________________________________________________________________
13
14 implicit none
15
16 include '../spectrometers.inc'
17
18 integer*4 specnum
19 parameter (specnum = 5) !this is the CALO routine
20
21 C Argument definitions.
22 jones 1.1
23 real*8 delta_p,delta_t,delta_phi,y_tgt
24 real*8 fry !vertical position at target (+y=down)
25 real*8 ztemp,drift_to_cal,delta_y,delta_z
26
27 C Misc. variables.
28
29 integer*4 i,j
30 integer*4 chan
31
32 logical firsttime /.true./
33 character*132 line
34
35 C Functions.
36
37 logical locforunt
38
39 C No amnesia, please...
40
41 save
42
43 jones 1.1 C ============================= Executable Code ================================
44
45 C Load output values.
46
47 delta_p = dpps
48 delta_phi = (xs-fry)/(drift_to_cal-delta_z)
49 delta_t = (ys-delta_y)/(drift_to_cal-delta_z)
50
51 c mkj cannot determine y_tgt from the calorimeter.
52 y_tgt = -100.
53 return
54
55 C ============================ Format Statements ===============================
56
57 1001 format(a)
58 1200 format(1x,4g16.9,1x,5i1)
59
60 END
61
|