Index: trunk/MagicSoft/Simulation/Detector/Reflector/attenu.f
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Reflector/attenu.f	(revision 406)
+++ trunk/MagicSoft/Simulation/Detector/Reflector/attenu.f	(revision 407)
@@ -11,4 +11,5 @@
 c @T \newpage
 
+
 c @section Source code of {\tt attenu.f}
 
@@ -39,5 +40,5 @@
       real trr, trm, tro
       REAL LONG(12)
-c fs define obervation level
+c fs: define obervation level
       double precision obslev      
       INTEGER I,CON_OZ,CON_MI J, ROW
@@ -277,5 +278,5 @@
       DATA BATM / 1222.6562D0,1144.9069D0,1305.5948D0,540.1778D0,0.D0  /
       DATA CATM / 994186.38D0,878153.55D0,636143.04D0,772170.16D0,1.D-9/
-c fs 190400 unterster Layer ist 2200.d0 (observation level)
+c fs 190400: lowest Layer is 2200.d0 (observation level)
 c      DATA LAHG / 2000.0D2,4.0D5,1.0D6,4.0D6,1.0D7 /  
       DATA LAHG / 2200.0D2,4.0D5,1.0D6,4.0D6,1.0D7 /
@@ -315,5 +316,5 @@
       T_Oz = 1.0
       
-c fs : hier fehler: hoehe mit obslev = 0. !!!!
+c fs : error: height with obslev = 0. !!!!
 c      H = -RT + SQRT(RT**2 + (height/COS(theta))**2 +
 c     +     (2.0D0*RT*height))
@@ -328,9 +329,13 @@
 *     LARGE ZENITH ANGLE FACTOR (AIR MASS):
       
-c fs : Korrekturfaktor fuer falsche Hoehe richtig???
-c (H is hier 'wahre Hoehe'; oben: height: apparent height)
-c aber: fuer curved-version nicht noetig => raus      
+c fs : air mass factor = path_lenght(za) / path_lenght(vertical) 
+c                        at point of emission of cherenkov photon
+c      => pure geometric correction on 
+c         absorption lenght measured at vertical height [km^-1]   
 c      m= (1.D0/H)*(SQRT((RT*COS(theta))**2+(2*RT*H)+H**2)-
 c     +     (RT*COS(theta)))
+      m = (1.d0/(h-obslev)) * 
+     &   ( -(rt+obslev)*cos(theta) 
+     &     +sqrt( (rt+h)**2 - ((rt+obslev)*sin(theta))**2) )
 **********************************************************************   
           
@@ -356,7 +361,6 @@
  91   CONTINUE
  
-c fs : curved-version => kein m-Faktor!
-c 92   RHO_FI = m*RHOTOT
- 92   rho_fi = rhotot
+
+ 92   RHO_FI = m*RHOTOT
 
       T_Ray = EXP(-(RHO_FI/XR)*(400.D0/wavelength)**4)
@@ -395,7 +399,6 @@
           GOTO 1001
         ENDIF
-c fs : curved-version => kein m-Faktor!
-c        T_Mie =  EXP(-(m*TOT_AE))
-        t_mie =  exp(-(tot_ae))           
+
+        T_Mie =  EXP(-(m*TOT_AE))           
 
 
@@ -423,7 +426,5 @@
       ENDIF
       
-c fs : curved-version => kein m-Faktor!
-c      T_Oz = EXP(-(m*TOT_OZ))
-      t_oz = exp(-(tot_oz))        
+      T_Oz = EXP(-(m*TOT_OZ))      
 
 ************************************************************************
