Changeset 19542


Ignore:
Timestamp:
06/04/19 10:25:32 (5 years ago)
Author:
tbretz
Message:
Allow to turn some checks off for testing purposes (only\!), replaces MReflector by the new base class MOptics
Location:
trunk/Mars/msimcamera
Files:
2 edited

Legend:

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

    r10092 r19542  
    131131#include "MSpline3.h"
    132132#include "MParSpline.h"
    133 #include "MReflector.h"
     133#include "MOptics.h"
    134134
    135135ClassImp(MSimRandomPhotons);
     
    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")
     146    fFileNameNSB("resmc/night-sky-la-palma.txt"), fForce(kFALSE)
    147147{
    148148    fName  = name  ? name  : "MSimRandomPhotons";
     
    202202    }
    203203
    204     MReflector *r = (MReflector*)pList->FindObject("Reflector", "MReflector");
     204    MOptics *r = (MOptics*)pList->FindObject("Reflector", "MOptics");
    205205    if (!r)
    206206    {
    207         *fLog << err << "Reflector [MReflector] not found... aborting." << endl;
     207        *fLog << err << "Reflector [MOptics] not found... aborting." << endl;
    208208        return kFALSE;
    209209    }
     
    349349    if (eff.GetSpline()->Eval(wmin)>1e-5)
    350350    {
    351         *fLog << err << "ERROR - Total transmission efficiency at ";
     351        *fLog << (fForce?warn:err) << "ERROR - Total transmission efficiency at ";
    352352        *fLog << wmin << "nm is not zero... abort." << endl;
    353353        *fLog << "        PhotonDetectionEfficency: " << s1->GetSpline()->Eval(wmin) << endl;
     
    355355        *fLog << "        MirrorReflectivity:       " << s3->GetSpline()->Eval(wmin) << endl;
    356356        *fLog << "        TotalEfficiency:          " << eff.GetSpline()->Eval(wmin) << endl;
    357         return kFALSE;
     357        if (!fForce)
     358            return kFALSE;
    358359    }
    359360    if (eff.GetSpline()->Eval(wmax)>1e-5)
    360361    {
    361         *fLog << err << "ERROR - Total transmission efficiency at ";
     362        *fLog << (fForce?warn:err) << "ERROR - Total transmission efficiency at ";
    362363        *fLog << wmax << "nm is not zero... abort." << endl;
    363364        *fLog << "        PhotonDetectionEfficency: " << s1->GetSpline()->Eval(wmax) << endl;
     
    365366        *fLog << "        MirrorReflectivity:       " << s3->GetSpline()->Eval(wmax) << endl;
    366367        *fLog << "        TotalEfficiency:          " << eff.GetSpline()->Eval(wmax) << endl;
    367         return kFALSE;
     368        if (!fForce)
     369            return kFALSE;
    368370    }
    369371
     
    526528{
    527529    Bool_t rc = kFALSE;
     530    if (IsEnvDefined(env, prefix, "Force", print))
     531    {
     532        rc = kTRUE;
     533        fForce = GetEnvValue(env, prefix, "Force", fForce);
     534    }
     535
    528536    if (IsEnvDefined(env, prefix, "FrequencyFixed", print))
    529537    {
  • trunk/Mars/msimcamera/MSimRandomPhotons.h

    r9991 r19542  
    3535    TString fFileNameNSB;
    3636
     37    Bool_t fForce;
     38
    3739    // MTask
    3840    Int_t  PreProcess(MParList *pList);
Note: See TracChangeset for help on using the changeset viewer.