~maddm/maddm/gamma_peak

« back to all changes in this revision

Viewing changes to Templates/src/directional_detection.f

  • Committer: olivier-mattelaer
  • Date: 2018-04-29 13:37:31 UTC
  • mfrom: (8.1.264 new_interface)
  • Revision ID: olivier-mattelaer-20180429133731-s273gb0uikrh6sv8
pass to version 3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
717
717
      double precision ER, costheta, sigmawn0SI, sigmawp0SI
718
718
      double precision MD, ve, diff, double_diff, diffcmp1, diffcmp2
719
719
      double precision fA, Z, sigmawn0SD, sigmawp0SD
720
 
      double precision Zna, ZI, Zcarb, Zfl, Zsul
 
720
      double precision Zna, zii, Zcarb, Zfl, Zsul
721
721
      double precision avgsn, avgsp, Js, Jsna, JsI, Jsc, Jsfl, Jssul
722
722
      double precision avgsnna, avgsnI, avgsnc, avgsnfl, avgsns
723
723
      double precision avgspna, avgspI, avgspc, avgspfl, avgsps
724
724
      double precision Aflour, AIo, Asod, Acarb, Asulp
725
 
      double precision Ana(10), AI(10), Abna(10), AbI(10), Abfl(10)
 
725
      double precision Ana(10), Aii(10), Abna(10), AbI(10), Abfl(10)
726
726
      double precision Afl(10), Acarbo(10), Abcarbo(10)
727
727
      double precision Asulph(10), Absulph(10)
728
728
      double precision A(10), Ab(10)
755
755
         do i = 1, 1
756
756
            Ana(i) = 0.d0
757
757
            Abna(i)= 0.d0
758
 
            AI(i)  = 0.d0
 
758
            Aii(i)  = 0.d0
759
759
            AbI(i) = 0.d0
760
760
         enddo
761
761
         
772
772
         
773
773
         Asod = Asod/nsod       ! Average of all abundance weighted Na contributions
774
774
         
775
 
         call target_material(7, AI, AbI, ZI, nIo)
 
775
         call target_material(7, Aii, AbI, zii, nIo)
776
776
         call Spin_matrix(7, JsI, avgspI, avgsnI)
777
777
         
778
778
         call diff_array(ER,costheta,sigmawn0SI,sigmawp0SI,sigmawn0SD,sigmawp0SD,MD,ve,
779
 
     &    7, AI, AbI, ZI, nIo, JsI, avgspI, avgsnI, diffcmp2,flag)
 
779
     &    7, Aii, AbI, zii, nIo, JsI, avgspI, avgsnI, diffcmp2,flag)
780
780
 
781
781
 
782
782
         do i = 1, nIo
783
 
            AIo = AIo + AI(i)*AbI(i) ! Adding all the I components weighted by their abundances
 
783
            AIo = AIo + Aii(i)*AbI(i) ! Adding all the I components weighted by their abundances
784
784
         enddo
785
785
         AIo = AIo/nIo          ! Average of all abundance weighted Na contributions
786
786
         
884
884
      Implicit none
885
885
      
886
886
      Integer   i, j, k, flag, n, mater
887
 
      double precision sec, KeV, cm, fm, km, barn, picbarn, GeV, MeV
888
 
      double precision MeVtoKev, GevtoKeV, c, v0, vesc, ve, AMU 
889
 
      double precision E0, MD0, RhoD, rn, muA, kmtocm, cs, daytosec, hrtosec
890
 
      double precision Naa, kratio, yrtosec, tontokg, hukgtokg, GeVtoMev
 
887
      double precision E0, MD0, rn, muA, v0, vesc, vearth, AMU, rhoD,c, ve
 
888
      double precision  kratio
891
889
      double precision MD, day, costheta 
892
 
      double precision diff, ER, vearth, invcmtoGeV, cmtoinvGeV
893
 
      double precision m_neutron, m_proton, fn, fp, Z, mu_p, mu_n
 
890
      double precision diff, ER
 
891
      double precision fn, fp, Z, mu_p, mu_n
894
892
      double precision ap, an, sigmawp0SI, sigmawn0SI, sigmawp0SD, sigmawn0SD
895
893
      double precision sigmawpSI, sigmawnSI, sigmawpSD, sigmawnSD
896
 
      double precision avgsp, avgsn, Js, formsd, g1, mq, lambbda, G_fermi
 
894
      double precision avgsp, avgsn, Js, formsd, mq, lambbda
897
895
      double precision IcSD, FWS
898
896
 
899
897
      double precision A(10), Ab(10)
928
926
      Allocate (SigmaSI(n))
929
927
      Allocate (sigmaSD(n))
930
928
      Allocate (sigmaWN(n))
931
 
 
932
 
! base units
933
 
      sec   = 1.d0
934
 
      GeV   = 1.d0
935
 
      cm    = 1.d0
936
 
      cs    = 1.d0
937
 
 
938
 
! Some important constants and conversion factors.
939
 
      
940
 
      fm         = 1.d-13*cm
941
 
      km         = 1.d+5*cm
942
 
      kmtocm     = 1.d+5
943
 
      barn       = 1.d-24*cm**2
944
 
      picbarn    = 1.d-12*1.d-24*cm**2
945
 
      GeVtokev   = 1.d+6
946
 
      GeVtoMeV   = 1.d+3
947
 
      invcmtoGeV = 1.98d-14 ! converts cm^-1 to GeV
948
 
      cmtoinvGeV = 5.076d+13 ! converts cm to GeV^-1
949
 
      Mevtokev   = 1.d+3
950
 
      daytosec   = 24.d0*60.d0*60.d0
951
 
      hrtosec    = 60.d0*60.d0
952
 
      tontokg    = 1000.d0
953
 
      hukgtokg   = 100.d0
954
 
      
955
 
      
956
 
      c         = 3.d+5*(km/sec) ! Speed of light
 
929
      
 
930
!       Some variables
 
931
            
 
932
      MD0       = MD*(GeV/cs**2)
 
933
      E0        = (1.d0/2.d0)*MD0*((v0/c)**2)*GeVtoKeV ! most probable kinetic energy of WIMPs
 
934
      
 
935
      sigmawnSI = sigmawn0SI*picobarn !WIMP-proton spin independent cross-section in cm^2
 
936
      sigmawpSI = sigmawp0SI*picobarn !WIMP-neutron spin independent cross-section in cm^2
 
937
 
 
938
      sigmawnSD = sigmawn0SD*picobarn !WIMP-neutron spin dependent cross-section in cm^2
 
939
      sigmawpSD = sigmawp0SD*picobarn !WIMP-proton spin dependent cross-section in cm^2
 
940
 
 
941
      mu_p      = MD0*M_proton/(MD0 + M_proton) ! reduced mass of Proton-WIMP
 
942
      mu_n      = MD0*M_neutron/(MD0 + M_neutron) ! reduced mass of Neutron-WIMP
 
943
 
957
944
      v0        = vMP*(km/sec) !Most Probable velocity of WIMPs in DM Halo
958
945
      vesc      = vescape*(km/sec) ! Escape velocity of a WIMP from the Galactic Halo.
959
946
      vearth    = ve*(km/sec) ! Velocity of the Earth, taken from the V_E function.
960
947
      AMU       = 0.932d0*(GeV/cs**2) ! Atomic Mass Units
961
948
      RhoD      = rhoDM*GeV*cs**(-2)*cm**(-3) !Density of Dark Matter in our local part of the Galaxy.
962
 
      Naa       = 6.023d+26 ! Avogadro's number
963
 
      M_neutron = 0.939*(GeV/cs**2) ! Mass of the Neutron
964
 
      M_proton  = 0.938*(GeV/cs**2) ! Mass of the Proton
965
 
      G_fermi   = 1.166d-5*(GeV**(-2)) ! Fermi Constant
966
 
      g1        = 0.357088d0 ! value of the U(1) gauge coupling constant
967
 
      
968
 
!       Some variables
969
 
            
970
 
      MD0       = MD*(GeV/cs**2)
971
 
      E0        = (1.d0/2.d0)*MD0*((v0/c)**2)*GeVtoKeV ! most probable kinetic energy of WIMPs
972
 
      
973
 
      sigmawnSI = sigmawn0SI*picbarn !WIMP-proton spin independent cross-section in cm^2
974
 
      sigmawpSI = sigmawp0SI*picbarn !WIMP-neutron spin independent cross-section in cm^2
975
 
 
976
 
      sigmawnSD = sigmawn0SD*picbarn !WIMP-neutron spin dependent cross-section in cm^2
977
 
      sigmawpSD = sigmawp0SD*picbarn !WIMP-proton spin dependent cross-section in cm^2
978
 
 
979
 
      mu_p      = MD0*M_proton/(MD0 + M_proton) ! reduced mass of Proton-WIMP
980
 
      mu_n      = MD0*M_neutron/(MD0 + M_neutron) ! reduced mass of Neutron-WIMP
 
949
 
 
950
      c         = 3.d+5 ! Speed of light in km/s
981
951
 
982
952
c form factor contribution terms for the spin independent calculation.
983
953
      fn  = sqrt((pi/4.d0)*sigmawnSI*(1.d0/mu_n)**2.d0) ! cm/GeV
1034
1004
         write(*,*) 'DM Mass is', MD0,'GeV/c^2'
1035
1005
         write(*,*) 'Recoil Energy :', ER,'keV'         
1036
1006
         do i = 1, n
1037
 
            write(*,*) 'Spin Independent cross-section:', sigmaSI(i)/picbarn ,'pb'
1038
 
            write(*,*) 'Spin dependent cross-section  :', sigmaSD(i)/picbarn ,'pb'
 
1007
            write(*,*) 'Spin Independent cross-section:', sigmaSI(i)/picobarn ,'pb'
 
1008
            write(*,*) 'Spin dependent cross-section  :', sigmaSD(i)/picobarn ,'pb'
1039
1009
         enddo
1040
1010
         write(*,*) 'an =', an*cmtoinvGeV
1041
1011
         write(*,*) 'an =', an*cmtoinvGeV