Index: trunk/MagicSoft/Simulation/Detector/ReflectorII/Changelog
===================================================================
--- trunk/MagicSoft/Simulation/Detector/ReflectorII/Changelog	(revision 5335)
+++ trunk/MagicSoft/Simulation/Detector/ReflectorII/Changelog	(revision 5336)
@@ -1,3 +1,10 @@
 ** Add changes at the beginning! **
+
+03/11/2004 A. Moralejo
+
+reflector.c, header.c: Fixed problem: the correct telescope theta and 
+phi were not written to the output of reflector, because the variables 
+were filled before they were changed in the case of wobble mode. This has 
+been corrected.
 
 27/09/2004 A. Moralejo
Index: trunk/MagicSoft/Simulation/Detector/ReflectorII/header.c
===================================================================
--- trunk/MagicSoft/Simulation/Detector/ReflectorII/header.c	(revision 5335)
+++ trunk/MagicSoft/Simulation/Detector/ReflectorII/header.c	(revision 5336)
@@ -12,16 +12,4 @@
   memcpy(r,c,154*sizeof(float));
 
-  if (is_Fixed_Target)  // <- Added in September 2002, AM
-    {
-      /* Next 2 variables added in June 2002, AM */
-      r->telescopePhi      = fixed_Phi;
-      r->telescopeTheta    = fixed_Theta; 
-    }
-  // If no fixed target, telescope always points towards shower. AM Sep 2002
-  else
-    {
-      r->telescopePhi      = cheadp->Phi;
-      r->telescopeTheta    = cheadp->Theta; 
-    }
 } /*	end of TranslateHeader  */
 
Index: trunk/MagicSoft/Simulation/Detector/ReflectorII/reflector.c
===================================================================
--- trunk/MagicSoft/Simulation/Detector/ReflectorII/reflector.c	(revision 5335)
+++ trunk/MagicSoft/Simulation/Detector/ReflectorII/reflector.c	(revision 5336)
@@ -203,4 +203,12 @@
 	break;
       }	
+    
+    /* AM, Nov 2004: in case of wobble mode, change also the telescope 
+     * theta and phi in the container to be written to the output file 
+     * (rheadp) !
+     */
+
+    rheadp->telescopeTheta = tel_theta;
+    rheadp->telescopePhi = tel_phi;
 
     /* Calculate OmegaCT matrices  */
