diff --git a/simc/shared/musc.f b/simc/shared/musc.f index 2fd7dac6abedb2d7c982d8dd32c09eb2e9d26d43..7ade04d589b756a3531d7d439eb1d59143426bfd 100644 --- a/simc/shared/musc.f +++ b/simc/shared/musc.f @@ -2,7 +2,7 @@ C+_____________________________________________________________________ ! ! MUSC - Simulate multiple scattering of any particle. -! +! ! ASSUMPTIONS: DTH and DPH given in milli-radians, RAD_LEN in radiation ! lengths. The formula used is due to Rossi and Greisen (See the book ! by Segre, NUCLEI AND PARTICLES, 1982, p. 48.) The formula assumes a @@ -24,11 +24,13 @@ C+_____________________________________________________________________ C-_____________________________________________________________________ implicit none + include '../simulate.inc' real*8 musc_pdg, musc_with_tail real*8 rad_len, dth, dph real*8 beta, m2, p + logical heavy_tail if (rad_len.eq.0) return if (p.lt.25.) write(6,*) @@ -38,8 +40,13 @@ C-_____________________________________________________________________ beta = p / sqrt(m2+p*p) - dth = dth + musc_with_tail(beta, p, rad_len) - dph = dph + musc_with_tail(beta, p, rad_len) + if (doing_positron) + dth = dth + musc_with_tail(beta, p, rad_len) + dph = dph + musc_with_tail(beta, p, rad_len) + else + dth = dth + musc_pdg(beta, p, rad_len) + dph = dph + musc_pdg(beta, p, rad_len) + endif return end diff --git a/simc/simc.f b/simc/simc.f index 6acc7ae9fe7fed6655d6a97ca6a8b6fcc54da10a..9b11f180d081b9868b690f8d3155823262afcebd 100644 --- a/simc/simc.f +++ b/simc/simc.f @@ -1409,7 +1409,7 @@ c enddo ! ... change to P arm spectrometer coordinates (TRANSPORT system), if (abs(cos(spec%p%phi)).gt.0.0001) then !phi not at +/- pi/2 - write(6,*) 'y_P_arm, z_P_arm will be incorrect if spec.p.phi <> pi/2 or 3*pi/2' + write(6,*) 'y_P_arm, z_P_arm is incorrect if spec.p.phi <> pi/2 or 3pi/2' write(6,*) 'spec%p%phi=',spec%p%phi,'=',spec%p%phi*180/pi,'degrees' endif delta_P_arm = main%SP%p%delta @@ -1586,12 +1586,7 @@ C recon%p%delta = (recon%p%P-spec%p%P)/spec%p%P*100. ! ... multiple scattering - if (mc_smear .and. (.not. doing_muons)) then - call target_musc(orig%e%p, beta_electron, main%target%teff(2), dangles) - else - dangles(1)=0.0 - dangles(2)=0.0 - endif + call target_musc(orig%e%p, beta_electron, main%target%teff(2), dangles) main%SP%e%yptar = orig%e%yptar + dangles(1) + dang_in(1) main%SP%e%xptar = orig%e%xptar + dangles(2) + dang_in(2)*spec%e%cos_th @@ -1603,7 +1598,7 @@ C recon%p%delta = (recon%p%P-spec%p%P)/spec%p%P*100. ! ... change to E arm spectrometer coordinates (TRANSPORT system), if (abs(cos(spec%e%phi)).gt.0.0001) then !phi not at +/- pi/2 - write(6,*) 'y_E_arm, z_E_arm will be incorrect if spec.e.phi <> pi/2 or 3*pi/2' + write(6,*) 'y_E_arm, z_E_arm is incorrect if spec.e.phi <> pi/2 or 3*pi/2' write(6,*) 'spec.e.phi=',spec%e%phi,'=',spec%e%phi*180/pi,'degrees' endif delta_E_arm = main%SP%e%delta