Ignore:
Timestamp:
09/22/10 09:12:58 (14 years ago)
Author:
tbretz
Message:
Improved output in MSimRandomPhotons
File:
1 edited

Legend:

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

    r9913 r9932  
    332332
    333333    // Check if the photon flux is zero at both ends of the NSB
    334     if (nsb.GetSpline()->Eval(min)>1e-5)
    335     {
    336         *fLog << warn << "WARNING - Transmitted NSB spectrum at detector at ";
    337         *fLog << wmin << "nm is not zero, but " << nsb.GetSpline()->Eval(wmin) << "... abort." << endl;
    338     }
    339     if (nsb.GetSpline()->Eval(max)>1e-5)
    340     {
    341         *fLog << warn << "WARNING - Transmitted NSB spectrum at detector at ";
    342         *fLog << wmax << "nm is not zero, but " << nsb.GetSpline()->Eval(wmax) << "... abort." << endl;
     334    if (eff.GetSpline()->Eval(min)>1e-5)
     335    {
     336        *fLog << warn << "WARNING - Total transmission efficiency at detector at ";
     337        *fLog << min << "nm is not zero, but " << nsb.GetSpline()->Eval(min) << "... abort." << endl;
     338    }
     339    if (eff.GetSpline()->Eval(max)>1e-5)
     340    {
     341        *fLog << warn << "WARNING - Total transmission efficiency at detector at ";
     342        *fLog << max << "nm is not zero, but " << nsb.GetSpline()->Eval(max) << "... abort." << endl;
    343343    }
    344344
    345345    // Check if the photon flux is zero at both ends of the simulated region
    346     if (nsb.GetSpline()->Eval(fRunHeader->GetWavelengthMin())>1e-5)
    347     {
    348         *fLog << err << "ERROR - Transmitted NSB spectrum at detector at minimum simulated wavelength ";
    349         *fLog << fRunHeader->GetWavelengthMin() << "nm is not zero... abort." << endl;
    350         return kFALSE;
    351     }
    352     if (nsb.GetSpline()->Eval(fRunHeader->GetWavelengthMax())>1e-5)
    353     {
    354         *fLog << err << "ERROR - Transmitted NSB spectrum at detector at maximum simulated wavelength ";
    355         *fLog << fRunHeader->GetWavelengthMax() << "nm is not zero... abort." << endl;
     346    if (eff.GetSpline()->Eval(wmin)>1e-5)
     347    {
     348        *fLog << err << "ERROR - Total transmission efficiency at detector at minimum simulated wavelength ";
     349        *fLog << wmin << "nm is not zero... abort." << endl;
     350        *fLog << "        PhotonDetectionEfficency: " << s1->GetSpline()->Eval(wmin) << endl;
     351        *fLog << "        ConeTransmission:         " << s2->GetSpline()->Eval(wmin) << endl;
     352        *fLog << "        MirrorReflectivity:       " << s3->GetSpline()->Eval(wmin) << endl;
     353        *fLog << "        TotalEfficiency:          " << eff.GetSpline()->Eval(wmin) << endl;
     354        return kFALSE;
     355    }
     356    if (eff.GetSpline()->Eval(wmax)>1e-5)
     357    {
     358        *fLog << err << "ERROR - Total transmission efficiency at detector at maximum simulated wavelength ";
     359        *fLog << wmax << "nm is not zero... abort." << endl;
     360        *fLog << "        PhotonDetectionEfficency: " << s1->GetSpline()->Eval(wmax) << endl;
     361        *fLog << "        ConeTransmission:         " << s2->GetSpline()->Eval(wmax) << endl;
     362        *fLog << "        MirrorReflectivity:       " << s3->GetSpline()->Eval(wmax) << endl;
     363        *fLog << "        TotalEfficiency:          " << eff.GetSpline()->Eval(wmax) << endl;
    356364        return kFALSE;
    357365    }
Note: See TracChangeset for help on using the changeset viewer.