Index: trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc
===================================================================
--- trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc	(revision 9347)
+++ trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc	(revision 9348)
@@ -258,13 +258,13 @@
     */
 
-    const Int_t f = fPermanentReset ? 2 : 1;
-
-    Double_t xmin = h->GetWavelengthMin();
-    Double_t xmax = h->GetWavelengthMax();
-    Int_t    num  = TMath::CeilNint((xmax-xmin)/(5*f));
-
-    MH::FindGoodLimits(num, num, xmin, xmax, kFALSE);
-
-    MBinning(abs(num), xmin, xmax).Apply(fHistWL);
+    const Int_t f = fPermanentReset ? 10 : 2;
+
+    Double_t xmin = h->GetWavelengthMin()-20;
+    Double_t xmax = h->GetWavelengthMax()+20;
+    Int_t    num  = TMath::CeilNint((xmax-xmin)/f);
+
+    MH::FindGoodLimits(num, num, xmin, xmax, kTRUE);
+
+    MBinning(abs(num), xmin-.5, xmax-.5).Apply(fHistWL);
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/msim/MPhotonData.cc
===================================================================
--- trunk/MagicSoft/Mars/msim/MPhotonData.cc	(revision 9347)
+++ trunk/MagicSoft/Mars/msim/MPhotonData.cc	(revision 9348)
@@ -30,4 +30,6 @@
 //  Storage container to store Corsika events
 //
+// For details on the coordinate systems see our Wiki.
+//
 //   Version 1:
 //   ----------
@@ -97,9 +99,36 @@
 // --------------------------------------------------------------------------
 //
+// Return the square cosine of the Theta-angle == 1-CosU^2-CosV^2
+//
+Double_t MPhotonData::GetCosW2() const
+{
+    return 1 - GetSinW2();
+}
+
+// --------------------------------------------------------------------------
+//
+// Return the square sine of the Theta-angle == CosU^2+CosV^2
+//
+Double_t MPhotonData::GetSinW2() const
+{
+    return fCosU*fCosU + fCosV*fCosV;
+}
+
+// --------------------------------------------------------------------------
+//
 // 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 TMath::Sqrt(GetCosW2());
+}
+
+// --------------------------------------------------------------------------
+//
+// return the sine of the Theta-angle == sqrt(CosU^2+CosV^2)
+//
+Double_t MPhotonData::GetSinW() const
+{
+    return TMath::Sqrt(GetSinW2());
 }
 
@@ -110,5 +139,5 @@
 Double_t MPhotonData::GetTheta() const
 {
-    return TMath::ACos(GetCosW());
+    return TMath::ASin(GetSinW());
 }
 
@@ -186,5 +215,5 @@
     {
         // FIXME: Could be done in MPhotonEvent::ReadCorsikaEvent
-        gLog << err << "ERROR - MPhotonData::FillCorsika: fNummPhotons not 1, but " << fNumPhotons << endl;
+        gLog << err << "ERROR - MPhotonData::FillCorsika: fNumPhotons not 1, but " << fNumPhotons << endl;
         gLog << "        This is not yet supported." << endl;
         return kERROR;
@@ -196,5 +225,5 @@
     //fCosU = f[3];  // cos to x
     //fCosV = f[4];  // cos to y
-    // x=east, y=north
+    // x=west, y=south
     fPosX =  f[2];  // [cm]
     fPosY = -f[1];  // [cm]
Index: trunk/MagicSoft/Mars/msim/MPhotonData.h
===================================================================
--- trunk/MagicSoft/Mars/msim/MPhotonData.h	(revision 9347)
+++ trunk/MagicSoft/Mars/msim/MPhotonData.h	(revision 9348)
@@ -49,8 +49,4 @@
     Float_t fWeight; //! A weight for external use
 
-protected:
-    virtual Int_t FillCorsika(Float_t f[7]);
-    virtual Int_t FillRfl(Float_t f[8]);
-
 public:
     MPhotonData(/*const char *name=NULL, const char *title=NULL*/);
@@ -64,4 +60,7 @@
     Float_t  GetCosV()  const { return fCosV; }
     Double_t GetCosW()  const;
+    Double_t GetSinW()  const;
+    Double_t GetCosW2()  const;
+    Double_t GetSinW2()  const;
     Double_t GetTheta() const;
 
@@ -111,4 +110,5 @@
     Int_t GetTag() const { return fTag; }
 
+    // TObject
     //void Clear(Option_t * = NULL);
     void Print(Option_t * = NULL) const;
@@ -124,26 +124,14 @@
         return 0;
     }
-/*
-    void FillRad(TH1 &hist, Float_t scale=1) const;
-    void FillRad(TH2 &hist, Double_t x, Float_t scale=1) const;
-    void Fill(TH2 &hist, Float_t scale=1) const;
-    void Fill(TH3 &hist, Double_t z, Float_t scale=1) const;
- */
+
+    // I/O
     Int_t ReadCorsikaEvt(istream &fin);
     Int_t ReadRflEvt(istream &fin);
 
+    Int_t FillCorsika(Float_t f[7]);
+    Int_t FillRfl(Float_t f[8]);
+
     ClassDef(MPhotonData, 1) //Container to store a cherenkov photon bunch from a CORSUKA file
 };
-/*
-class MPhotonDataWeighted : public MPhotonData
-{
-private:
-    Float_t fWeight; // A weight for external use
 
-public:
-    Float_t GetWeight() const { return fWeight; }
-
-    ClassDef(MPhotonData, 1)
-};
-*/
 #endif
Index: trunk/MagicSoft/Mars/msim/MSimAbsorption.cc
===================================================================
--- trunk/MagicSoft/Mars/msim/MSimAbsorption.cc	(revision 9347)
+++ trunk/MagicSoft/Mars/msim/MSimAbsorption.cc	(revision 9348)
@@ -264,4 +264,7 @@
 Bool_t MSimAbsorption::ReInit(MParList *pList)
 {
+    if (fUseTheta)
+        return kTRUE;
+
     MCorsikaRunHeader *h = (MCorsikaRunHeader*)pList->FindObject("MCorsikaRunHeader");
     if (!h)
