diff --git a/geant3/src/lemsr/get_direction.F b/geant3/src/lemsr/get_direction.F index bba26ba..854506f 100644 --- a/geant3/src/lemsr/get_direction.F +++ b/geant3/src/lemsr/get_direction.F @@ -34,16 +34,16 @@ c real*4 mass, mass_sqr, pz_sqr, z0 c c----------------------------------------------------------------------------- -c - x = vect(1) - y = vect(2) - z = vect(3) - r = sqrt(x**2 + y**2) - - if (1.4 .le. z .and. z .le. 1.41 .and. r .le. 3.5) then - if ( lsets(2) .eq. 0 ) then ! muon created in MCP2 or sample - t_in_sample = tofg*1.e9 ! time in nsec - else +c + if ( lsets(2) .eq. 0 ) then ! positron created in MCP2 or sample + t_in_sample = tofg*1.e9 ! time in nsec + p = bfield(5) / 100. * exp(-beam_parameter(4)*t_in_sample) ! expo relaxation + else + x = vect(1) + y = vect(2) + z = vect(3) + r = sqrt(x**2 + y**2) + if (1.4 .le. z .and. z .le. 1.41 .and. r .le. 3.5) then mass = MU_MASS*1000. ! muon mass in MeV/c mass_sqr = mass*mass pz_sqr = nt_pz0*nt_pz0 @@ -52,18 +52,18 @@ c if ( lsets(2) .lt. 0 ) z0 = -lsets(2) tof = z0/beta/C_LIGHT t_in_sample = (tofg - tof)*1e9 ! time in nsec + p = bfield(5) / 100. * exp(-beam_parameter(4)*t_in_sample) ! expo relaxation + else + p = bfield(4) / 100. endif - p = bfield(5) / 100. * exp(-beam_parameter(4)*t_in_sample) ! expo relaxation -c print*,' lsets(2) = ',lsets(2) -c print*,' nt_pz0 = ',nt_pz0 -c print*,' beta = ',beta -c print*,' tofg = ',tofg -c print*,' tof = ',tof -c print*,' t_in_sample = ',t_in_sample -c print*,' Polarization = ',p - else - p = bfield(4) / 100. endif +c print*,' lsets(2) = ',lsets(2) +c print*,' nt_pz0 = ',nt_pz0 +c print*,' beta = ',beta +c print*,' tofg = ',tofg +c print*,' tof = ',tof +c print*,' t_in_sample = ',t_in_sample +c print*,' Polarization = ',p c #if defined (OS_UNIX) call ranlux(random, 3) ! random generator from Mathlib diff --git a/geant3/src/lemsr/gukine.F b/geant3/src/lemsr/gukine.F index 8f5c015..941df12 100644 --- a/geant3/src/lemsr/gukine.F +++ b/geant3/src/lemsr/gukine.F @@ -141,14 +141,12 @@ c lsets(3), lsets(4), lsets(5) c else #if defined (OS_UNIX) - call ranlux(random_2,7) + call ranlux(random_2,7) #else - do i = 1, 5 - random_2(i) = ran(ix1) - enddo + do i = 1, 5 + random_2(i) = ran(ix1) + enddo #endif -c - c z0 = -74. ! start in vacuum upstream from MCP z0 = float(lsets(2)) ! start in vacuum at z=z0; radius = beam_parameter(3) * R_MCP * sqrt(random_2(1)) ! uniform distribution on MCP