Page MenuHomeHEPForge

test_f_from_t3.f90
No OneTemporary

test_f_from_t3.f90

!-------------------------------------------------------------------
program test_f_from_t3
!-------------------------------------------------------------------
!
! Program to test the new subroutine f_from_t3 against the old subroutines
! f_at_const_mass_and_log10sf,f_at_const_massratio_and_log10sf
! f_from_t3 should give exactly the same results as these old subroutines in the appropriate limiting cases.
! The testing was successful for the example given here.
!
! It is compiled and run using:
! gfortran -L../HiggsBounds_KW/ -I../HiggsBounds_KW/ old_S95tables_functions.f90 test_f_from_t3.f90 -o test_f_from_t3.exe -lHB
! ./test_f_from_t3.exe
!
! 10th March 2011
!-------------------------------------------------------------------
use S95tables
use old_S95tables_functions
use S95tables_type1
use S95tables_type2
use S95tables_type3
use theory_BRfunctions, only : setup_BRSM
implicit none
type(table1) :: f_t1
integer :: i,x
integer :: elementnum,id,testnumber
double precision :: M1,M2,log10sf
integer :: datcomp,vmassm1orm2
double precision :: sepmultfactor,valueoutsidetable
character(LEN=8) :: createdate
character(LEN=10) :: createtime
call setup_BRSM !needed for setup_S95tables
call setup_S95tables
allocate(clsb_t3(ntable3))
call initializetables_type3_blank(clsb_t3)
call initializetables3(clsb_t3)
call fillt3needs_M2_gt_2M1(clsb_t3,S95_t2)
call readclsbfiles_binary
call date_and_time(createdate,createtime)
write(*,*)trim(createtime(1:2)//':'//createtime(3:4))//':'//createtime(5:6)
call flush(6)
testnumber = 1
id = 1500!1420
M1 = 40.0D0
M2 = 90.0D0
log10sf = -0.03D0
elementnum=t3elementnumberfromid(clsb_t3,id)
datcomp=1
sepmultfactor=0.01D0
valueoutsidetable=-1.0D0
select case(testnumber)
case(1)
select case(clsb_t3(elementnum)%type_of_assoc_table)
case(1)
vmassm1orm2=1
call f_from_t3(clsb_t3(elementnum),&
& clsb_t3(elementnum)%xmin1,clsb_t3(elementnum)%xmin2, &
& clsb_t3(elementnum)%xmax1,clsb_t3(elementnum)%xmin2, &
& log10sf, &
& vmassm1orm2,clsb_t3(elementnum)%xmin1,clsb_t3(elementnum)%xmax1,sepmultfactor,datcomp, &
& f_t1,valueoutsidetable)
case(2)
vmassm1orm2=2
!old method
! call f_at_const_mass_and_log10sf(clsb_t3(elementnum), &
! & clsb_t3(elementnum)%xmin2,clsb_t3(elementnum)%xmax2, &
! & datcomp,M1,M2,log10sf,f_t1, &
! & valueoutsidetable,sepmultfactor)
!new method
call f_from_t3(clsb_t3(elementnum),M1,clsb_t3(elementnum)%xmin2,M1,clsb_t3(elementnum)%xmax2, &
& log10sf, &
& vmassm1orm2,clsb_t3(elementnum)%xmin2,clsb_t3(elementnum)%xmax2,sepmultfactor,datcomp, &
& f_t1,valueoutsidetable)
! the old and new methods give exactly the same for this example
case default
stop'huh, that wasn"t right...(2)'
end select
case(2)
vmassm1orm2=1
!old method
!call f_at_const_massratio_and_log10sf(clsb_t3(elementnum), &
! & clsb_t3(elementnum)%xmin1,clsb_t3(elementnum)%xmax1, &
! & datcomp,M1,M2,log10sf,f_t1, &
! & valueoutsidetable,sepmultfactor)
!new method
call f_from_t3(clsb_t3(elementnum), &
& 0.0D0,0.0D0, &
& M1,M2, &
& log10sf, &
& vmassm1orm2,clsb_t3(elementnum)%xmin1,clsb_t3(elementnum)%xmax1,sepmultfactor,datcomp, &
& f_t1,valueoutsidetable)
! the old and new methods give exactly the same for this example
case default
stop'huh, that wasn"t right...(1)'
end select
do i=1,ubound(f_t1%dat,dim=1)
write(*,*)f_t1%xmin + dble(i-1)*f_t1%sep, f_t1%dat(i,1)
enddo
call date_and_time(createdate,createtime)
write(*,*)trim(createtime(1:2)//':'//createtime(3:4))//':'//createtime(5:6)
call flush(6)
deallocate(f_t1%dat)
end program test_f_from_t3

File Metadata

Mime Type
text/plain
Expires
Wed, May 14, 10:30 AM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5070601
Default Alt Text
test_f_from_t3.f90 (3 KB)

Event Timeline