Changeset 11567 for trunk/Mars/mhist


Ignore:
Timestamp:
07/24/11 18:29:30 (13 years ago)
Author:
tbretz
Message:
Do not propagate non finite numbers.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mhist/MHCamera.cc

    r11558 r11567  
    502502
    503503        const Double_t val = TestBit(kProfile) ? fArray[i+1]/fBinEntries[i+1] : fArray[i+1];
    504         if (MatchSector(i, sector, aidx) && (ball || IsUsed(i)) && val<minimum)
     504        if (MatchSector(i, sector, aidx) && (ball || IsUsed(i)) && val<minimum && TMath::Finite(val))
    505505            minimum = val;
    506506    }
     
    530530
    531531        const Double_t val = TestBit(kProfile) ? fArray[i+1]/fBinEntries[i+1] : fArray[i+1];
    532         if (MatchSector(i, sector, aidx) && (ball || IsUsed(i)) && val>maximum)
     532        if (MatchSector(i, sector, aidx) && (ball || IsUsed(i)) && val>maximum && TMath::Finite(val))
    533533            maximum = val;
    534534    }
     
    773773    // Fill the projected histogram
    774774    for (Int_t idx=0; idx<fNcells-2; idx++)
    775         if (IsUsed(idx) && MatchSector(idx, sector, aidx))
     775        if (IsUsed(idx) && MatchSector(idx, sector, aidx) && TMath::Finite(GetBinContent(idx+1)))
    776776            h1->Fill(GetBinContent(idx+1));
    777777
     
    864864    // Fill the projected histogram
    865865    for (Int_t idx=0; idx<fNcells-2; idx++)
    866         if (IsUsed(idx) && MatchSector(idx, sector, aidx))
     866        if (IsUsed(idx) && MatchSector(idx, sector, aidx) && TMath::Finite(GetBinContent(idx+1)))
    867867            h1->Fill(TMath::Hypot((*fGeomCam)[idx].GetX(),(*fGeomCam)[idx].GetY())*m2d,
    868868                     GetBinContent(idx+1));
     
    943943    for (Int_t idx=0; idx<fNcells-2; idx++)
    944944    {
    945         if (IsUsed(idx) && MatchSector(idx, TArrayI(), aidx))
     945        if (IsUsed(idx) && MatchSector(idx, TArrayI(), aidx) && TMath::Finite(GetPixContent(idx)))
    946946            h1->Fill(TMath::ATan2((*fGeomCam)[idx].GetY(),(*fGeomCam)[idx].GetX())*TMath::RadToDeg()+180,
    947947                     GetPixContent(idx));
Note: See TracChangeset for help on using the changeset viewer.