1 cdaq 1.1 subroutine s_one_ev_track
2 *
3 * $Log:$
4
5 implicit none
6
7 include 'sos_data_structures.cmn'
8 include 'sos_tracking.cmn'
9 include 'sos_geometry.cmn'
10 include 'sos_calorimeter.cmn'
11 include 'gen_event_info.cmn'
12 include 'sos_one_ev.par'
13 include 'gen_one_ev_gctrak.cmn'
14 include 'gen_one_ev_gckine.cmn'
15 include 'gen_one_ev_gcvolu.cmn'
16
17 real track_x, track_y, track_z ! a point on the track
18 real track_x_slope, track_y_slope ! slope of the track
19 real x, y, z ! coordinates
20 real z_distance ! z distance to end of hut
21 integer track ! index variables
22 cdaq 1.1
23 *
24 * Take care of creating the reconstructed tracks
25 *
26 vect(4) = 0.0
27 vect(5) = 0.0
28 vect(6) = 1.
29 vect(7) = 1.
30 * ipart = 3 !electron to make track red
31 * ipart = 13 !neutron to make track black
32 * ipart = 5 !muon to make track green
33 ipart = 1 !photon to make track blue
34 tofg = 1e-5
35 itra = 1
36 * amass = 0.511e-3
37 * amass = 0.93957
38 sleng = 200.
39 step = 200.
40
41 do track = 1, SNTRACKS_FP
42 ipart = 1 !photon to make track blue
43 cdaq 1.1 if (track.eq.SSNUM_FPTRACK) then
44 ipart = 3 !electron to make track red
45 endif
46 track_x = -sx_fp(track) ! x position on track
47 track_y = sy_fp(track) ! y position on track
48 track_z = 0 ! z position on track
49 track_x_slope = -sxp_fp(track) ! track slope in x
50 track_y_slope = syp_fp(track) ! track slope in y
51
52 z = -SHUT_HEIGHT / 2. ! bottom of hut
53 z_distance = track_z - z ! distance from point to floor
54 x = track_x - z_distance * sin(track_x_slope) ! x loci
55 y = track_y - z_distance * sin(track_y_slope) ! y loci
56 vect(1) = x
57 vect(2) = y
58 vect(3) = z
59 call gsxyz
60 z = SHUT_HEIGHT / 2. ! bottom of hut
61 z_distance = z - track_z ! distance from point to roof
62 x = track_x + z_distance * sin(track_x_slope) ! x loci
63 y = track_y + z_distance * sin(track_y_slope) ! y loci
64 cdaq 1.1 vect(1) = x
65 vect(2) = y
66 vect(3) = z
67 call gsxyz
68 call gdxyz (track)
69 * call gdpart (itra,01,0.5) !this will number the tracks
70 itra = itra+1
71 * ipart = ipart+1 !this changes the color for each track
72 enddo
73 *
74 end
|