Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 9251)
+++ trunk/MagicSoft/Mars/Changelog	(revision 9252)
@@ -19,5 +19,4 @@
                                                  -*-*- END OF LINE -*-*-
 
-
  2009/01/23 Daniela Dorner
 
@@ -47,4 +46,13 @@
 
  2009/01/23 Thomas Bretz
+
+   * mcorsika/MCorsikaEvtHeader.[h,cc], msim/MPhotonData.[h,cc],
+     msimcamera/MSimExcessNoise.cc, msimreflector/MMirrorDisk.cc,
+     msimreflector/MMirrorHex.cc, msimreflector/MMirrorSquare.[h,cc],
+     msimreflector/MReflector.cc, msimreflector/MSimReflector.cc,
+     melectronics/MAnalogSignal.cc:
+     - moved code which needs TMath to source file
+     - included TMath for newer root versions
+     - included TObjArray for newer root versions
 
    * msimcamera/MSimAPD.[h,cc], msimcamera/MSimBundlePhotons.[h,cc], 
Index: trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.cc
===================================================================
--- trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.cc	(revision 9251)
+++ trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.cc	(revision 9252)
@@ -33,4 +33,6 @@
 #include <fstream>
 
+#include <TMath.h>
+
 #include "MLog.h"
 #include "MLogManip.h"
@@ -50,4 +52,13 @@
     fName  = name  ? name  : "MCorsikaEvtHeader";
     fTitle = title ? title : "Raw Event Header Information";
+}
+
+// --------------------------------------------------------------------------
+//
+//  Return Hypot(x, y)
+//
+Double_t MCorsikaEvtHeader::GetImpact() const
+{
+    return TMath::Hypot(fX, fY);
 }
 
Index: trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.h
===================================================================
--- trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.h	(revision 9251)
+++ trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.h	(revision 9252)
@@ -58,5 +58,5 @@
     Float_t GetY() const { return fY; }
 
-    Double_t GetImpact() const { return TMath::Hypot(fX, fY); }
+    Double_t GetImpact() const;
 
     Int_t  ReadEvt(istream& fin);    // read in event header block
Index: trunk/MagicSoft/Mars/melectronics/MAnalogSignal.cc
===================================================================
--- trunk/MagicSoft/Mars/melectronics/MAnalogSignal.cc	(revision 9251)
+++ trunk/MagicSoft/Mars/melectronics/MAnalogSignal.cc	(revision 9252)
@@ -34,4 +34,5 @@
 
 #include <TRandom.h>
+#include <TObjArray.h>
 
 #include "MLog.h"
Index: trunk/MagicSoft/Mars/msim/MPhotonData.cc
===================================================================
--- trunk/MagicSoft/Mars/msim/MPhotonData.cc	(revision 9251)
+++ trunk/MagicSoft/Mars/msim/MPhotonData.cc	(revision 9252)
@@ -40,4 +40,6 @@
 #include <iostream>
 
+#include <TMath.h>
+
 #include "MLog.h"
 #include "MLogManip.h"
@@ -95,4 +97,45 @@
 // --------------------------------------------------------------------------
 //
+// return the cosine of the Theta-angle == sqrt(1-CosU^2-CosV^2)
+//
+Double_t MPhotonData::GetCosW() const
+{
+    return TMath::Sqrt(1 - fCosU*fCosU - fCosV*fCosV);
+}
+
+// --------------------------------------------------------------------------
+//
+// Return the theta angle in radians
+//
+Double_t MPhotonData::GetTheta() const
+{
+    return TMath::ACos(GetCosW());
+}
+
+// --------------------------------------------------------------------------
+//
+// Return a TQuaternion with the first three components x, y, and z
+// and the fourth component the time.
+//
+TQuaternion MPhotonData::GetPosQ() const
+{
+    return TQuaternion(GetPos3(), fTime);
+}
+
+// --------------------------------------------------------------------------
+//
+// return a TQuaternion with the first three components the direction
+// moving in space (GetDir3()) and the fourth component is the
+// one devided by the speed of light (converted to cm/ns)
+//
+// FIXME: v in air!
+//
+TQuaternion MPhotonData::GetDirQ() const
+{
+    return TQuaternion(GetDir3(), 1./(TMath::C()*100/1e9));
+}
+
+// --------------------------------------------------------------------------
+//
 // Set the data member according to the 8 floats read from a reflector-file.
 // This function MUST reset all data-members, no matter whether these are
Index: trunk/MagicSoft/Mars/msim/MPhotonData.h
===================================================================
--- trunk/MagicSoft/Mars/msim/MPhotonData.h	(revision 9251)
+++ trunk/MagicSoft/Mars/msim/MPhotonData.h	(revision 9252)
@@ -21,9 +21,5 @@
 //class ifstream;
 #include <iosfwd>
-/*
-class TH1;
-class TH2;
-class TH3;
-*/
+
 class MCorsikaRunHeader;
 
@@ -67,6 +63,6 @@
     Float_t  GetCosU()  const { return fCosU; }
     Float_t  GetCosV()  const { return fCosV; }
-    Double_t GetCosW()  const { return TMath::Sqrt(1 - fCosU*fCosU - fCosV*fCosV); } // cos(Theta)
-    Double_t GetTheta() const { return TMath::ACos(GetCosW()); }
+    Double_t GetCosW()  const;
+    Double_t GetTheta() const;
 
     Double_t GetTime()  const { return fTime; }
@@ -81,8 +77,7 @@
     TVector3 GetDir3()  const { return TVector3(fCosU, fCosV, -GetCosW()); }
 
-    // Getter 4D                                      // cm   // ns
-    TQuaternion GetPosQ() const { return TQuaternion(GetPos3(), fTime); }
-    // FIXME: v in air!                                       // m/s  cm? / ns
-    TQuaternion GetDirQ() const { return TQuaternion(GetDir3(), 1./(TMath::C()*100/1e9)); }
+    // Getter 4D
+    TQuaternion GetPosQ() const;
+    TQuaternion GetDirQ() const;
 
     // Getter Others
Index: trunk/MagicSoft/Mars/msimcamera/MSimExcessNoise.cc
===================================================================
--- trunk/MagicSoft/Mars/msimcamera/MSimExcessNoise.cc	(revision 9251)
+++ trunk/MagicSoft/Mars/msimcamera/MSimExcessNoise.cc	(revision 9252)
@@ -39,4 +39,5 @@
 #include "MSimExcessNoise.h"
 
+#include <TMath.h>
 #include <TRandom.h>
 
Index: trunk/MagicSoft/Mars/msimreflector/MMirrorDisk.cc
===================================================================
--- trunk/MagicSoft/Mars/msimreflector/MMirrorDisk.cc	(revision 9251)
+++ trunk/MagicSoft/Mars/msimreflector/MMirrorDisk.cc	(revision 9252)
@@ -31,4 +31,8 @@
 //////////////////////////////////////////////////////////////////////////////
 #include "MMirrorDisk.h"
+
+#include <stdlib.h> // atof (Ubuntu 8.10)
+
+#include <TObjArray.h>
 
 #include <TEllipse.h>
Index: trunk/MagicSoft/Mars/msimreflector/MMirrorHex.cc
===================================================================
--- trunk/MagicSoft/Mars/msimreflector/MMirrorHex.cc	(revision 9251)
+++ trunk/MagicSoft/Mars/msimreflector/MMirrorHex.cc	(revision 9252)
@@ -31,4 +31,9 @@
 //////////////////////////////////////////////////////////////////////////////
 #include "MMirrorHex.h"
+
+#include <stdlib.h> // atof (Ubuntu 8.10)
+
+#include <TMath.h>
+#include <TObjArray.h>
 
 #include <TEllipse.h>
Index: trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.cc
===================================================================
--- trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.cc	(revision 9251)
+++ trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.cc	(revision 9252)
@@ -32,4 +32,9 @@
 #include "MMirrorSquare.h"
 
+#include <stdlib.h> // atof (Ubuntu 8.10)
+
+#include <TMath.h>
+#include <TObjArray.h>
+
 #include <TBox.h>
 #include <TEllipse.h>
@@ -41,4 +46,9 @@
 
 using namespace std;
+
+Double_t MMirrorSquare::GetMaxR() const
+{
+    return TMath::Sqrt(2.)*fSideLength;
+}
 
 // ------------------------------------------------------------------------
Index: trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.h
===================================================================
--- trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.h	(revision 9251)
+++ trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.h	(revision 9252)
@@ -13,5 +13,5 @@
     MMirrorSquare() : fSideLength(24.75) { }
 
-    Double_t GetMaxR() const { return TMath::Sqrt(2.)*fSideLength; }
+    Double_t GetMaxR() const;
 
     // This should fit with Paint()
Index: trunk/MagicSoft/Mars/msimreflector/MReflector.cc
===================================================================
--- trunk/MagicSoft/Mars/msimreflector/MReflector.cc	(revision 9251)
+++ trunk/MagicSoft/Mars/msimreflector/MReflector.cc	(revision 9252)
@@ -33,4 +33,7 @@
 #include <errno.h>
 
+#include <stdlib.h> // atof (Ubuntu 8.10)
+
+#include <TClass.h>
 #include <TSystem.h>
 
Index: trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc
===================================================================
--- trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc	(revision 9251)
+++ trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc	(revision 9252)
@@ -30,4 +30,5 @@
 #include "MSimReflector.h"
 
+#include <TMath.h>
 #include <TRandom.h>
 
