Changeset 8021


Ignore:
Timestamp:
10/08/06 14:22:25 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r7779 r8021  
    170170    fSignificanceExc  = MMath::SignificanceLiMaExc(fEventsSignal, fEventsBackground);
    171171
    172     if (TMath::IsNaN(fSignificance))
     172    // !Finitite includes IsNaN
     173    if (!TMath::Finite(fSignificance))
    173174        fSignificance=0;
    174175
     
    373374    fSignificanceExc  = MMath::SignificanceLiMaExc(fEventsSignal, fEventsBackground/alpha, alpha);
    374375
    375     if (TMath::IsNaN(fSignificance))
     376    // !Finitite includes IsNaN
     377    if (!TMath::Finite(fSignificance))
    376378        fSignificance=0;
    377379    if (fEventsExcess<0)
  • trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc

    r7899 r8021  
    212212{
    213213    const Double_t res = TMath::Sqrt(fChisq-fBias*fBias);
    214     if (TMath::IsNaN(res))
     214    if (!TMath::Finite(res))
    215215    {
    216         *fLog << all << "MHEnergyEst::Print: ERROR - Resolution is NaN (not a number)." << endl;
     216        *fLog << all << "MHEnergyEst::Print: ERROR - Resolution is not finite (eg. NaN)." << endl;
    217217        return;
    218218    }
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r7877 r8021  
    938938        if (!issame)
    939939        {
    940             const Bool_t isnan = TMath::IsNaN(fArray[i+1]);
     940            const Bool_t isnan = !TMath::Finite(fArray[i+1]);
    941941            if (!IsUsed(i) || !iscol || isnan)
    942942            {
     
    944944
    945945                if (isnan)
    946                     gLog << warn << "MHCamera::Update: " << GetName() << " <" << GetTitle() << "> - Pixel Index #" << i << " contents is NaN (Not a Number)..." << endl;
     946                    gLog << warn << "MHCamera::Update: " << GetName() << " <" << GetTitle() << "> - Pixel Index #" << i << " contents is not finite..." << endl;
    947947            }
    948948            else
     
    960960                hex.PaintHexagon(x, y, d);
    961961        else
    962             if (IsUsed(i) && !TMath::IsNaN(fArray[i+1]))
     962            if (IsUsed(i) && TMath::Finite(fArray[i+1]))
    963963            {
    964964                Float_t size = d*(GetBinContent(i+1)-min)/(max-min);
     
    16431643Int_t MHCamera::GetColor(Float_t val, Float_t min, Float_t max, Bool_t islog)
    16441644{
    1645     if (TMath::IsNaN(val)) // FIXME: gLog!
    1646         return 10;
     1645    if (!TMath::Finite(val)) // FIXME: gLog!
     1646        return maxcolidx/2;
    16471647
    16481648    //
Note: See TracChangeset for help on using the changeset viewer.