Index: trunk/MagicSoft/Mars/mtemp/MTelAxisFromStars.cc
===================================================================
--- trunk/MagicSoft/Mars/mtemp/MTelAxisFromStars.cc	(revision 4749)
+++ trunk/MagicSoft/Mars/mtemp/MTelAxisFromStars.cc	(revision 4750)
@@ -40,4 +40,5 @@
 //
 /////////////////////////////////////////////////////////////////////////////
+#include <TMath.h>
 #include <TList.h>
 #include <TSystem.h>
@@ -124,5 +125,5 @@
    if (!fStarCam)
    {
-       *fLog << err << "MTelAxisFromStars::PreProcess; container 'MStarCam' not found... aborting." << endl;
+       *fLog << err << "MStarCam not found... aborting." << endl;
        return kFALSE;
    }
@@ -132,5 +133,5 @@
    if (!fSourceCam)
    {
-       *fLog << err << "MTelAxisFromStars::PreProcess; container 'MSourceCam' not found... continue  " << endl;
+       *fLog << warn << "MSourceCam[MStarCam] not found... continue  " << endl;
    }
 
@@ -139,36 +140,22 @@
     fSrcPos = (MSrcPosCam*)pList->FindCreateObj(AddSerialNumber("MSrcPosCam"), "MSrcPosCam");
     if (!fSrcPos)
-    {
-        *fLog << err << "MTelAxisFromStars::PreProcess;  MSrcPosCam not found...  aborting" << endl;
         return kFALSE;
-    }
 
     fPntPos = (MSrcPosCam*)pList->FindCreateObj(AddSerialNumber("MSrcPosCam"), "MPntPosCam");
     if (!fPntPos)
-    {
-        *fLog << err << "MTelAxisFromStars::PreProcess;  MPntPosCam not found...  aborting" << endl;
         return kFALSE;
-    }
 
     fPointPos = (MPointingPos*)pList->FindCreateObj(AddSerialNumber("MPointingPos"), "MPointingPos");
     if (!fPointPos)
-    {
-        *fLog << err << "MTelAxisFromStars::PreProcess;  MPointingPos not found...  aborting" << endl;
         return kFALSE;
-    }
 
     fSourcePos = (MPointingPos*)pList->FindCreateObj(AddSerialNumber("MPointingPos"), "MSourcePos");
     if (!fSourcePos)
-    {
-        *fLog << err << "MTelAxisFromStars::PreProcess;  MSourcePos[MPointingPos] not found...  aborting" << endl;
         return kFALSE;
-    }
 
     fSkyCamTrans = (MSkyCamTrans*)pList->FindCreateObj(AddSerialNumber("MSkyCamTrans"));
     if (!fSkyCamTrans)
-    {
-        *fLog << err << "MTelAxisFromStars::PreProcess;  MSkyCamTrans not found...  aborting" << endl;
         return kFALSE;
-    }
+
 
    //-----------------------------------------------------------------
@@ -539,7 +526,8 @@
     while ( (starSource = (MStarPos*)setnextSource()) )
     {
-       Double_t corr = esxy[0][1][ix]/ sqrt( esxy[0][0][ix] * esxy[1][1][ix] );
+       Double_t corr = esxy[0][1][ix] / 
+                       TMath::Sqrt( esxy[0][0][ix] * esxy[1][1][ix] );
        starSource->SetFitValues(100.0, 100.0, bsxy[0][ix], bsxy[1][ix],
-	        sqrt(esxy[0][0][ix]), sqrt(esxy[1][1][ix]), corr,
+	        TMath::Sqrt(esxy[0][0][ix]), TMath::Sqrt(esxy[1][1][ix]), corr,
                 esxy[0][0][ix],       esxy[0][1][ix],       esxy[1][1][ix], 
                 fChi2, fNdof); 
@@ -726,15 +714,13 @@
   Double_t alfa = 0.0;
   if (fixedrotationangle != -1.0)
-    alfa = fixedrotationangle / kRad2Deg;
-
-
+    alfa = fixedrotationangle / TMath::RadToDeg();
 
   Double_t alfaold   = alfa;
   // maximum allowed change of alfa in 1 iteration step (5 degrees)
-  Double_t dalfamax = 5.0 / kRad2Deg;
+  Double_t dalfamax = 5.0 / TMath::RadToDeg();
   Double_t dalfa = 0.0;
 
-  Double_t cosal = cos(alfa);
-  Double_t sinal = sin(alfa);
+  Double_t cosal = TMath::Cos(alfa);
+  Double_t sinal = TMath::Sin(alfa);
 
   A[0][0] =  cosal;
@@ -821,5 +807,5 @@
   //                 or  chi2              is less than 'tolchi2'
   Double_t told2 = 0.3*0.3;  // [mm*mm]; 1/100 of an inner pixel diameter
-  Double_t toldalfa = 0.01 / kRad2Deg;  // 0.01 degrees 
+  Double_t toldalfa = 0.01 / TMath::RadToDeg();  // 0.01 degrees 
   Double_t toldlambda = 0.00006;   // uncertainty of 1 mm of distance 
                                    // between camera and reflector
@@ -991,8 +977,8 @@
         alfa = alfaold + dalfa;
 
-        if ( alfa < -5.0/kRad2Deg )
-          alfa = -5.0/kRad2Deg;
-        else if ( alfa > 5.0/kRad2Deg )
-          alfa = 5.0/kRad2Deg;
+        if ( alfa < -5.0/TMath::RadToDeg() )
+          alfa = -5.0/TMath::RadToDeg();
+        else if ( alfa > 5.0/TMath::RadToDeg() )
+          alfa = 5.0/TMath::RadToDeg();
         
         dalfa = alfa - alfaold;
@@ -1000,6 +986,6 @@
         alfaold = alfa;
 
-        sinal = sin(alfa);
-        cosal = cos(alfa);
+        sinal = TMath::Sin(alfa);
+        cosal = TMath::Cos(alfa);
 
         A[0][0] =  cosal;
@@ -1068,5 +1054,5 @@
   //-------   end of iteration *****************************************
 
-  alfadeg = alfa * kRad2Deg;
+  alfadeg = alfa * TMath::RadToDeg();
 
   // calculate error matrix of d[2]
@@ -1253,24 +1239,14 @@
 
 // --------------------------------------------------------------------------
-//
-//
-Int_t MTelAxisFromStars::PostProcess()
-{
-
-    return kTRUE;
-}
-
-
-// --------------------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Index: trunk/MagicSoft/Mars/mtemp/MTelAxisFromStars.h
===================================================================
--- trunk/MagicSoft/Mars/mtemp/MTelAxisFromStars.h	(revision 4749)
+++ trunk/MagicSoft/Mars/mtemp/MTelAxisFromStars.h	(revision 4750)
@@ -50,5 +50,4 @@
     Int_t  PreProcess(MParList *pList);
     Int_t  Process();
-    Int_t  PostProcess();
 
  public:
