Changeset 19586 for trunk/Mars


Ignore:
Timestamp:
09/02/19 17:32:07 (5 years ago)
Author:
tbretz
Message:
Propagate the wavelength to the optics to allow for refraction calculation.
Location:
trunk/Mars/msimreflector
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/msimreflector/MReflector.h

    r19543 r19586  
    5050    virtual Bool_t CanHit(const MQuaternion &p) const;
    5151
    52     Int_t ExecuteOptics(MQuaternion &p, MQuaternion &u) const;
     52    Int_t ExecuteOptics(MQuaternion &p, MQuaternion &u, const Short_t &wavelength) const;
    5353
    5454    void SetSigmaPSF(Double_t psf);
  • trunk/Mars/msimreflector/MSimReflector.cc

    r19544 r19586  
    370370// calling the ExecuteMirror function of the mirrors.
    371371//
    372 // If a mirror was hit its index is retuened, -1 otherwise.
     372// If a mirror was hit its index is returned, -1 otherwise.
    373373//
    374374// FIXME: Do to lopping over all mirrors for all photons this is the
     
    377377// this could be accelerated a lot.
    378378//
    379 Int_t MReflector::ExecuteOptics(MQuaternion &p, MQuaternion &u) const
     379Int_t MReflector::ExecuteOptics(MQuaternion &p, MQuaternion &u, const Short_t &) const
    380380{
    381381    //static const TObjArray *arr = &((MMirror*)fMirrors[0])->fNeighbors;
     
    497497        // w.fVectorPart.SetXYZ(0.2/17, 0.2/17, -(1-TMath::Hypot(0.3, 0.2)/17));
    498498
     499        // FIXME: Take refractive index into account!
     500
    499501        // Now propagate the photon to the z-plane in the new coordinate system
    500502        p.PropagateZ0(w);
     
    522524        //*static_cast<MPhotonData*>(cpy2.UncheckedAt(cnt[2]++)) = *dat;
    523525
     526        // FIXME: Set refractive index to air at 2200m!
     527
    524528        // Now execute the reflection of the photon on the mirrors' surfaces
    525         const Int_t num = fReflector->ExecuteOptics(p, w);
     529        const Int_t num = fReflector->ExecuteOptics(p, w, dat->GetWavelength());
    526530        if (num<0)
    527531            continue;
Note: See TracChangeset for help on using the changeset viewer.