Changeset 19853 for trunk/Mars


Ignore:
Timestamp:
11/01/19 15:12:38 (5 years ago)
Author:
tbretz
Message:
Added a few additional checks. No default file anymore (as the default file might not reside in this relative path)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/msimcamera/MSimRandomPhotons.cc

    r19542 r19853  
    144144    : fGeom(0), fEvt(0), fStat(0), /*fEvtHeader(0),*/ fRunHeader(0),
    145145    fRates(0), fSimulateWavelength(kFALSE), fNameGeomCam("MGeomCam"),
    146     fFileNameNSB("resmc/night-sky-la-palma.txt"), fForce(kFALSE)
     146    /*fFileNameNSB("resmc/night-sky-la-palma.txt"),*/ fForce(kFALSE)
    147147{
    148148    fName  = name  ? name  : "MSimRandomPhotons";
     
    244244    const Float_t wmin = fRunHeader && fRunHeader->GetWavelengthMin()>s1->GetXmin() ? fRunHeader->GetWavelengthMin() : s1->GetXmin();
    245245    const Float_t wmax = fRunHeader && fRunHeader->GetWavelengthMax()<s1->GetXmax() ? fRunHeader->GetWavelengthMax() : s1->GetXmax();
     246
     247    if (wmax-wmin<10 || wmax-wmin>=1000)
     248    {
     249        *fLog << err << "Wavelength range [" << wmin << ";" << wmax << "] out of range [10;1000)" << endl;
     250        if (fRunHeader)
     251            *fLog << " MCorsikaRunHeader:         [" << fRunHeader->GetWavelengthMin() << ";" << fRunHeader->GetWavelengthMax() << "]" << endl;
     252        if (fRunHeader)
     253            *fLog << " PhotonDetectionEfficiency: [" << s1->GetXmin() << ";" << s1->GetXmax() << "]" << endl;
     254        return kFALSE;
     255    }
    246256
    247257    const Int_t min = TMath::FloorNint(wmin);
Note: See TracChangeset for help on using the changeset viewer.