Changeset 19544


Ignore:
Timestamp:
Jun 4, 2019, 10:27:34 AM (5 months ago)
Author:
tbretz
Message:
Replaced MReflector by new base class MOptics.
Location:
trunk/Mars/msimreflector
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/msimreflector/MSimReflector.cc

    r18957 r19544  
    5555#include "MQuaternion.h"
    5656#include "MMirror.h"
     57#include "MOptics.h"
    5758#include "MReflector.h"
    5859#include "MReflection.h"
     
    109110        return kFALSE;
    110111
    111     fReflector = (MReflector*)pList->FindObject(fNameReflector, "MReflector");
     112    fReflector = (MOptics*)pList->FindObject(fNameReflector, "MOptics");
    112113    if (!fReflector)
    113114    {
    114         *fLog << err << fNameReflector << " [MReflector] not found..." << endl;
    115         return kFALSE;
    116     }
    117 
    118     if (fReflector->GetNumMirrors()==0)
    119     {
    120         *fLog << err << "ERROR - Reflector '" << fNameReflector << "' doesn't contain a single mirror." << endl;
     115        *fLog << err << fNameReflector << " [MOptics] not found..." << endl;
     116        return kFALSE;
     117    }
     118
     119    if (!fReflector->IsValid())
     120    {
     121        *fLog << err << "ERROR - Optics '" << fNameReflector << "' invalid." << endl;
    121122        return kFALSE;
    122123    }
     
    376377// this could be accelerated a lot.
    377378//
    378 Int_t MReflector::ExecuteReflector(MQuaternion &p, MQuaternion &u) const
     379Int_t MReflector::ExecuteOptics(MQuaternion &p, MQuaternion &u) const
    379380{
    380381    //static const TObjArray *arr = &((MMirror*)fMirrors[0])->fNeighbors;
     
    522523
    523524        // Now execute the reflection of the photon on the mirrors' surfaces
    524         const Int_t num = fReflector->ExecuteReflector(p, w);
     525        const Int_t num = fReflector->ExecuteOptics(p, w);
    525526        if (num<0)
    526527            continue;
  • trunk/Mars/msimreflector/MSimReflector.h

    r10090 r19544  
    1212class MCorsikaEvtHeader;
    1313
    14 class MReflector;
     14class MOptics;
    1515
    1616class MSimReflector : public MTask
     
    2626    MCorsikaEvtHeader *fEvtHeader;     //! Header storing event information
    2727
    28     MReflector        *fReflector;  //!
     28    MOptics           *fReflector;  //!
    2929    MGeomCam          *fGeomCam;    //!
    3030    MPointingPos      *fPointing;   //!
Note: See TracChangeset for help on using the changeset viewer.