Ignore:
Timestamp:
10/22/03 20:59:40 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r2416 r2421  
    818818// ------------------------------------------------------------------------
    819819//
    820 // Fill the colors in respect to the cleaning levels
    821 //
    822 void MHCamera::FillLevels(const MCerPhotEvt &event, Float_t lvl1, Float_t lvl2)
     820// The array must be in increasing order, eg: 2.5, 3.7, 4.9
     821// The values in each bin are replaced by the interval in which the value
     822// fits. In the example we have four intervals
     823// (<2.5, 2.5-3.7, 3.7-4.9, >4.9). Maximum and minimum are set
     824// accordingly.
     825//
     826void MHCamera::SetLevels(const TArrayF &arr)
    823827{
    824828    if (fNcells<=1)
    825829        return;
    826 
    827     SetCamContent(event, 2);
    828830
    829831    for (Int_t i=0; i<fNcells-2; i++)
     
    832834            continue;
    833835
    834         if (fArray[i+1]>lvl1)
    835             fArray[i+1] = 0;
    836         else
    837             if (fArray[i+1]>lvl2)
    838                 fArray[i+1] = 1;
    839             else
    840                 fArray[i+1] = 2;
    841     }
    842 }
    843 
    844 // ------------------------------------------------------------------------
    845 //
    846 // Fill the colors in respect to the cleaning levels
    847 //
    848 void MHCamera::FillLevels(const MCerPhotEvt &event, const MImgCleanStd &clean)
    849 {
    850     FillLevels(event, clean.GetCleanLvl1(), clean.GetCleanLvl2());
     836        Int_t j = arr.GetSize();
     837        while (j && fArray[i+1]<arr[j-1])
     838            j--;
     839
     840        fArray[i+1] = j;
     841    }
     842    SetMaximum(arr.GetSize());
     843    SetMinimum(0);
    851844}
    852845
Note: See TracChangeset for help on using the changeset viewer.