import numpy as np

def g(r1,r2,l):
  G= 0.5*np.pi**2* (r1**2+r2**2+l**2 - (  (r1**2+r2**2+l**2)**2 - 4*r1**2*r2**2    )**0.5 )
  return G


"""
l_atob=4.4 # atob
l_atoa=11.26 # atoa

r=1.74/2. # radius of a in cm

r1=r
r2=r
print(g(r1,r2,l_atoa))
print(g(r1,r2,l_atob))
"""

l=float(raw_input("Distance between both detectors in cm (i.e. 4.4cm for HET/AtoB or 11.26cm for HET/AtoA : "))
r1=float(raw_input("Radius of detector 1 in cm (i.e.  0.87 for HET): "))
r2=float(raw_input("Radius of detector 2 in cm (i.e.  0.87 for HET): "))

print("Geometry factor: %4.4f cm**2 sr" %g(r1,r2,l))
