diff --git a/geant3/src/lemsr/get_direction.F b/geant3/src/lemsr/get_direction.F index 854506f..09bdad9 100644 --- a/geant3/src/lemsr/get_direction.F +++ b/geant3/src/lemsr/get_direction.F @@ -32,12 +32,18 @@ c real*4 x,y,z,r real*4 t_in_sample,tof,beta,gamma_sqr ! to add relaxation in sample real*4 mass, mass_sqr, pz_sqr, z0 + real*4 arg c c----------------------------------------------------------------------------- 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 + arg = beam_parameter(4)*t_in_sample + if (arg > 10. ) then + p = 0. + else + p = bfield(5) / 100. * dexp(-dble(arg)) ! expo relaxation + endif else x = vect(1) y = vect(2)