Skip to content
Snippets Groups Projects
Commit e4a2d7e0 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

better handling of positron option to also ensure correct handling of the di-muon simulation

parent 353b5b80
No related branches found
No related tags found
No related merge requests found
Pipeline #117027 failed
...@@ -24,11 +24,13 @@ C+_____________________________________________________________________ ...@@ -24,11 +24,13 @@ C+_____________________________________________________________________
C-_____________________________________________________________________ C-_____________________________________________________________________
implicit none implicit none
include '../simulate.inc'
real*8 musc_pdg, musc_with_tail real*8 musc_pdg, musc_with_tail
real*8 rad_len, dth, dph real*8 rad_len, dth, dph
real*8 beta, m2, p real*8 beta, m2, p
logical heavy_tail
if (rad_len.eq.0) return if (rad_len.eq.0) return
if (p.lt.25.) write(6,*) if (p.lt.25.) write(6,*)
...@@ -38,8 +40,13 @@ C-_____________________________________________________________________ ...@@ -38,8 +40,13 @@ C-_____________________________________________________________________
beta = p / sqrt(m2+p*p) beta = p / sqrt(m2+p*p)
if (doing_positron)
dth = dth + musc_with_tail(beta, p, rad_len) dth = dth + musc_with_tail(beta, p, rad_len)
dph = dph + 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 return
end end
...@@ -1409,7 +1409,7 @@ c enddo ...@@ -1409,7 +1409,7 @@ c enddo
! ... change to P arm spectrometer coordinates (TRANSPORT system), ! ... change to P arm spectrometer coordinates (TRANSPORT system),
if (abs(cos(spec%p%phi)).gt.0.0001) then !phi not at +/- pi/2 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' write(6,*) 'spec%p%phi=',spec%p%phi,'=',spec%p%phi*180/pi,'degrees'
endif endif
delta_P_arm = main%SP%p%delta 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. ...@@ -1586,12 +1586,7 @@ C recon%p%delta = (recon%p%P-spec%p%P)/spec%p%P*100.
! ... multiple scattering ! ... multiple scattering
if (mc_smear .and. (.not. doing_muons)) then
call target_musc(orig%e%p, beta_electron, main%target%teff(2), dangles) call target_musc(orig%e%p, beta_electron, main%target%teff(2), dangles)
else
dangles(1)=0.0
dangles(2)=0.0
endif
main%SP%e%yptar = orig%e%yptar + dangles(1) + dang_in(1) 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 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. ...@@ -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), ! ... change to E arm spectrometer coordinates (TRANSPORT system),
if (abs(cos(spec%e%phi)).gt.0.0001) then !phi not at +/- pi/2 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' write(6,*) 'spec.e.phi=',spec%e%phi,'=',spec%e%phi*180/pi,'degrees'
endif endif
delta_E_arm = main%SP%e%delta delta_E_arm = main%SP%e%delta
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment