Hi everyone,(adsbygoogle = window.adsbygoogle || []).push({});

I want to write a program in FORTRAN which calculate the detection efficiency for a punctual source and a disc source at a distance from the detector .The disc detector is assumed to be perfect: ie photon absorbing everything that falls on it. So here I am working in 3D and I use ux, uy and uz to lead the photon randomly using the spherical coordinate system

a) efficiency vs the detector radius

b) efficiency as a function of source detector distance

c) efficiency according to the radius of the source

Here's the code that I am trying to write for a point source;

program sourceponc

integer i,N

real x,y,z,eff,count,Dds,rd,ux,uy,uz,t

count=0

do i=1,N

theta = acos(1-2*rand())

phi = 2*pi*rand()

ux=cos(theta)sin(phi)

uy=sin(theta)sin(phi)

uz=cos(theta)

t=Dds/uz

x=ux*t

y=uy*t

if(sqrt(x**2+y**2+z**2).le.1)then

count=count+1

endif

end do

eff=count/N

print*,eff

end

There's someone there who could help me ??? Thank you in advance

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Program in FORTRAN which calculate the detection efficiency

Loading...

Similar Threads - Program FORTRAN calculate | Date |
---|---|

How to buy Fortran Programming Software Commersial License | Jan 30, 2018 |

Fortran 90/95 function | Dec 17, 2015 |

Input/Output error with error code -5 | Dec 16, 2015 |

Hi,Below is a fortran program to calculate the roots of an | Aug 9, 2011 |

**Physics Forums - The Fusion of Science and Community**