Index: trunk/Mars/msimcamera/MSimRandomPhotons.cc
===================================================================
--- trunk/Mars/msimcamera/MSimRandomPhotons.cc	(revision 19698)
+++ trunk/Mars/msimcamera/MSimRandomPhotons.cc	(revision 19853)
@@ -144,5 +144,5 @@
     : fGeom(0), fEvt(0), fStat(0), /*fEvtHeader(0),*/ fRunHeader(0),
     fRates(0), fSimulateWavelength(kFALSE), fNameGeomCam("MGeomCam"),
-    fFileNameNSB("resmc/night-sky-la-palma.txt"), fForce(kFALSE)
+    /*fFileNameNSB("resmc/night-sky-la-palma.txt"),*/ fForce(kFALSE)
 {
     fName  = name  ? name  : "MSimRandomPhotons";
@@ -244,4 +244,14 @@
     const Float_t wmin = fRunHeader && fRunHeader->GetWavelengthMin()>s1->GetXmin() ? fRunHeader->GetWavelengthMin() : s1->GetXmin();
     const Float_t wmax = fRunHeader && fRunHeader->GetWavelengthMax()<s1->GetXmax() ? fRunHeader->GetWavelengthMax() : s1->GetXmax();
+
+    if (wmax-wmin<10 || wmax-wmin>=1000)
+    {
+        *fLog << err << "Wavelength range [" << wmin << ";" << wmax << "] out of range [10;1000)" << endl;
+        if (fRunHeader)
+            *fLog << " MCorsikaRunHeader:         [" << fRunHeader->GetWavelengthMin() << ";" << fRunHeader->GetWavelengthMax() << "]" << endl;
+        if (fRunHeader)
+            *fLog << " PhotonDetectionEfficiency: [" << s1->GetXmin() << ";" << s1->GetXmax() << "]" << endl;
+        return kFALSE;
+    }
 
     const Int_t min = TMath::FloorNint(wmin);
