Fixed get_direction.F.
This commit is contained in:
@ -34,16 +34,16 @@ c
|
|||||||
real*4 mass, mass_sqr, pz_sqr, z0
|
real*4 mass, mass_sqr, pz_sqr, z0
|
||||||
c
|
c
|
||||||
c-----------------------------------------------------------------------------
|
c-----------------------------------------------------------------------------
|
||||||
c
|
c
|
||||||
x = vect(1)
|
if ( lsets(2) .eq. 0 ) then ! positron created in MCP2 or sample
|
||||||
y = vect(2)
|
t_in_sample = tofg*1.e9 ! time in nsec
|
||||||
z = vect(3)
|
p = bfield(5) / 100. * exp(-beam_parameter(4)*t_in_sample) ! expo relaxation
|
||||||
r = sqrt(x**2 + y**2)
|
else
|
||||||
|
x = vect(1)
|
||||||
if (1.4 .le. z .and. z .le. 1.41 .and. r .le. 3.5) then
|
y = vect(2)
|
||||||
if ( lsets(2) .eq. 0 ) then ! muon created in MCP2 or sample
|
z = vect(3)
|
||||||
t_in_sample = tofg*1.e9 ! time in nsec
|
r = sqrt(x**2 + y**2)
|
||||||
else
|
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 = MU_MASS*1000. ! muon mass in MeV/c
|
||||||
mass_sqr = mass*mass
|
mass_sqr = mass*mass
|
||||||
pz_sqr = nt_pz0*nt_pz0
|
pz_sqr = nt_pz0*nt_pz0
|
||||||
@ -52,18 +52,18 @@ c
|
|||||||
if ( lsets(2) .lt. 0 ) z0 = -lsets(2)
|
if ( lsets(2) .lt. 0 ) z0 = -lsets(2)
|
||||||
tof = z0/beta/C_LIGHT
|
tof = z0/beta/C_LIGHT
|
||||||
t_in_sample = (tofg - tof)*1e9 ! time in nsec
|
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
|
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
|
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
|
c
|
||||||
#if defined (OS_UNIX)
|
#if defined (OS_UNIX)
|
||||||
call ranlux(random, 3) ! random generator from Mathlib
|
call ranlux(random, 3) ! random generator from Mathlib
|
||||||
|
@ -141,14 +141,12 @@ c lsets(3), lsets(4), lsets(5)
|
|||||||
c
|
c
|
||||||
else
|
else
|
||||||
#if defined (OS_UNIX)
|
#if defined (OS_UNIX)
|
||||||
call ranlux(random_2,7)
|
call ranlux(random_2,7)
|
||||||
#else
|
#else
|
||||||
do i = 1, 5
|
do i = 1, 5
|
||||||
random_2(i) = ran(ix1)
|
random_2(i) = ran(ix1)
|
||||||
enddo
|
enddo
|
||||||
#endif
|
#endif
|
||||||
c
|
|
||||||
|
|
||||||
c z0 = -74. ! start in vacuum upstream from MCP
|
c z0 = -74. ! start in vacuum upstream from MCP
|
||||||
z0 = float(lsets(2)) ! start in vacuum at z=z0;
|
z0 = float(lsets(2)) ! start in vacuum at z=z0;
|
||||||
radius = beam_parameter(3) * R_MCP * sqrt(random_2(1)) ! uniform distribution on MCP
|
radius = beam_parameter(3) * R_MCP * sqrt(random_2(1)) ! uniform distribution on MCP
|
||||||
|
Reference in New Issue
Block a user