Changeset 10054 for trunk


Ignore:
Timestamp:
11/22/10 16:10:06 (14 years ago)
Author:
tbretz
Message:
Fixed arrival time for a point source.
Location:
trunk/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/Changelog

    r10053 r10054  
    2323   * Makefile.rules:
    2424     - use -C option of make instead of cd
     25
     26   * msimreflector/MSimRays.cc:
     27     - added some comments
     28     - fixed timing for a point source
    2529
    2630
  • trunk/Mars/msimreflector/MSimRays.cc

    r9922 r10054  
    164164        MPhotonData &dat = *static_cast<MPhotonData*>(arr.UncheckedAt(idx));
    165165
     166        // Get radom incident point on the mirror plane.
    166167        const Double_t x = gRandom->Uniform(-maxr, maxr);
    167168        const Double_t y = gRandom->Uniform(-maxr, maxr);
     
    170171            continue;
    171172
     173        // The is the incident direction of the photon
    172174        // h==0 means infinitiy
    173175        const TVector3 u = fHeight>0 ? TVector3(x, y, -h).Unit() :  TVector3(0, 0, -1);
     
    176178        // CORSIKA-orig: x(north), y(west),  z(up), t(time)
    177179        // NOW:          x(east),  y(north), z(up), t(time)
    178         MQuaternion p(TVector3(x, y, 0));
     180        MQuaternion p(TVector3(x, y, 0), fHeight>0 ? TMath::Sqrt(x*x + y*y + h*h): 0);
    179181        MQuaternion w(u, conv);
    180182
Note: See TracChangeset for help on using the changeset viewer.