Index: trunk/Mars/msim/MPhotonData.cc
===================================================================
--- trunk/Mars/msim/MPhotonData.cc	(revision 18548)
+++ trunk/Mars/msim/MPhotonData.cc	(revision 18549)
@@ -177,7 +177,4 @@
 void MPhotonData::SimWavelength(Float_t wmin, Float_t wmax)
 {
-    if (fWavelength>0)
-        return;
-
     const Double_t w = gRandom->Uniform(wmin, wmax);
 
@@ -288,5 +285,5 @@
     fTime             =  f[4]/10.;              // a relative arival time [ns]
     fProductionHeight =  pow(10, f[5]/1000.);   // altitude of emission a.s.l. [cm]
-    fWavelength       =  TMath::Abs(f[7]);      // wavelength [nm]: 0 undetermined, <0 already in p.e.
+    fWavelength       =  f[7];                  // wavelength [nm]: 0 undetermined, <0 already in p.e.
 
     // Now reset all data members which are not in the stream
@@ -370,5 +367,5 @@
 //    gLog << "Num Photons:      " << fNumPhotons << " from " << MMcEvtBasic::GetParticleName(fPrimary) << endl;
     gLog << "Origin:           " << MMcEvtBasic::GetParticleName(fPrimary) << endl;
-    gLog << "Wavelength:       " << dec << fWavelength << "nm" << endl;
+    gLog << "Wavelength:       " << fWavelength << "nm" << endl;
     gLog << "Pos X/Y  Cos U/V: " << fPosX << "/" << fPosY << "   " << fCosU << "/" << fCosV << endl;
     gLog << "Time/Prod.Height: " << fTime << "ns/" << fProductionHeight/100 << "m" << endl;
Index: trunk/Mars/msim/MPhotonData.h
===================================================================
--- trunk/Mars/msim/MPhotonData.h	(revision 18548)
+++ trunk/Mars/msim/MPhotonData.h	(revision 18549)
@@ -37,5 +37,5 @@
 
     Float_t fTime;                       // [ns] Time since first interaction or entrance into atmosphere
-    UShort_t fWavelength;                // [nm] Wavelength
+    Short_t fWavelength;                 // [nm] Wavelength
 //    UInt_t   fNumPhotons;                // Number of cherenkov photons ins bunch
     Float_t  fProductionHeight;          // [cm] Height of bunch production
@@ -78,7 +78,10 @@
 
     // Getter Others
-    UShort_t GetWavelength() const { return fWavelength; }
+    UShort_t GetWavelength() const { return TMath::Abs(fWavelength); }
     Float_t GetProductionHeight() const { return fProductionHeight; }
     MMcEvtBasic::ParticleId_t GetPrimary() const { return fPrimary; }
+
+    // Status of the simulation of photons
+    Bool_t IncludesEfficiencies() const { return fWavelength<0; }
 
     //virtual Float_t GetWeight() const { return 1; }
@@ -97,5 +100,5 @@
 
     void SetPrimary(MMcEvtBasic::ParticleId_t p) { fPrimary=p; }
-    void SetWavelength(UShort_t wl) { fWavelength=wl; }
+    void SetWavelength(Short_t wl) { fWavelength=wl; }
 
     void AddTime(Double_t dt) { fTime += dt; }
Index: trunk/Mars/msim/MPhotonEvent.cc
===================================================================
--- trunk/Mars/msim/MPhotonEvent.cc	(revision 18548)
+++ trunk/Mars/msim/MPhotonEvent.cc	(revision 18549)
@@ -550,4 +550,10 @@
 {
     const UInt_t n = GetNumPhotons();
+    if (n==0)
+        return;
+
+    // Corsika has already produced and written the wavelength
+    if (operator[](0).GetWavelength()>0)
+        return;
 
     for (UInt_t i=0; i<n; i++)
