Changeset 18677 for trunk/Mars/msim


Ignore:
Timestamp:
11/29/16 11:23:00 (8 years ago)
Author:
tbretz
Message:
Fixed a numerical problem which could happen when the values were store with lower precision
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/msim/MPhotonData.cc

    r18549 r18677  
    117117Double_t MPhotonData::GetSinW2() const
    118118{
    119     return fCosU*fCosU + fCosV*fCosV;
     119    const Double_t sinw2 = fCosU*fCosU + fCosV*fCosV;
     120    return sinw2>1 ? 1 : sinw2;
    120121}
    121122
Note: See TracChangeset for help on using the changeset viewer.